123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- 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 CyberX8_Themes.CustomControls;
- namespace CyberX8_Themes.UserControls
- {
- /// <summary>
- /// EFEMRight.xaml 的交互逻辑
- /// </summary>
- public partial class EFEMRight : UserControl
- {
- public enum RobotPosition
- {
- None,
- Origin,
- Right,
- Left,
- Middle
- }
- public EFEMRight()
- {
- InitializeComponent();
- }
- public static readonly DependencyProperty RotateTransformValueProperty = DependencyProperty.Register(
- "RotateTransformValue", typeof(int), typeof(EFEMRight));
- public int RotateTransformValue
- {
- get { return (int)this.GetValue(RotateTransformValueProperty); }
- set { this.SetValue(RotateTransformValueProperty, value); }
- }
- public static readonly DependencyProperty Aligner1WaferProperty = DependencyProperty.Register(
- "Aligner1Wafer", typeof(WaferInfo), typeof(EFEMRight));
- public WaferInfo Aligner1Wafer
- {
- get => (WaferInfo)GetValue(Aligner1WaferProperty);
- set => SetValue(Aligner1WaferProperty, value);
- }
- public static readonly DependencyProperty LP1PresentedProperty = DependencyProperty.Register(
- "LP1Presented", typeof(bool), typeof(EFEMRight),
- 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(EFEMRight),
- 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(EFEMRight),
- 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(EFEMRight),
- 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(EFEMRight),
- 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(EFEMRight),
- 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(EFEMRight),
- 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 EFEMRight;
- GoToPosition(control,newAct);
- }
-
- public static readonly DependencyProperty RobotATActionProperty = DependencyProperty.Register(
- "RobotATAction", typeof(WaferRobotTAction), typeof(EFEMRight),
- 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(EFEMRight),
- 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 RobotBTActionProperty = DependencyProperty.Register(
- "RobotBTAction", typeof(WaferRobotTAction), typeof(EFEMRight),
- new FrameworkPropertyMetadata(WaferRobotTAction.T_Origin, FrameworkPropertyMetadataOptions.AffectsRender));
- public WaferRobotTAction RobotBTAction
- {
- get { return (WaferRobotTAction)this.GetValue(RobotBTActionProperty); }
- set { this.SetValue(RobotBTActionProperty, value); }
- }
- public static readonly DependencyProperty RobotBXActionProperty = DependencyProperty.Register(
- "RobotBXAction", typeof(WaferRobotXAction), typeof(EFEMRight),
- new FrameworkPropertyMetadata(WaferRobotXAction.X_Origin, FrameworkPropertyMetadataOptions.AffectsRender));
- public WaferRobotXAction RobotBXAction
- {
- get { return (WaferRobotXAction)this.GetValue(RobotBXActionProperty); }
- set { this.SetValue(RobotBXActionProperty, value); }
- }
- public static readonly DependencyProperty RobotAWaferInfoProperty = DependencyProperty.Register(
- "RobotAWaferInfo", typeof(WaferInfo), typeof(EFEMRight));
- public WaferInfo RobotAWaferInfo
- {
- get { return (WaferInfo)this.GetValue(RobotAWaferInfoProperty); }
- set { this.SetValue(RobotAWaferInfoProperty, value); }
- }
- public static readonly DependencyProperty RobotBWaferInfoProperty = DependencyProperty.Register(
- "RobotBWaferInfo", typeof(WaferInfo), typeof(EFEMRight));
- public WaferInfo RobotBWaferInfo
- {
- 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);
- }
- }
- }
|