using Aitex.Core.Common;
using Aitex.Core.UI.MVVM;
using MECF.Framework.Common.CommonData;
using MECF.Framework.Common.Equipment;
using EfemDualUI.Controls.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using CB = MECF.Framework.UI.Client.ClientBase;
namespace EfemDualUI.Controls.Parts
{
///
/// ATMDualArmRobot.xaml 的交互逻辑
///
public partial class ATMDualArmRobot : UserControl, INotifyPropertyChanged
{
protected readonly int MoveTime = 300;
private const int AnimationTimeout = 3000; // seconds
public int TranslateX
{
get { return (int)GetValue(TranslateXProperty); }
set { SetValue(TranslateXProperty, value); }
}
// Using a DependencyProperty as the backing store for RotateAngel. This enables animation, styling, binding, etc...
public static readonly DependencyProperty TranslateXProperty =
DependencyProperty.Register("TranslateX", typeof(int), typeof(ATMDualArmRobot), new PropertyMetadata(0));
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(ATMDualArmRobot), new PropertyMetadata(ModuleName.Robot));
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(ATMDualArmRobot), new PropertyMetadata(null));
public RobotMoveInfo RobotMoveInfo
{
get { return (RobotMoveInfo)GetValue(RobotMoveInfoProperty); }
set { SetValue(RobotMoveInfoProperty, value); }
}
public static readonly DependencyProperty RobotMoveInfoProperty =
DependencyProperty.Register("RobotMoveInfo", typeof(RobotMoveInfo), typeof(ATMDualArmRobot), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public VTMRobotPosition StationPosition
{
get { return (VTMRobotPosition)GetValue(StationPositionProperty); }
set { SetValue(StationPositionProperty, value); }
}
// Using a DependencyProperty as the backing store for StationPosition. This enables animation, styling, binding, etc...
public static readonly DependencyProperty StationPositionProperty =
DependencyProperty.Register("StationPosition", typeof(VTMRobotPosition), typeof(ATMDualArmRobot), new PropertyMetadata(null, PropertyChangedCallback));
public WaferInfo[] RobotWafers
{
get { return (WaferInfo[])GetValue(RobotWafersProperty); }
set { SetValue(RobotWafersProperty, value); }
}
// Using a DependencyProperty as the backing store for RobotWafers. This enables animation, styling, binding, etc...
public static readonly DependencyProperty RobotWafersProperty =
DependencyProperty.Register("RobotWafers", typeof(WaferInfo[]), typeof(ATMDualArmRobot), new PropertyMetadata(null, PropertyChangedCallback));
public CB.WaferInfo Wafer1
{
get { return (CB.WaferInfo)GetValue(Wafer1Property); }
set { SetValue(Wafer1Property, value); }
}
// Using a DependencyProperty as the backing store for Wafer1. This enables animation, styling, binding, etc...
public static readonly DependencyProperty Wafer1Property =
DependencyProperty.Register("Wafer1", typeof(CB.WaferInfo), typeof(ATMDualArmRobot), new PropertyMetadata(null));
public CB.WaferInfo Wafer2
{
get { return (CB.WaferInfo)GetValue(Wafer2Property); }
set { SetValue(Wafer2Property, value); }
}
// Using a DependencyProperty as the backing store for Wafer2. This enables animation, styling, binding, etc...
public static readonly DependencyProperty Wafer2Property =
DependencyProperty.Register("Wafer2", typeof(CB.WaferInfo), typeof(ATMDualArmRobot), new PropertyMetadata(null));
private string CurrentPosition;
//private string CurrentArmA;
//private string CurrentArmB;
private RobotAction CurrentAction
{
get; set;
}
private List