InputMatControl.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using System.Windows.Forms;
  3. namespace PaintDotNet.CustomControl
  4. {
  5. public partial class InputMatControl : UserControl
  6. {
  7. //定义发布消息的事件
  8. public event EventHandler selectButtonClick; //使用默认的事件处理委托
  9. /// <summary>
  10. /// 参数的index
  11. /// </summary>
  12. public int paramIndex;
  13. ///// <summary> //111
  14. ///// 参数值改变
  15. ///// </summary>
  16. //public event EventHandler ValueChanged;
  17. public string TextValue
  18. {
  19. get
  20. {
  21. return this.textBox2.Text;
  22. }
  23. set
  24. {
  25. this.textBox2.Text = value;
  26. }
  27. }
  28. private void InitializeLanguageText()
  29. {
  30. this.button2.Text = PdnResources.GetString("Menu.MeasureAction.MeasureSelect.Text");
  31. }
  32. public InputMatControl()
  33. {
  34. InitializeComponent();
  35. InitializeLanguageText();
  36. }
  37. /// <summary>
  38. /// 选择按钮点击事件
  39. /// </summary>
  40. /// <param name="sender"></param>
  41. /// <param name="e"></param>
  42. private void button2_Click(object sender, EventArgs e)
  43. {
  44. if (selectButtonClick != null)
  45. {
  46. selectButtonClick(/*sender*/this, new System.EventArgs());
  47. }
  48. }
  49. }
  50. }