Wafer.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. namespace OpenSEMI.Ctrlib.Controls
  4. {
  5. public class Wafer : Control
  6. {
  7. public static readonly DependencyProperty ViewTypeProperty;
  8. public static readonly DependencyProperty WaferStatusProperty;
  9. public static readonly DependencyProperty SlotIDProperty;
  10. public static readonly DependencyProperty ModuleIDProperty;
  11. public static readonly DependencyProperty WaferTooltipProperty;
  12. public static readonly DependencyProperty WaferTooltipExtProperty;
  13. public static readonly DependencyProperty SourceNameProperty;
  14. public static readonly DependencyProperty DuplicatedVisibilityProperty;
  15. public static readonly DependencyProperty SeasoningWaferTypeProperty;
  16. public static readonly DependencyProperty WaferWidthProperty;
  17. public static readonly DependencyProperty WaferHeightProperty;
  18. public string ViewType
  19. {
  20. get
  21. {
  22. return (string)GetValue(ViewTypeProperty);
  23. }
  24. set
  25. {
  26. SetValue(ViewTypeProperty, value);
  27. }
  28. }
  29. public int WaferStatus
  30. {
  31. get
  32. {
  33. return (int)GetValue(WaferStatusProperty);
  34. }
  35. set
  36. {
  37. SetValue(WaferStatusProperty, value);
  38. }
  39. }
  40. public int SlotID
  41. {
  42. get
  43. {
  44. return (int)GetValue(SlotIDProperty);
  45. }
  46. set
  47. {
  48. SetValue(SlotIDProperty, value);
  49. }
  50. }
  51. public string ModuleID
  52. {
  53. get
  54. {
  55. return (string)GetValue(ModuleIDProperty);
  56. }
  57. set
  58. {
  59. SetValue(ModuleIDProperty, value);
  60. }
  61. }
  62. public string WaferTooltip
  63. {
  64. get
  65. {
  66. return (string)GetValue(WaferTooltipProperty);
  67. }
  68. set
  69. {
  70. SetValue(WaferTooltipProperty, value);
  71. }
  72. }
  73. public string WaferTooltipExt
  74. {
  75. get
  76. {
  77. return (string)GetValue(WaferTooltipExtProperty);
  78. }
  79. set
  80. {
  81. SetValue(WaferTooltipExtProperty, value);
  82. }
  83. }
  84. public string SourceName
  85. {
  86. get
  87. {
  88. return (string)GetValue(SourceNameProperty);
  89. }
  90. set
  91. {
  92. SetValue(SourceNameProperty, value);
  93. }
  94. }
  95. public Visibility DuplicatedVisibility
  96. {
  97. get
  98. {
  99. return (Visibility)GetValue(DuplicatedVisibilityProperty);
  100. }
  101. set
  102. {
  103. SetValue(DuplicatedVisibilityProperty, value);
  104. }
  105. }
  106. public string SeasoningWaferType
  107. {
  108. get
  109. {
  110. return (string)GetValue(SeasoningWaferTypeProperty);
  111. }
  112. set
  113. {
  114. SetValue(SeasoningWaferTypeProperty, value);
  115. }
  116. }
  117. //public bool IsDuplicated
  118. //{
  119. // get
  120. // {
  121. // return (bool)GetValue(IsDuplicatedProperty);
  122. // }
  123. // set
  124. // {
  125. // SetValue(IsDuplicatedProperty, value);
  126. // }
  127. //}
  128. public int WaferWidth
  129. {
  130. get
  131. {
  132. return (int)GetValue(WaferWidthProperty);
  133. }
  134. set
  135. {
  136. SetValue(WaferWidthProperty, value);
  137. }
  138. }
  139. public int WaferHeight
  140. {
  141. get
  142. {
  143. return (int)GetValue(WaferHeightProperty);
  144. }
  145. set
  146. {
  147. SetValue(WaferHeightProperty, value);
  148. }
  149. }
  150. static Wafer()
  151. {
  152. ViewTypeProperty = DependencyProperty.Register("ViewType", typeof(string), typeof(Wafer), new UIPropertyMetadata("Front"));
  153. WaferStatusProperty = DependencyProperty.Register("WaferStatus", typeof(int), typeof(Wafer), new UIPropertyMetadata(0));
  154. SlotIDProperty = DependencyProperty.Register("SlotID", typeof(int), typeof(Wafer), new UIPropertyMetadata(0));
  155. ModuleIDProperty = DependencyProperty.Register("ModuleID", typeof(string), typeof(Wafer), new UIPropertyMetadata(string.Empty));
  156. WaferTooltipProperty = DependencyProperty.Register("WaferTooltip", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty));
  157. WaferTooltipExtProperty = DependencyProperty.Register("WaferTooltipExt", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty));
  158. SourceNameProperty = DependencyProperty.Register("SourceName", typeof(string), typeof(Wafer), new UIPropertyMetadata(string.Empty));
  159. DuplicatedVisibilityProperty = DependencyProperty.Register("DuplicatedVisibility", typeof(Visibility), typeof(Wafer), new UIPropertyMetadata(Visibility.Collapsed));
  160. SeasoningWaferTypeProperty = DependencyProperty.Register("SeasoningWaferType", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty));
  161. WaferWidthProperty = DependencyProperty.Register("WaferWidth", typeof(int), typeof(Wafer), new UIPropertyMetadata(90));
  162. WaferHeightProperty = DependencyProperty.Register("WaferHeight", typeof(int), typeof(Wafer), new UIPropertyMetadata(11));
  163. FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(typeof(Wafer), new FrameworkPropertyMetadata(typeof(Wafer)));
  164. }
  165. }
  166. }