EFEM.xaml.cs 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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 OpenSEMI.ClientBase;
  9. using PunkHPX8_Themes.CustomControls;
  10. namespace PunkHPX8_Themes.UserControls
  11. {
  12. /// <summary>
  13. /// EFEM.xaml 的交互逻辑
  14. /// </summary>
  15. public partial class EFEM : UserControl
  16. {
  17. public enum RobotPosition
  18. {
  19. None,
  20. Origin,
  21. Right,
  22. Left,
  23. Middle,
  24. Aligner,
  25. SRD,
  26. Dummy,
  27. Right_Place,
  28. Left_Place,
  29. Middle_Place,
  30. Aligner_Place,
  31. SRD_Place,
  32. Dummy_Place,
  33. VPW1,
  34. VPW2,
  35. PlatingCell1,
  36. PlatingCell2,
  37. PlatingCell3,
  38. PlatingCell4,
  39. VPW1_Place,
  40. VPW2_Place,
  41. PlatingCell1_Place,
  42. PlatingCell2_Place,
  43. PlatingCell3_Place,
  44. PlatingCell4_Place,
  45. }
  46. public EFEM()
  47. {
  48. InitializeComponent();
  49. }
  50. public static readonly DependencyProperty RotateTransformValueProperty = DependencyProperty.Register(
  51. "RotateTransformValue", typeof(int), typeof(EFEM));
  52. public int RotateTransformValue
  53. {
  54. get { return (int)this.GetValue(RotateTransformValueProperty); }
  55. set { this.SetValue(RotateTransformValueProperty, value); }
  56. }
  57. public static readonly DependencyProperty AlignActionValueProperty = DependencyProperty.Register(
  58. "AlignActionValue", typeof(int), typeof(EFEM));
  59. public int AlignActionValue
  60. {
  61. get { return (int)this.GetValue(AlignActionValueProperty); }
  62. set { this.SetValue(AlignActionValueProperty, value); }
  63. }
  64. public static readonly DependencyProperty Aligner1WaferProperty = DependencyProperty.Register(
  65. "Aligner1Wafer", typeof(WaferInfo), typeof(EFEM));
  66. public WaferInfo Aligner1Wafer
  67. {
  68. get => (WaferInfo)GetValue(Aligner1WaferProperty);
  69. set => SetValue(Aligner1WaferProperty, value);
  70. }
  71. public static readonly DependencyProperty VPW1WaferProperty = DependencyProperty.Register(
  72. "VPW1Wafer", typeof(WaferInfo), typeof(EFEM));
  73. public WaferInfo VPW1Wafer
  74. {
  75. get => (WaferInfo)GetValue(VPW1WaferProperty);
  76. set => SetValue(VPW1WaferProperty, value);
  77. }
  78. public static readonly DependencyProperty VPW2WaferProperty = DependencyProperty.Register(
  79. "VPW2Wafer", typeof(WaferInfo), typeof(EFEM));
  80. public WaferInfo VPW2Wafer
  81. {
  82. get => (WaferInfo)GetValue(VPW2WaferProperty);
  83. set => SetValue(VPW2WaferProperty, value);
  84. }
  85. public static readonly DependencyProperty PlatingCell1WaferProperty = DependencyProperty.Register(
  86. "PlatingCell1Wafer", typeof(WaferInfo), typeof(EFEM));
  87. public WaferInfo PlatingCell1Wafer
  88. {
  89. get => (WaferInfo)GetValue(PlatingCell1WaferProperty);
  90. set => SetValue(PlatingCell1WaferProperty, value);
  91. }
  92. public static readonly DependencyProperty PlatingCell2WaferProperty = DependencyProperty.Register(
  93. "PlatingCell2Wafer", typeof(WaferInfo), typeof(EFEM));
  94. public WaferInfo PlatingCell2Wafer
  95. {
  96. get => (WaferInfo)GetValue(PlatingCell2WaferProperty);
  97. set => SetValue(PlatingCell2WaferProperty, value);
  98. }
  99. public static readonly DependencyProperty PlatingCell3WaferProperty = DependencyProperty.Register(
  100. "PlatingCell3Wafer", typeof(WaferInfo), typeof(EFEM));
  101. public WaferInfo PlatingCell3Wafer
  102. {
  103. get => (WaferInfo)GetValue(PlatingCell3WaferProperty);
  104. set => SetValue(PlatingCell3WaferProperty, value);
  105. }
  106. public static readonly DependencyProperty PlatingCell4WaferProperty = DependencyProperty.Register(
  107. "PlatingCell4Wafer", typeof(WaferInfo), typeof(EFEM));
  108. public WaferInfo PlatingCell4Wafer
  109. {
  110. get => (WaferInfo)GetValue(PlatingCell4WaferProperty);
  111. set => SetValue(PlatingCell4WaferProperty, value);
  112. }
  113. public static readonly DependencyProperty LP1PresentedProperty = DependencyProperty.Register(
  114. "LP1Presented", typeof(bool), typeof(EFEM),
  115. new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  116. public bool LP1Presented
  117. {
  118. get { return (bool)this.GetValue(LP1PresentedProperty); }
  119. set { this.SetValue(LP1PresentedProperty, value); }
  120. }
  121. public static readonly DependencyProperty LP2PresentedProperty = DependencyProperty.Register(
  122. "LP2Presented", typeof(bool), typeof(EFEM),
  123. new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  124. public bool LP2Presented
  125. {
  126. get { return (bool)this.GetValue(LP2PresentedProperty); }
  127. set { this.SetValue(LP2PresentedProperty, value); }
  128. }
  129. public static readonly DependencyProperty LP3PresentedProperty = DependencyProperty.Register(
  130. "LP3Presented", typeof(bool), typeof(EFEM),
  131. new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  132. public bool LP3Presented
  133. {
  134. get { return (bool)this.GetValue(LP3PresentedProperty); }
  135. set { this.SetValue(LP3PresentedProperty, value); }
  136. }
  137. public static readonly DependencyProperty LP1LoadedProperty = DependencyProperty.Register(
  138. "LP1Loaded", typeof(bool), typeof(EFEM),
  139. new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  140. public bool LP1Loaded
  141. {
  142. get { return (bool)this.GetValue(LP1LoadedProperty); }
  143. set { this.SetValue(LP1LoadedProperty, value); }
  144. }
  145. public static readonly DependencyProperty LP2LoadedProperty = DependencyProperty.Register(
  146. "LP2Loaded", typeof(bool), typeof(EFEM),
  147. new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  148. public bool LP2Loaded
  149. {
  150. get { return (bool)this.GetValue(LP2LoadedProperty); }
  151. set { this.SetValue(LP2LoadedProperty, value); }
  152. }
  153. public static readonly DependencyProperty LP3LoadedProperty = DependencyProperty.Register(
  154. "LP3Loaded", typeof(bool), typeof(EFEM),
  155. new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  156. public bool LP3Loaded
  157. {
  158. get { return (bool)this.GetValue(LP3LoadedProperty); }
  159. set { this.SetValue(LP3LoadedProperty, value); }
  160. }
  161. public static readonly DependencyProperty CurrentRobotPositionProperty = DependencyProperty.Register(
  162. "CurrentRobotPosition", typeof(RobotPosition), typeof(EFEM),
  163. new PropertyMetadata(RobotPosition.Origin, PositionChangedCallback));
  164. public RobotPosition CurrentRobotPosition
  165. {
  166. get { return (RobotPosition)this.GetValue(CurrentRobotPositionProperty); }
  167. set
  168. {
  169. this.SetValue(CurrentRobotPositionProperty, value);
  170. }
  171. }
  172. private static void PositionChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
  173. {
  174. var newAct = (RobotPosition)e.NewValue;
  175. var control = d as EFEM;
  176. GoToPosition(control,newAct);
  177. }
  178. private static void GoToPosition(Control control, RobotPosition robotPosition)
  179. {
  180. VisualStateManager.GoToElementState(control, robotPosition.ToString(), true);
  181. }
  182. public static readonly DependencyProperty RobotATActionProperty = DependencyProperty.Register(
  183. "RobotATAction", typeof(WaferRobotTAction), typeof(EFEM),
  184. new FrameworkPropertyMetadata(WaferRobotTAction.T_Origin, FrameworkPropertyMetadataOptions.AffectsRender));
  185. public WaferRobotTAction RobotATAction
  186. {
  187. get { return (WaferRobotTAction)this.GetValue(RobotATActionProperty); }
  188. set { this.SetValue(RobotATActionProperty, value); }
  189. }
  190. public static readonly DependencyProperty RobotAXActionProperty = DependencyProperty.Register(
  191. "RobotAXAction", typeof(WaferRobotXAction), typeof(EFEM),
  192. new FrameworkPropertyMetadata(WaferRobotXAction.X_Origin, FrameworkPropertyMetadataOptions.AffectsRender));
  193. public WaferRobotXAction RobotAXAction
  194. {
  195. get { return (WaferRobotXAction)this.GetValue(RobotAXActionProperty); }
  196. set { this.SetValue(RobotAXActionProperty, value); }
  197. }
  198. public static readonly DependencyProperty RobotAWaferInfoProperty = DependencyProperty.Register(
  199. "RobotAWaferInfo", typeof(WaferInfo), typeof(EFEM));
  200. public WaferInfo RobotAWaferInfo
  201. {
  202. get { return (WaferInfo)this.GetValue(RobotAWaferInfoProperty); }
  203. set { this.SetValue(RobotAWaferInfoProperty, value); }
  204. }
  205. public static readonly DependencyProperty RobotBWaferInfoProperty = DependencyProperty.Register(
  206. "RobotBWaferInfo", typeof(WaferInfo), typeof(EFEM));
  207. public WaferInfo RobotBWaferInfo
  208. {
  209. get { return (WaferInfo)this.GetValue(RobotBWaferInfoProperty); }
  210. set { this.SetValue(RobotBWaferInfoProperty, value); }
  211. }
  212. }
  213. }