using Aitex.Core.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Threading;
using MECF.Framework.Common.CommonData;
using MECF.Framework.UI.Client.ClientControls.Common;
namespace MECF.Framework.UI.Client.ClientControls.EfemControls
{
///
/// AtmRobot.xaml 的交互逻辑
///
public partial class AtmRobot : UserControl
{
private int moveTime = 300;
private const int AnimationTimeout = 3000; // ms
private string CurrentPosition
{
get; set;
}
private RobotAction CurrentAction
{
get; set;
}
public int MoveTime
{
get => moveTime;
set
{
moveTime = value;
}
}
// Using a DependencyProperty as the backing store for RotateAngel. This enables animation, styling, binding, etc...
public static readonly DependencyProperty RotateAngleProperty =
DependencyProperty.Register("RotateAngel", typeof(int), typeof(AtmRobot), new PropertyMetadata(0));
public int TranslateX
{
get { return (int)GetValue(TranslateXProperty); }
set { SetValue(TranslateXProperty, value); }
}
// Using a DependencyProperty as the backing store for TranslateX. This enables animation, styling, binding, etc...
public static readonly DependencyProperty TranslateXProperty =
DependencyProperty.Register("TranslateX", typeof(int), typeof(AtmRobot), new PropertyMetadata(0));
public MECF.Framework.UI.Client.ClientBase.WaferInfo Wafer1
{
get { return (MECF.Framework.UI.Client.ClientBase.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(MECF.Framework.UI.Client.ClientBase.WaferInfo), typeof(AtmRobot), new PropertyMetadata(null));
public MECF.Framework.UI.Client.ClientBase.WaferInfo Wafer2
{
get { return (MECF.Framework.UI.Client.ClientBase.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(MECF.Framework.UI.Client.ClientBase.WaferInfo), typeof(AtmRobot), new PropertyMetadata(null));
public string Station
{
get { return (string)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(string), typeof(AtmRobot), new PropertyMetadata("Robot"));
public RobotMoveInfo RobotMoveInfo
{
get { return (RobotMoveInfo)GetValue(RobotMoveInfoProperty); }
set { SetValue(RobotMoveInfoProperty, value); }
}
public static readonly DependencyProperty RobotMoveInfoProperty =
DependencyProperty.Register("RobotMoveInfo", typeof(RobotMoveInfo), typeof(AtmRobot), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public bool WaferPresentA
{
get { return (bool)GetValue(WaferPresentAProperty); }
set { SetValue(WaferPresentAProperty, value); }
}
// Using a DependencyProperty as the backing store for WaferPresent. This enables animation, styling, binding, etc...
public static readonly DependencyProperty WaferPresentAProperty =
DependencyProperty.Register("WaferPresentA", typeof(bool), typeof(AtmRobot), new PropertyMetadata(false));
public bool WaferPresentB
{
get { return (bool)GetValue(WaferPresentBProperty); }
set { SetValue(WaferPresentBProperty, value); }
}
// Using a DependencyProperty as the backing store for WaferPresent. This enables animation, styling, binding, etc...
public static readonly DependencyProperty WaferPresentBProperty =
DependencyProperty.Register("WaferPresentB", typeof(bool), typeof(AtmRobot), new PropertyMetadata(false));
public ICommand CreateDeleteWaferCommand
{
get { return (ICommand)GetValue(CreateDeleteWaferCommandProperty); }
set { SetValue(CreateDeleteWaferCommandProperty, value); }
}
// Using a DependencyProperty as the backing store for CreateDeleteWaferCommand. This enables animation, styling, binding, etc...
public static readonly DependencyProperty CreateDeleteWaferCommandProperty =
DependencyProperty.Register("CreateDeleteWaferCommand", typeof(ICommand), typeof(AtmRobot), new PropertyMetadata(null));
public ICommand MoveWaferCommand
{
get { return (ICommand)GetValue(MoveWaferCommandProperty); }
set { SetValue(MoveWaferCommandProperty, value); }
}
// Using a DependencyProperty as the backing store for MoveWaferCommand. This enables animation, styling, binding, etc...
public static readonly DependencyProperty MoveWaferCommandProperty =
DependencyProperty.Register("MoveWaferCommand", typeof(ICommand), typeof(AtmRobot), new PropertyMetadata(null));
public Dictionary StationPosition
{
get { return (Dictionary)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(Dictionary), typeof(AtmRobot), new PropertyMetadata(null, StationPositionChangedCallback));
private List