123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- using Aitex.Core.Common;
- using System.Windows;
- using System.Windows.Controls;
- using static athosCore.NiceRobotAction;
- namespace athosThemes.UserControls
- {
-
- /// <summary>
- /// Robot.xaml 的交互逻辑
- /// </summary>
- public partial class Robot : UserControl
- {
- public Robot()
- {
- InitializeComponent();
- }
- /// <summary>
- /// Blader1 WaferInfo
- /// </summary>
- public static readonly DependencyProperty Blade1WaferInfoProperty = DependencyProperty.Register("Blade1WaferInfo", typeof(WaferInfo), typeof(Robot));
- public WaferInfo Blade1WaferInfo
- {
- get => (WaferInfo)GetValue(Blade1WaferInfoProperty);
- set => SetValue(Blade1WaferInfoProperty, value);
- }
- /// <summary>
- /// Blader2 WaferInfo
- /// </summary>
- public static readonly DependencyProperty Blade2WaferInfoProperty = DependencyProperty.Register("Blade2WaferInfo", typeof(WaferInfo), typeof(Robot));
- public WaferInfo Blade2WaferInfo
- {
- get => (WaferInfo)GetValue(Blade2WaferInfoProperty);
- set => SetValue(Blade2WaferInfoProperty, value);
- }
- /// <summary>
- /// Blader1 Wafer
- /// </summary>
- public static readonly DependencyProperty Blade1WaferProperty = DependencyProperty.Register("Blade1Wafer", typeof(string), typeof(Robot));
- public string Blade1Wafer
- {
- get => (string)GetValue(Blade1WaferProperty);
- set => SetValue(Blade1WaferProperty, value);
- }
- /// <summary>
- /// Blader2 Wafer
- /// </summary>
- public static readonly DependencyProperty Blade2WaferProperty = DependencyProperty.Register("Blade2Wafer", typeof(string), typeof(Robot));
- public string Blade2Wafer
- {
- get => (string)GetValue(Blade2WaferProperty);
- set => SetValue(Blade2WaferProperty, value);
- }
- /// <summary>
- /// Blader1 伸缩动作
- /// </summary>
- public static readonly DependencyProperty Blade1RobotXActionProperty = DependencyProperty.Register(
- "Blade1RobotXAction", typeof(NiceWaferRobotXAction), typeof(Robot), new PropertyMetadata(NiceWaferRobotXAction.Blader1Retract1, Blade1RobotXActionPropertyChangedCallback));
- public NiceWaferRobotXAction Blade1RobotXAction
- {
- get => (NiceWaferRobotXAction)GetValue(Blade1RobotXActionProperty);
- set => SetValue(Blade1RobotXActionProperty, value);
- }
- private static void Blade1RobotXActionPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- var control = d as Robot;
- var oldAct = (NiceWaferRobotXAction)e.OldValue;
- var newAct = (NiceWaferRobotXAction)e.NewValue;
- if (oldAct != newAct)
- {
- VisualStateManager.GoToState(control, newAct.ToString(), true);
- }
- }
- /// <summary>
- /// Blader2 伸缩动作
- /// </summary>
- public static readonly DependencyProperty Blade2RobotXActionProperty = DependencyProperty.Register(
- "Blade2RobotXAction", typeof(NiceWaferRobotXAction), typeof(Robot), new PropertyMetadata(NiceWaferRobotXAction.Blader2Retract1, Blade2RobotXActionPropertyChangedCallback));
- public NiceWaferRobotXAction Blade2RobotXAction
- {
- get => (NiceWaferRobotXAction)GetValue(Blade2RobotXActionProperty);
- set => SetValue(Blade2RobotXActionProperty, value);
- }
- private static void Blade2RobotXActionPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- var control = d as Robot;
- var oldAct = (NiceWaferRobotXAction)e.OldValue;
- var newAct = (NiceWaferRobotXAction)e.NewValue;
- if (oldAct != newAct)
- {
- VisualStateManager.GoToState(control, newAct.ToString(), true);
- }
- }
- /// <summary>
- /// Robot整体旋转
- /// </summary>
- public static readonly DependencyProperty Blade1RobotTActionProperty = DependencyProperty.Register(
- "BladeRobotTAction", typeof(NiceWaferRobotTAction), typeof(Robot), new PropertyMetadata(NiceWaferRobotTAction.T_Origin, BladeRobotTActionPropertyChangedCallback));
- public NiceWaferRobotTAction BladeRobotTAction
- {
- get => (NiceWaferRobotTAction)GetValue(Blade1RobotTActionProperty);
- set => SetValue(Blade1RobotTActionProperty, value);
- }
- private static void BladeRobotTActionPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- var control = d as Robot;
- var oldAct = (NiceWaferRobotTAction)e.OldValue;
- var newAct = (NiceWaferRobotTAction)e.NewValue;
- if (oldAct != newAct)
- {
- VisualStateManager.GoToState(control, newAct.ToString(), true);
- }
- }
- }
- }
|