using System.Windows; using System.Windows.Controls; namespace OpenSEMI.Ctrlib.Controls { public class Wafer : Control { public static readonly DependencyProperty ViewTypeProperty; public static readonly DependencyProperty WaferStatusProperty; public static readonly DependencyProperty SlotIDProperty; public static readonly DependencyProperty ModuleIDProperty; public static readonly DependencyProperty WaferTooltipProperty; public static readonly DependencyProperty WaferTooltipExtProperty; public static readonly DependencyProperty SourceNameProperty; public static readonly DependencyProperty DuplicatedVisibilityProperty; public static readonly DependencyProperty SeasoningWaferTypeProperty; public static readonly DependencyProperty WaferWidthProperty; public static readonly DependencyProperty WaferHeightProperty; public string ViewType { get { return (string)GetValue(ViewTypeProperty); } set { SetValue(ViewTypeProperty, value); } } public int WaferStatus { get { return (int)GetValue(WaferStatusProperty); } set { SetValue(WaferStatusProperty, value); } } public int SlotID { get { return (int)GetValue(SlotIDProperty); } set { SetValue(SlotIDProperty, value); } } public string ModuleID { get { return (string)GetValue(ModuleIDProperty); } set { SetValue(ModuleIDProperty, value); } } public string WaferTooltip { get { return (string)GetValue(WaferTooltipProperty); } set { SetValue(WaferTooltipProperty, value); } } public string WaferTooltipExt { get { return (string)GetValue(WaferTooltipExtProperty); } set { SetValue(WaferTooltipExtProperty, value); } } public string SourceName { get { return (string)GetValue(SourceNameProperty); } set { SetValue(SourceNameProperty, value); } } public Visibility DuplicatedVisibility { get { return (Visibility)GetValue(DuplicatedVisibilityProperty); } set { SetValue(DuplicatedVisibilityProperty, value); } } public string SeasoningWaferType { get { return (string)GetValue(SeasoningWaferTypeProperty); } set { SetValue(SeasoningWaferTypeProperty, value); } } //public bool IsDuplicated //{ // get // { // return (bool)GetValue(IsDuplicatedProperty); // } // set // { // SetValue(IsDuplicatedProperty, value); // } //} public int WaferWidth { get { return (int)GetValue(WaferWidthProperty); } set { SetValue(WaferWidthProperty, value); } } public int WaferHeight { get { return (int)GetValue(WaferHeightProperty); } set { SetValue(WaferHeightProperty, value); } } static Wafer() { ViewTypeProperty = DependencyProperty.Register("ViewType", typeof(string), typeof(Wafer), new UIPropertyMetadata("Front")); WaferStatusProperty = DependencyProperty.Register("WaferStatus", typeof(int), typeof(Wafer), new UIPropertyMetadata(0)); SlotIDProperty = DependencyProperty.Register("SlotID", typeof(int), typeof(Wafer), new UIPropertyMetadata(0)); ModuleIDProperty = DependencyProperty.Register("ModuleID", typeof(string), typeof(Wafer), new UIPropertyMetadata(string.Empty)); WaferTooltipProperty = DependencyProperty.Register("WaferTooltip", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty)); WaferTooltipExtProperty = DependencyProperty.Register("WaferTooltipExt", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty)); SourceNameProperty = DependencyProperty.Register("SourceName", typeof(string), typeof(Wafer), new UIPropertyMetadata(string.Empty)); DuplicatedVisibilityProperty = DependencyProperty.Register("DuplicatedVisibility", typeof(Visibility), typeof(Wafer), new UIPropertyMetadata(Visibility.Collapsed)); SeasoningWaferTypeProperty = DependencyProperty.Register("SeasoningWaferType", typeof(string), typeof(Wafer), new PropertyMetadata(string.Empty)); WaferWidthProperty = DependencyProperty.Register("WaferWidth", typeof(int), typeof(Wafer), new UIPropertyMetadata(90)); WaferHeightProperty = DependencyProperty.Register("WaferHeight", typeof(int), typeof(Wafer), new UIPropertyMetadata(11)); FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(typeof(Wafer), new FrameworkPropertyMetadata(typeof(Wafer))); } } }