PopupTextBox.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. namespace Core.StlMes.Client.SaleOrder
  11. {
  12. public partial class PopupTextBox : FrmBase
  13. {
  14. public string TextInfo
  15. {
  16. get { return txtInfo.Text.Trim(); }
  17. }
  18. public PopupTextBox(string textInfo)
  19. {
  20. InitializeComponent();
  21. this.txtInfo.Text = textInfo;
  22. }
  23. private void btnOk_Click(object sender, EventArgs e)
  24. {
  25. this.DialogResult = DialogResult.OK;
  26. }
  27. private void btnCancel_Click(object sender, EventArgs e)
  28. {
  29. this.DialogResult = DialogResult.Cancel;
  30. }
  31. private void txtInfo_KeyDown(object sender, KeyEventArgs e)
  32. {
  33. if (e.Control)
  34. {
  35. if (e.KeyCode == Keys.A)
  36. {
  37. txtInfo.SelectAll();
  38. }
  39. }
  40. }
  41. }
  42. }