ProjectName.cs 946 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Windows.Forms;
  3. using System.Windows.Input;
  4. using CoreFS.CA06;
  5. namespace Core.StlMes.Client.Mcp.Mch.Mcms
  6. {
  7. public partial class ProjectName : FrmBase
  8. {
  9. public ProjectName()
  10. {
  11. InitializeComponent();
  12. }
  13. public string ProjectNameStr
  14. {
  15. get { return uteProjectName.Text; }
  16. set { uteProjectName.Text = value; }
  17. }
  18. private void ubtOK_Click(object sender, EventArgs e)
  19. {
  20. if (string.IsNullOrWhiteSpace(uteProjectName.Text))
  21. {
  22. MessageBox.Show(@"请输入方案名");
  23. return;
  24. }
  25. this.DialogResult = DialogResult.OK;
  26. }
  27. private void uteProjectName_KeyPress(object sender, KeyPressEventArgs e)
  28. {
  29. if (e.KeyChar == 13)
  30. {
  31. ubtOK_Click(null, null);
  32. }
  33. }
  34. }
  35. }