SnCollectionBox.cs 805 B

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