VPWCellStatusControl.xaml.cs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. using MECF.Framework.Common.OperationCenter;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace PunkHPX8_Themes.UserControls
  17. {
  18. /// <summary>
  19. /// VPWCellStatusControl.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class VPWCellStatusControl : UserControl
  22. {
  23. public VPWCellStatusControl()
  24. {
  25. InitializeComponent();
  26. }
  27. public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
  28. "ModuleName", typeof(string), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  29. /// <summary>
  30. /// 模块名称
  31. /// </summary>
  32. public string ModuleName
  33. {
  34. get
  35. {
  36. return (string)this.GetValue(ModuleNameProperty);
  37. }
  38. set
  39. {
  40. this.SetValue(ModuleNameProperty, value);
  41. }
  42. }
  43. public static readonly DependencyProperty MachineStateProperty = DependencyProperty.Register(
  44. "MachineState", typeof(string), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  45. /// <summary>
  46. /// MachineState
  47. /// </summary>
  48. public string MachineState
  49. {
  50. get
  51. {
  52. return (string)this.GetValue(MachineStateProperty);
  53. }
  54. set
  55. {
  56. this.SetValue(MachineStateProperty, value);
  57. }
  58. }
  59. public static readonly DependencyProperty WaterPressureProperty = DependencyProperty.Register(
  60. "WaterPressure", typeof(double), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  61. /// <summary>
  62. /// WaterPressure
  63. /// </summary>
  64. public double WaterPressure
  65. {
  66. get
  67. {
  68. return (double)this.GetValue(WaterPressureProperty);
  69. }
  70. set
  71. {
  72. this.SetValue(WaterPressureProperty, value);
  73. }
  74. }
  75. public static readonly DependencyProperty PressureTargetProperty = DependencyProperty.Register(
  76. "PressureTarget", typeof(double), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  77. /// <summary>
  78. /// PressureTarget
  79. /// </summary>
  80. public double PressureTarget
  81. {
  82. get
  83. {
  84. return (double)this.GetValue(PressureTargetProperty);
  85. }
  86. set
  87. {
  88. this.SetValue(PressureTargetProperty, value);
  89. }
  90. }
  91. public static readonly DependencyProperty ChamberOpenProperty = DependencyProperty.Register(
  92. "ChamberOpen", typeof(bool), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  93. /// <summary>
  94. /// ChamberOpen
  95. /// </summary>
  96. public bool ChamberOpen
  97. {
  98. get
  99. {
  100. return (bool)this.GetValue(ChamberOpenProperty);
  101. }
  102. set
  103. {
  104. this.SetValue(ChamberOpenProperty, value);
  105. }
  106. }
  107. public static readonly DependencyProperty ChamberCloseProperty = DependencyProperty.Register(
  108. "ChamberClose", typeof(bool), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsRender));
  109. /// <summary>
  110. /// ChamberClose
  111. /// </summary>
  112. public bool ChamberClose
  113. {
  114. get
  115. {
  116. return (bool)this.GetValue(ChamberCloseProperty);
  117. }
  118. set
  119. {
  120. this.SetValue(ChamberCloseProperty, value);
  121. }
  122. }
  123. public static readonly DependencyProperty InputRotationSpeedProperty = DependencyProperty.Register(
  124. "InputRotationSpeed", typeof(double), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  125. /// <summary>
  126. /// InputRotationSpeed
  127. /// </summary>
  128. public double InputRotationSpeed
  129. {
  130. get
  131. {
  132. return (double)this.GetValue(InputRotationSpeedProperty);
  133. }
  134. set
  135. {
  136. this.SetValue(InputRotationSpeedProperty, value);
  137. }
  138. }
  139. public static readonly DependencyProperty InputRotationTimeProperty = DependencyProperty.Register(
  140. "InputRotationTime", typeof(double), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  141. /// <summary>
  142. /// InputRotationTime
  143. /// </summary>
  144. public double InputRotationTime
  145. {
  146. get
  147. {
  148. return (double)this.GetValue(InputRotationTimeProperty);
  149. }
  150. set
  151. {
  152. this.SetValue(InputRotationTimeProperty, value);
  153. }
  154. }
  155. public static readonly DependencyProperty WaferSizeProperty = DependencyProperty.Register(
  156. "WaferSize", typeof(int), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(200, FrameworkPropertyMetadataOptions.AffectsRender));
  157. /// <summary>
  158. /// WaferSize
  159. /// </summary>
  160. public int WaferSize
  161. {
  162. get
  163. {
  164. return (int)this.GetValue(WaferSizeProperty);
  165. }
  166. set
  167. {
  168. this.SetValue(WaferSizeProperty, value);
  169. }
  170. }
  171. private void ChamberOpen_Click(object sender, RoutedEventArgs e)
  172. {
  173. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ChamberUp");
  174. }
  175. private void ChamberClose_Click(object sender, RoutedEventArgs e)
  176. {
  177. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ChamberDown");
  178. }
  179. private void RotationStart_Click(object sender, RoutedEventArgs e)
  180. {
  181. }
  182. private void RotationStop_Click(object sender, RoutedEventArgs e)
  183. {
  184. }
  185. }
  186. }