| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 | using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using OpenSEMI.ClientBase;using PunkHPX8_Themes.CustomControls;namespace PunkHPX8_Themes.UserControls{    /// <summary>    /// EFEM.xaml 的交互逻辑    /// </summary>    public partial class EFEM : UserControl    {        public enum RobotPosition        {            None,            Origin,            Right,            Left,            Middle,            Aligner,            SRD,            Dummy,            Right_Place,            Left_Place,            Middle_Place,            Aligner_Place,            SRD_Place,            Dummy_Place,            VPW1,            VPW2,            PlatingCell1,            PlatingCell2,            PlatingCell3,            PlatingCell4,            VPW1_Place,            VPW2_Place,            PlatingCell1_Place,            PlatingCell2_Place,            PlatingCell3_Place,            PlatingCell4_Place,        }        public EFEM()        {            InitializeComponent();        }        public static readonly DependencyProperty RotateTransformValueProperty = DependencyProperty.Register(       "RotateTransformValue", typeof(int), typeof(EFEM));        public int RotateTransformValue        {            get { return (int)this.GetValue(RotateTransformValueProperty); }            set { this.SetValue(RotateTransformValueProperty, value); }        }        public static readonly DependencyProperty AlignActionValueProperty = DependencyProperty.Register(       "AlignActionValue", typeof(int), typeof(EFEM));        public int AlignActionValue        {            get { return (int)this.GetValue(AlignActionValueProperty); }            set { this.SetValue(AlignActionValueProperty, value); }        }        public static readonly DependencyProperty Aligner1WaferProperty = DependencyProperty.Register(            "Aligner1Wafer", typeof(WaferInfo), typeof(EFEM));        public WaferInfo Aligner1Wafer        {            get => (WaferInfo)GetValue(Aligner1WaferProperty);            set => SetValue(Aligner1WaferProperty, value);        }        public static readonly DependencyProperty VPW1WaferProperty = DependencyProperty.Register(    "VPW1Wafer", typeof(WaferInfo), typeof(EFEM));        public WaferInfo VPW1Wafer        {            get => (WaferInfo)GetValue(VPW1WaferProperty);            set => SetValue(VPW1WaferProperty, value);        }        public static readonly DependencyProperty VPW2WaferProperty = DependencyProperty.Register(    "VPW2Wafer", typeof(WaferInfo), typeof(EFEM));        public WaferInfo VPW2Wafer        {            get => (WaferInfo)GetValue(VPW2WaferProperty);            set => SetValue(VPW2WaferProperty, value);        }        public static readonly DependencyProperty PlatingCell1WaferProperty = DependencyProperty.Register(   "PlatingCell1Wafer", typeof(WaferInfo), typeof(EFEM));        public WaferInfo PlatingCell1Wafer        {            get => (WaferInfo)GetValue(PlatingCell1WaferProperty);            set => SetValue(PlatingCell1WaferProperty, value);        }        public static readonly DependencyProperty PlatingCell2WaferProperty = DependencyProperty.Register(  "PlatingCell2Wafer", typeof(WaferInfo), typeof(EFEM));        public WaferInfo PlatingCell2Wafer        {            get => (WaferInfo)GetValue(PlatingCell2WaferProperty);            set => SetValue(PlatingCell2WaferProperty, value);        }        public static readonly DependencyProperty PlatingCell3WaferProperty = DependencyProperty.Register(  "PlatingCell3Wafer", typeof(WaferInfo), typeof(EFEM));        public WaferInfo PlatingCell3Wafer        {            get => (WaferInfo)GetValue(PlatingCell3WaferProperty);            set => SetValue(PlatingCell3WaferProperty, value);        }        public static readonly DependencyProperty PlatingCell4WaferProperty = DependencyProperty.Register(  "PlatingCell4Wafer", typeof(WaferInfo), typeof(EFEM));        public WaferInfo PlatingCell4Wafer        {            get => (WaferInfo)GetValue(PlatingCell4WaferProperty);            set => SetValue(PlatingCell4WaferProperty, value);        }        public static readonly DependencyProperty LP1PresentedProperty = DependencyProperty.Register(       "LP1Presented", typeof(bool), typeof(EFEM),       new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        public bool LP1Presented        {            get { return (bool)this.GetValue(LP1PresentedProperty); }            set { this.SetValue(LP1PresentedProperty, value); }        }        public static readonly DependencyProperty LP2PresentedProperty = DependencyProperty.Register(      "LP2Presented", typeof(bool), typeof(EFEM),      new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        public bool LP2Presented        {            get { return (bool)this.GetValue(LP2PresentedProperty); }            set { this.SetValue(LP2PresentedProperty, value); }        }        public static readonly DependencyProperty LP3PresentedProperty = DependencyProperty.Register(      "LP3Presented", typeof(bool), typeof(EFEM),      new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        public bool LP3Presented        {            get { return (bool)this.GetValue(LP3PresentedProperty); }            set { this.SetValue(LP3PresentedProperty, value); }        }        public static readonly DependencyProperty LP1LoadedProperty = DependencyProperty.Register(        "LP1Loaded", typeof(bool), typeof(EFEM),        new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        public bool LP1Loaded        {            get { return (bool)this.GetValue(LP1LoadedProperty); }            set { this.SetValue(LP1LoadedProperty, value); }        }        public static readonly DependencyProperty LP2LoadedProperty = DependencyProperty.Register(       "LP2Loaded", typeof(bool), typeof(EFEM),       new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        public bool LP2Loaded        {            get { return (bool)this.GetValue(LP2LoadedProperty); }            set { this.SetValue(LP2LoadedProperty, value); }        }        public static readonly DependencyProperty LP3LoadedProperty = DependencyProperty.Register(       "LP3Loaded", typeof(bool), typeof(EFEM),       new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        public bool LP3Loaded        {            get { return (bool)this.GetValue(LP3LoadedProperty); }            set { this.SetValue(LP3LoadedProperty, value); }        }        public static readonly DependencyProperty CurrentRobotPositionProperty = DependencyProperty.Register(      "CurrentRobotPosition", typeof(RobotPosition), typeof(EFEM),      new PropertyMetadata(RobotPosition.Origin, PositionChangedCallback));        public RobotPosition CurrentRobotPosition        {            get { return (RobotPosition)this.GetValue(CurrentRobotPositionProperty); }            set             {                this.SetValue(CurrentRobotPositionProperty, value);            }        }        private static void PositionChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)        {                        var newAct = (RobotPosition)e.NewValue;            var control = d as EFEM;            GoToPosition(control,newAct);        }                public static readonly DependencyProperty RobotATActionProperty = DependencyProperty.Register(     "RobotATAction", typeof(WaferRobotTAction), typeof(EFEM),     new FrameworkPropertyMetadata(WaferRobotTAction.T_Origin, FrameworkPropertyMetadataOptions.AffectsRender));        public WaferRobotTAction RobotATAction        {            get { return (WaferRobotTAction)this.GetValue(RobotATActionProperty); }            set { this.SetValue(RobotATActionProperty, value); }        }        public static readonly DependencyProperty RobotAXActionProperty = DependencyProperty.Register(     "RobotAXAction", typeof(WaferRobotXAction), typeof(EFEM),     new FrameworkPropertyMetadata(WaferRobotXAction.X_Origin, FrameworkPropertyMetadataOptions.AffectsRender));        public WaferRobotXAction RobotAXAction        {            get { return (WaferRobotXAction)this.GetValue(RobotAXActionProperty); }            set { this.SetValue(RobotAXActionProperty, value); }        }        public static readonly DependencyProperty RobotAWaferInfoProperty = DependencyProperty.Register(    "RobotAWaferInfo", typeof(WaferInfo), typeof(EFEM));        public WaferInfo RobotAWaferInfo        {            get { return (WaferInfo)this.GetValue(RobotAWaferInfoProperty); }            set { this.SetValue(RobotAWaferInfoProperty, value); }        }        private static void GoToPosition(Control control,RobotPosition robotPosition)        {                        VisualStateManager.GoToElementState(control, robotPosition.ToString(), true);        }                public static readonly DependencyProperty RobotBWaferInfoProperty = DependencyProperty.Register(   "RobotBWaferInfo", typeof(WaferInfo), typeof(EFEM));        public WaferInfo RobotBWaferInfo        {            get { return (WaferInfo)this.GetValue(RobotBWaferInfoProperty); }            set { this.SetValue(RobotBWaferInfoProperty, value); }        }       }}
 |