终端一体化运控平台
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.
 
 
 

63 lines
1.7 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 BPASmartClient.SCADAControl.CustomerControls
  18. {
  19. public class TheRadioButton : RadioButton, IExecutable, IDisposable
  20. {
  21. public event EventHandler PropertyChange; //声明一个事件
  22. public TheRadioButton()
  23. {
  24. ResourceDictionary languageResDic = new ResourceDictionary();
  25. languageResDic.Source = new Uri(@"/BPASmartClient.SCADAControl;component/Themes/Generic.xaml",UriKind.RelativeOrAbsolute);
  26. this.Resources.MergedDictionaries.Add(languageResDic);
  27. SetCurrentValue(ContentProperty, "单选按钮");
  28. }
  29. static TheRadioButton()
  30. {
  31. DefaultStyleKeyProperty.OverrideMetadata(typeof(TheRadioButton), new FrameworkPropertyMetadata(typeof(TheRadioButton)));
  32. }
  33. public string ControlType => "控件";
  34. private bool isExecuteState;
  35. public bool IsExecuteState
  36. {
  37. get { return isExecuteState; }
  38. set
  39. {
  40. isExecuteState = value;
  41. if (IsExecuteState)
  42. {
  43. Register();
  44. //Style = null;
  45. }
  46. }
  47. }
  48. public void Register()
  49. {
  50. }
  51. public void Dispose()
  52. {
  53. }
  54. }
  55. }