using Aitex.Core.Common;
using System.Windows;
using System.Windows.Controls;
using static athosCore.NiceRobotAction;
namespace athosThemes.UserControls
{
///
/// Robot.xaml 的交互逻辑
///
public partial class Robot : UserControl
{
public Robot()
{
InitializeComponent();
}
///
/// Blader1 WaferInfo
///
public static readonly DependencyProperty Blade1WaferInfoProperty = DependencyProperty.Register("Blade1WaferInfo", typeof(WaferInfo), typeof(Robot));
public WaferInfo Blade1WaferInfo
{
get => (WaferInfo)GetValue(Blade1WaferInfoProperty);
set => SetValue(Blade1WaferInfoProperty, value);
}
///
/// Blader2 WaferInfo
///
public static readonly DependencyProperty Blade2WaferInfoProperty = DependencyProperty.Register("Blade2WaferInfo", typeof(WaferInfo), typeof(Robot));
public WaferInfo Blade2WaferInfo
{
get => (WaferInfo)GetValue(Blade2WaferInfoProperty);
set => SetValue(Blade2WaferInfoProperty, value);
}
///
/// Blader1 Wafer
///
public static readonly DependencyProperty Blade1WaferProperty = DependencyProperty.Register("Blade1Wafer", typeof(string), typeof(Robot));
public string Blade1Wafer
{
get => (string)GetValue(Blade1WaferProperty);
set => SetValue(Blade1WaferProperty, value);
}
///
/// Blader2 Wafer
///
public static readonly DependencyProperty Blade2WaferProperty = DependencyProperty.Register("Blade2Wafer", typeof(string), typeof(Robot));
public string Blade2Wafer
{
get => (string)GetValue(Blade2WaferProperty);
set => SetValue(Blade2WaferProperty, value);
}
///
/// Blader1 伸缩动作
///
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);
}
}
///
/// Blader2 伸缩动作
///
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);
}
}
///
/// Robot整体旋转
///
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);
}
}
}
}