PowerSupplierStepControl.xaml.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace CyberX8_Themes.UserControls
  16. {
  17. /// <summary>
  18. /// PowerSupplierStepControl.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class PowerSupplierStepControl : UserControl
  21. {
  22. #region 属性
  23. public static readonly DependencyProperty CurrentProperty = DependencyProperty.Register("Current", typeof(double), typeof(PowerSupplierStepControl),
  24. new FrameworkPropertyMetadata((double)0, FrameworkPropertyMetadataOptions.AffectsRender));
  25. /// <summary>
  26. /// 电流
  27. /// </summary>
  28. public double Current
  29. {
  30. get
  31. {
  32. return (double)this.GetValue(CurrentProperty);
  33. }
  34. set
  35. {
  36. this.SetValue(CurrentProperty, value);
  37. }
  38. }
  39. public static readonly DependencyProperty HourProperty = DependencyProperty.Register("Hour", typeof(double), typeof(PowerSupplierStepControl),
  40. new FrameworkPropertyMetadata((double)0, FrameworkPropertyMetadataOptions.AffectsRender));
  41. /// <summary>
  42. /// 小时
  43. /// </summary>
  44. public double Hour
  45. {
  46. get
  47. {
  48. return (double)this.GetValue(HourProperty);
  49. }
  50. set
  51. {
  52. this.SetValue(HourProperty, value);
  53. }
  54. }
  55. public static readonly DependencyProperty MinuteProperty = DependencyProperty.Register("Minute", typeof(double), typeof(PowerSupplierStepControl),
  56. new FrameworkPropertyMetadata((double)0, FrameworkPropertyMetadataOptions.AffectsRender));
  57. /// <summary>
  58. /// 分钟
  59. /// </summary>
  60. public double Minute
  61. {
  62. get
  63. {
  64. return (double)this.GetValue(MinuteProperty);
  65. }
  66. set
  67. {
  68. this.SetValue(MinuteProperty, value);
  69. }
  70. }
  71. public static readonly DependencyProperty SecondProperty = DependencyProperty.Register("Second", typeof(double), typeof(PowerSupplierStepControl),
  72. new FrameworkPropertyMetadata((double)0, FrameworkPropertyMetadataOptions.AffectsRender));
  73. /// <summary>
  74. /// 秒
  75. /// </summary>
  76. public double Second
  77. {
  78. get
  79. {
  80. return (double)this.GetValue(SecondProperty);
  81. }
  82. set
  83. {
  84. this.SetValue(SecondProperty, value);
  85. }
  86. }
  87. public static readonly DependencyProperty MicroSecondProperty = DependencyProperty.Register("MicroSecond", typeof(double), typeof(PowerSupplierStepControl),
  88. new FrameworkPropertyMetadata((double)0, FrameworkPropertyMetadataOptions.AffectsRender));
  89. /// <summary>
  90. ///毫秒
  91. /// </summary>
  92. public double MicroSecond
  93. {
  94. get
  95. {
  96. return (double)this.GetValue(MicroSecondProperty);
  97. }
  98. set
  99. {
  100. this.SetValue(MicroSecondProperty, value);
  101. }
  102. }
  103. #endregion
  104. public PowerSupplierStepControl()
  105. {
  106. InitializeComponent();
  107. }
  108. }
  109. }