PufLoaderControl.xaml.cs 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. using CyberX8_Core;
  2. using OpenSEMI.ClientBase;
  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 CyberX8_Themes.UserControls
  18. {
  19. /// <summary>
  20. /// PufLoaderControl.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class PufLoaderControl : UserControl
  23. {
  24. public PufLoaderControl()
  25. {
  26. InitializeComponent();
  27. }
  28. public static readonly DependencyProperty Puf1WaferAProperty = DependencyProperty.Register("Puf1WaferA", typeof(WaferInfo), typeof(PufLoaderControl));
  29. public WaferInfo Puf1WaferA
  30. {
  31. get => (WaferInfo)GetValue(Puf1WaferAProperty);
  32. set => SetValue(Puf1WaferAProperty, value);
  33. }
  34. public static readonly DependencyProperty Puf1WaferBProperty = DependencyProperty.Register("Puf1WaferB", typeof(WaferInfo), typeof(PufLoaderControl));
  35. public WaferInfo Puf1WaferB
  36. {
  37. get => (WaferInfo)GetValue(Puf1WaferBProperty);
  38. set => SetValue(Puf1WaferBProperty, value);
  39. }
  40. public static readonly DependencyProperty LoaderWaferAProperty = DependencyProperty.Register("LoaderWaferA", typeof(WaferInfo), typeof(PufLoaderControl));
  41. public WaferInfo LoaderWaferA
  42. {
  43. get => (WaferInfo)GetValue(LoaderWaferAProperty);
  44. set => SetValue(LoaderWaferAProperty, value);
  45. }
  46. public static readonly DependencyProperty LoaderWaferBProperty = DependencyProperty.Register("LoaderWaferB", typeof(WaferInfo), typeof(PufLoaderControl));
  47. public WaferInfo LoaderWaferB
  48. {
  49. get => (WaferInfo)GetValue(LoaderWaferBProperty);
  50. set => SetValue(LoaderWaferBProperty, value);
  51. }
  52. /// <summary>
  53. /// Loader的sideA开启状态
  54. /// </summary>
  55. public static readonly DependencyProperty WaferVisibleAProperty = DependencyProperty.Register("WaferVisibleA", typeof(bool), typeof(PufLoaderControl));
  56. public bool WaferVisibleA
  57. {
  58. get => (bool)GetValue(WaferVisibleAProperty);
  59. set => SetValue(WaferVisibleAProperty, value);
  60. }
  61. /// <summary>
  62. /// Loader的sideB开启状态
  63. /// </summary>
  64. public static readonly DependencyProperty WaferVisibleBProperty = DependencyProperty.Register("WaferVisibleB", typeof(bool), typeof(PufLoaderControl));
  65. public bool WaferVisibleB
  66. {
  67. get => (bool)GetValue(WaferVisibleBProperty);
  68. set => SetValue(WaferVisibleBProperty, value);
  69. }
  70. public static readonly DependencyProperty CurrentLoaderAXLocationProperty = DependencyProperty.Register("CurrentLoaderAXLocation", typeof(PufControl.LoaderXLocation), typeof(PufLoaderControl),
  71. new PropertyMetadata(PufControl.LoaderXLocation.Parker));
  72. public PufControl.LoaderXLocation CurrentLoaderAXLocation
  73. {
  74. get { return (PufControl.LoaderXLocation)this.GetValue(CurrentLoaderAXLocationProperty); }
  75. set
  76. {
  77. this.SetValue(CurrentLoaderAXLocationProperty, value);
  78. }
  79. }
  80. public static readonly DependencyProperty CurrentLoaderBXLocationProperty = DependencyProperty.Register("CurrentLoaderBXLocation", typeof(PufControl.LoaderXLocation), typeof(PufLoaderControl),
  81. new PropertyMetadata(PufControl.LoaderXLocation.Parker));
  82. public PufControl.LoaderXLocation CurrentLoaderBXLocation
  83. {
  84. get { return (PufControl.LoaderXLocation)this.GetValue(CurrentLoaderBXLocationProperty); }
  85. set
  86. {
  87. this.SetValue(CurrentLoaderBXLocationProperty, value);
  88. }
  89. }
  90. public static readonly DependencyProperty CurrentLoaderARotationProperty = DependencyProperty.Register("CurrentLoaderARotation", typeof(PufControl.LoaderRotation), typeof(PufLoaderControl),
  91. new PropertyMetadata(PufControl.LoaderRotation.Origin));
  92. public PufControl.LoaderRotation CurrentLoaderARotation
  93. {
  94. get { return (PufControl.LoaderRotation)this.GetValue(CurrentLoaderARotationProperty); }
  95. set
  96. {
  97. this.SetValue(CurrentLoaderARotationProperty, value);
  98. }
  99. }
  100. public static readonly DependencyProperty CurrentLoaderBRotationProperty = DependencyProperty.Register("CurrentLoaderBRotation", typeof(PufControl.LoaderRotation), typeof(PufLoaderControl),
  101. new PropertyMetadata(PufControl.LoaderRotation.Origin));
  102. public PufControl.LoaderRotation CurrentLoaderBRotation
  103. {
  104. get { return (PufControl.LoaderRotation)this.GetValue(CurrentLoaderBRotationProperty); }
  105. set
  106. {
  107. this.SetValue(CurrentLoaderBRotationProperty, value);
  108. }
  109. }
  110. /// <summary>
  111. /// Loader Rotation UI 动画位置
  112. /// </summary>
  113. public static readonly DependencyProperty CurrentLoaderRotationProperty = DependencyProperty.Register("CurrentLoaderRotation", typeof(LoaderControl.LoaderRotation), typeof(PufLoaderControl));
  114. public LoaderControl.LoaderRotation CurrentLoaderRotation
  115. {
  116. get { return (LoaderControl.LoaderRotation)this.GetValue(CurrentLoaderRotationProperty); }
  117. set
  118. {
  119. this.SetValue(CurrentLoaderRotationProperty, value);
  120. }
  121. }
  122. /// <summary>
  123. /// Puf1 Rotation UI 位置
  124. /// </summary>
  125. public static readonly DependencyProperty Puf1RotationPositionProperty = DependencyProperty.Register("Puf1RotationPosition", typeof(double), typeof(PufLoaderControl));
  126. public double Puf1RotationPosition
  127. {
  128. get { return (double)this.GetValue(Puf1RotationPositionProperty); }
  129. set
  130. {
  131. this.SetValue(Puf1RotationPositionProperty, value);
  132. }
  133. }
  134. /// <summary>
  135. /// Loader1 Rotation UI 位置
  136. /// </summary>
  137. public static readonly DependencyProperty Loader1RotationPositionProperty = DependencyProperty.Register("Loader1RotationPosition", typeof(double), typeof(PufLoaderControl));
  138. public double Loader1RotationPosition
  139. {
  140. get { return (double)this.GetValue(Loader1RotationPositionProperty); }
  141. set
  142. {
  143. this.SetValue(Loader1RotationPositionProperty, value);
  144. }
  145. }
  146. /// <summary>
  147. /// Puf1 Flip UI 位置
  148. /// </summary>
  149. public static readonly DependencyProperty Puf1FlipPositionProperty = DependencyProperty.Register("Puf1FlipPosition", typeof(double), typeof(PufLoaderControl));
  150. public double Puf1FlipPosition
  151. {
  152. get { return (double)this.GetValue(Puf1FlipPositionProperty); }
  153. set
  154. {
  155. this.SetValue(Puf1FlipPositionProperty, value);
  156. }
  157. }
  158. private void Puf1Control_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  159. {
  160. GlobalEvents.OnSwitchFixedTabItem("HardWare", "Puf", "Puf1ServiceScreen");
  161. }
  162. private void LoaderControl_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  163. {
  164. GlobalEvents.OnSwitchFixedTabItem("HardWare", "Loader", "LoaderSetup");
  165. }
  166. }
  167. }