SnCollectionBox.cs 961 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using UAS_MES_NEW.Entity;
  10. namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
  11. {
  12. public partial class SnCollectionBox : EnterTextBox
  13. {
  14. public SnCollectionBox()
  15. {
  16. InitializeComponent();
  17. }
  18. public override string Text
  19. {
  20. get
  21. {
  22. if (SystemInf.UpperCollection)
  23. return base.Text.ToUpper();
  24. else
  25. return base.Text;
  26. }
  27. set
  28. {
  29. base.Text = value;
  30. }
  31. }
  32. private void SnCollectionBox_KeyDown(object sender, KeyEventArgs e)
  33. {
  34. if (e.KeyCode == Keys.Enter)
  35. {
  36. this.SelectAll();
  37. }
  38. }
  39. }
  40. }