| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 | using Aitex.Sorter.Common;using MECF.Framework.Common.Equipment;using System;using System.Globalization;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Input;using System.Windows.Media;namespace VirgoUI.Client.Models.Controls{    /// <summary>    /// FOUPTopView.xaml 的交互逻辑    /// </summary>    public partial class FOUPTopView : UserControl    {        public FOUPTopView()        {            InitializeComponent();            root.DataContext = this;        }        public string Label        {            get { return (string)GetValue(LabelProperty); }            set { SetValue(LabelProperty, value); }        }        // Using a DependencyProperty as the backing store for Label.  This enables animation, styling, binding, etc...        public static readonly DependencyProperty LabelProperty =            DependencyProperty.Register("Label", typeof(string), typeof(FOUPTopView), new PropertyMetadata(null));        public ICommand Command        {            get { return (ICommand)GetValue(CommandProperty); }            set { SetValue(CommandProperty, value); }        }        // Using a DependencyProperty as the backing store for Command.  This enables animation, styling, binding, etc...        public static readonly DependencyProperty CommandProperty =            DependencyProperty.Register("Command", typeof(ICommand), typeof(FOUPTopView), new PropertyMetadata(null));        public LoadportCassetteState CassetteState        {            get { return (LoadportCassetteState)GetValue(CassetteStateProperty); }            set { SetValue(CassetteStateProperty, value); }        }        // Using a DependencyProperty as the backing store for Present.  This enables animation, styling, binding, etc...        public static readonly DependencyProperty CassetteStateProperty =            DependencyProperty.Register("CassetteState", typeof(LoadportCassetteState), typeof(FOUPTopView), new FrameworkPropertyMetadata(LoadportCassetteState.Unknown));        public FoupDoorState DoorState        {            get { return (FoupDoorState)GetValue(DoorStateProperty); }            set { SetValue(DoorStateProperty, value); }        }        // Using a DependencyProperty as the backing store for Open.  This enables animation, styling, binding, etc...        public static readonly DependencyProperty DoorStateProperty =            DependencyProperty.Register("DoorState", typeof(FoupDoorState), typeof(FOUPTopView), new FrameworkPropertyMetadata(FoupDoorState.Unknown));  //FrameworkPropertyMetadataOptions.AffectsRender        public ModuleName Station        {            get { return (ModuleName)GetValue(StationProperty); }            set { SetValue(StationProperty, value); }        }        // Using a DependencyProperty as the backing store for Station.  This enables animation, styling, binding, etc...        public static readonly DependencyProperty StationProperty =            DependencyProperty.Register("Station", typeof(ModuleName), typeof(FOUPTopView), new PropertyMetadata(ModuleName.System));             private void MenuItem_Click(object sender, RoutedEventArgs e)        {            var cmd = ((MenuItem)sender).Tag;            Command.Execute(new[] { Station.ToString(), cmd });        }        //protected override void OnRender(DrawingContext drawingContext)        //{        //    base.OnRender(drawingContext);        //    if (DoorState == FoupDoorState.Open)        //    {        //        // cassette.VerticalAlignment = VerticalAlignment.Top;        //    }        //    else if (DoorState == FoupDoorState.Close)        //    {        //        //cassette.VerticalAlignment = VerticalAlignment.Bottom;        //    }        //}    }}
 |