VenusDETM.xaml.cs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. using OpenSEMI.ClientBase;
  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. using Venus_Core;
  17. namespace Venus_Themes.UserControls
  18. {
  19. /// <summary>
  20. /// VenusDETM.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class VenusDETM : UserControl
  23. {
  24. public VenusDETM()
  25. {
  26. InitializeComponent();
  27. }
  28. public static readonly DependencyProperty VCEAIsInstalledProperty = DependencyProperty.Register(
  29. "VCEAIsInstalled", typeof(bool), typeof(VenusDETM));
  30. public bool VCEAIsInstalled
  31. {
  32. get => (bool)GetValue(VCEAIsInstalledProperty);
  33. set => SetValue(VCEAIsInstalledProperty, value);
  34. }
  35. public static readonly DependencyProperty VCEBIsInstalledProperty = DependencyProperty.Register(
  36. "VCEBIsInstalled", typeof(bool), typeof(VenusDETM));
  37. public bool VCEBIsInstalled
  38. {
  39. get => (bool)GetValue(VCEBIsInstalledProperty);
  40. set => SetValue(VCEBIsInstalledProperty, value);
  41. }
  42. public static readonly DependencyProperty PMAIsInstalledProperty = DependencyProperty.Register(
  43. "PMAIsInstalled", typeof(bool), typeof(VenusDETM));
  44. public bool PMAIsInstalled
  45. {
  46. get => (bool)GetValue(PMAIsInstalledProperty);
  47. set => SetValue(PMAIsInstalledProperty, value);
  48. }
  49. public static readonly DependencyProperty PMBIsInstalledProperty = DependencyProperty.Register(
  50. "PMBIsInstalled", typeof(bool), typeof(VenusDETM));
  51. public bool PMBIsInstalled
  52. {
  53. get => (bool)GetValue(PMBIsInstalledProperty);
  54. set => SetValue(PMBIsInstalledProperty, value);
  55. }
  56. public static readonly DependencyProperty PMCIsInstalledProperty = DependencyProperty.Register(
  57. "PMCIsInstalled", typeof(bool), typeof(VenusDETM));
  58. public static readonly DependencyProperty PMDIsInstalledProperty = DependencyProperty.Register(
  59. "PMDIsInstalled", typeof(bool), typeof(VenusDETM), new PropertyMetadata(true, OnDataPropertyChanged));
  60. public static readonly DependencyProperty PAWaferProperty = DependencyProperty.Register(
  61. "PAWafer", typeof(WaferInfo), typeof(VenusDETM));
  62. public WaferInfo PAWafer
  63. {
  64. get => (WaferInfo)GetValue(PAWaferProperty);
  65. set => SetValue(PAWaferProperty, value);
  66. }
  67. private static void OnDataPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
  68. {
  69. if (d is VenusDETM setm)
  70. {
  71. if ((bool)e.NewValue)
  72. {
  73. setm.VPAligner.SetValue(Canvas.LeftProperty, 84.0);
  74. setm.VPAligner.SetValue(Canvas.TopProperty, 240.0);
  75. }
  76. else
  77. {
  78. setm.VPAligner.SetValue(Canvas.LeftProperty, 295.0);
  79. setm.VPAligner.SetValue(Canvas.TopProperty, 120.0) ;
  80. }
  81. }
  82. }
  83. public bool PMCIsInstalled
  84. {
  85. get => (bool)GetValue(PMCIsInstalledProperty);
  86. set
  87. {
  88. SetValue(PMCIsInstalledProperty, value);
  89. }
  90. }
  91. public bool PMDIsInstalled
  92. {
  93. get => (bool)GetValue(PMDIsInstalledProperty);
  94. set
  95. {
  96. SetValue(PMDIsInstalledProperty, value);
  97. }
  98. }
  99. public static readonly DependencyProperty VPAIsShowProperty = DependencyProperty.Register(
  100. "VPAIsShow", typeof(bool), typeof(VenusDETM));
  101. public bool VPAIsShow
  102. {
  103. get => (bool)GetValue(VPAIsShowProperty);
  104. set => SetValue(VPAIsShowProperty, value);
  105. }
  106. public static readonly DependencyProperty PMADoorIsOpenProperty = DependencyProperty.Register(
  107. "PMADoorIsOpen", typeof(bool), typeof(VenusDETM));
  108. public bool PMADoorIsOpen
  109. {
  110. get => (bool)GetValue(PMADoorIsOpenProperty);
  111. set => SetValue(PMADoorIsOpenProperty, value);
  112. }
  113. public static readonly DependencyProperty PMBDoorIsOpenProperty = DependencyProperty.Register(
  114. "PMBDoorIsOpen", typeof(bool), typeof(VenusDETM));
  115. public bool PMBDoorIsOpen
  116. {
  117. get => (bool)GetValue(PMBDoorIsOpenProperty);
  118. set => SetValue(PMBDoorIsOpenProperty, value);
  119. }
  120. public static readonly DependencyProperty PMCDoorIsOpenProperty = DependencyProperty.Register(
  121. "PMCDoorIsOpen", typeof(bool), typeof(VenusDETM));
  122. public bool PMCDoorIsOpen
  123. {
  124. get => (bool)GetValue(PMCDoorIsOpenProperty);
  125. set => SetValue(PMCDoorIsOpenProperty, value);
  126. }
  127. public static readonly DependencyProperty PMDDoorIsOpenProperty = DependencyProperty.Register(
  128. "PMDDoorIsOpen", typeof(bool), typeof(VenusDETM));
  129. public bool PMDDoorIsOpen
  130. {
  131. get => (bool)GetValue(PMDDoorIsOpenProperty);
  132. set => SetValue(PMDDoorIsOpenProperty, value);
  133. }
  134. public static readonly DependencyProperty VCEADoorIsOpenProperty = DependencyProperty.Register(
  135. "VCEADoorIsOpen", typeof(bool), typeof(VenusDETM));
  136. public bool VCEADoorIsOpen
  137. {
  138. get => (bool)GetValue(VCEADoorIsOpenProperty);
  139. set => SetValue(VCEADoorIsOpenProperty, value);
  140. }
  141. public static readonly DependencyProperty VCEBDoorIsOpenProperty = DependencyProperty.Register(
  142. "VCEBDoorIsOpen", typeof(bool), typeof(VenusDETM));
  143. public bool VCEBDoorIsOpen
  144. {
  145. get => (bool)GetValue(VCEBDoorIsOpenProperty);
  146. set => SetValue(VCEBDoorIsOpenProperty, value);
  147. }
  148. }
  149. }