终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
1.4 KiB

  1. using BPASmartClient.Compiler;
  2. using BPASmartClient.SCADAControl;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace BeDesignerSCADA.CustomerControls
  18. {
  19. public class TheRadioButton : RadioButton, IExecutable, IDisposable
  20. {
  21. public event EventHandler PropertyChange; //声明一个事件
  22. public TheRadioButton()
  23. {
  24. SetCurrentValue(ContentProperty, "单选按钮");
  25. }
  26. static TheRadioButton()
  27. {
  28. DefaultStyleKeyProperty.OverrideMetadata(typeof(TheRadioButton), new FrameworkPropertyMetadata(typeof(TheRadioButton)));
  29. }
  30. public string ControlType => "控件";
  31. private bool isExecuteState;
  32. public bool IsExecuteState
  33. {
  34. get { return isExecuteState; }
  35. set
  36. {
  37. isExecuteState = value;
  38. if (IsExecuteState)
  39. {
  40. Register();
  41. Style = null;
  42. }
  43. }
  44. }
  45. public void Register()
  46. {
  47. }
  48. public void Dispose()
  49. {
  50. }
  51. }
  52. }