Wafer.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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 string ViewType
  17. {
  18. get
  19. {
  20. return (string)GetValue(ViewTypeProperty);
  21. }
  22. set
  23. {
  24. SetValue(ViewTypeProperty, value);
  25. }
  26. }
  27. public int WaferStatus
  28. {
  29. get
  30. {
  31. return (int)GetValue(WaferStatusProperty);
  32. }
  33. set
  34. {
  35. SetValue(WaferStatusProperty, value);
  36. }
  37. }
  38. public int SlotID
  39. {
  40. get
  41. {
  42. return (int)GetValue(SlotIDProperty);
  43. }
  44. set
  45. {
  46. SetValue(SlotIDProperty, value);
  47. }
  48. }
  49. public string ModuleID
  50. {
  51. get
  52. {
  53. return (string)GetValue(ModuleIDProperty);
  54. }
  55. set
  56. {
  57. SetValue(ModuleIDProperty, value);
  58. }
  59. }
  60. public string WaferTooltip
  61. {
  62. get
  63. {
  64. return (string)GetValue(WaferTooltipProperty);
  65. }
  66. set
  67. {
  68. SetValue(WaferTooltipProperty, value);
  69. }
  70. }
  71. public string WaferTooltipExt
  72. {
  73. get
  74. {
  75. return (string)GetValue(WaferTooltipExtProperty);
  76. }
  77. set
  78. {
  79. SetValue(WaferTooltipExtProperty, value);
  80. }
  81. }
  82. public string SourceName
  83. {
  84. get
  85. {
  86. return (string)GetValue(SourceNameProperty);
  87. }
  88. set
  89. {
  90. SetValue(SourceNameProperty, value);
  91. }
  92. }
  93. public Visibility DuplicatedVisibility
  94. {
  95. get
  96. {
  97. return (Visibility)GetValue(DuplicatedVisibilityProperty);
  98. }
  99. set
  100. {
  101. SetValue(DuplicatedVisibilityProperty, value);
  102. }
  103. }
  104. public string SeasoningWaferType
  105. {
  106. get
  107. {
  108. return (string)GetValue(SeasoningWaferTypeProperty);
  109. }
  110. set
  111. {
  112. SetValue(SeasoningWaferTypeProperty, value);
  113. }
  114. }
  115. //public bool IsDuplicated
  116. //{
  117. // get
  118. // {
  119. // return (bool)GetValue(IsDuplicatedProperty);
  120. // }
  121. // set
  122. // {
  123. // SetValue(IsDuplicatedProperty, value);
  124. // }
  125. //}
  126. static Wafer()
  127. {
  128. ViewTypeProperty = DependencyProperty.Register("ViewType", typeof(string), typeof(Wafer), new UIPropertyMetadata("Front"));
  129. WaferStatusProperty = DependencyProperty.Register("WaferStatus", typeof(int), typeof(Wafer), new UIPropertyMetadata(0));
  130. SlotIDProperty = DependencyProperty.Register("SlotID", typeof(int), typeof(Wafer), new UIPropertyMetadata(0));
  131. ModuleIDProperty = DependencyProperty.Register("ModuleID", typeof(string), typeof(Wafer), new UIPropertyMetadata(string.Empty));
  132. WaferTooltipProperty = DependencyProperty.Register("WaferTooltip", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty));
  133. WaferTooltipExtProperty = DependencyProperty.Register("WaferTooltipExt", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty));
  134. SourceNameProperty = DependencyProperty.Register("SourceName", typeof(string), typeof(Wafer), new UIPropertyMetadata(string.Empty));
  135. DuplicatedVisibilityProperty = DependencyProperty.Register("DuplicatedVisibility", typeof(Visibility), typeof(Wafer), new UIPropertyMetadata(Visibility.Collapsed));
  136. SeasoningWaferTypeProperty = DependencyProperty.Register("SeasoningWaferType", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty));
  137. FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(typeof(Wafer), new FrameworkPropertyMetadata(typeof(Wafer)));
  138. }
  139. }
  140. }