ParametersSettingAdjustControl.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using Resources;
  2. using System;
  3. using System.Windows.Forms;
  4. namespace SmartCoalApplication.Core.CustomControl
  5. {
  6. public partial class ParametersSettingAdjustControl : BaseUserControl
  7. {
  8. //定义发布消息的事件
  9. public event EventHandler applyButtonClick; //使用默认的事件处理委托
  10. public event EventHandler sureButtonClick;
  11. private void InitializeLanguageText()
  12. {
  13. if (!DesignMode)
  14. {
  15. this.applyButton.Text = PdnResources.GetString("Menu.application.text");
  16. this.button2.Text = PdnResources.GetString("Form.OkButton.Text");
  17. this.groupBox2.Text = PdnResources.GetString("Menu.operation.text");
  18. }
  19. }
  20. /// <summary>
  21. /// 图像处理的操作Control
  22. /// 包括应用、确定
  23. /// </summary>
  24. public ParametersSettingAdjustControl()
  25. {
  26. InitializeComponent();
  27. InitializeLanguageText();
  28. }
  29. //应用按钮点击事件
  30. private void applyButton_Click(object sender, EventArgs e)
  31. {
  32. if (applyButtonClick != null)
  33. {
  34. applyButtonClick(this, new System.EventArgs());
  35. }
  36. }
  37. //确定按钮点击事件
  38. private void button2_Click(object sender, EventArgs e)
  39. {
  40. if (sureButtonClick != null)
  41. {
  42. sureButtonClick(this, new System.EventArgs());
  43. }
  44. }
  45. }
  46. }