using Aitex.Core.Common;
using Aitex.Core.UI.MVVM;
using Aitex.Sorter.UI.Controls.Common;
using MECF.Framework.Common.Equipment;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
namespace Aitex.Sorter.UI.Controls
{
///
/// AtmRobot3.xaml 的交互逻辑
///
public partial class AtmRobot3 : UserControl, INotifyPropertyChanged
{
protected readonly int MoveTime = 300;
private const int AnimationTimeout = 3000; // seconds
public int RotateAngle
{
get { return (int)GetValue(RotateAngleProperty); }
set { SetValue(RotateAngleProperty, 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(AtmRobot3), 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(AtmRobot3), 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(AtmRobot3), new PropertyMetadata(null));
public string RobotBladeTarget
{
get { return (string)GetValue(RobotBladeTargetProperty); }
set { SetValue(RobotBladeTargetProperty, value); }
}
public static readonly DependencyProperty RobotBladeTargetProperty =
DependencyProperty.Register("RobotBladeTarget", typeof(string), typeof(AtmRobot3), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public string RobotBlade2Target
{
get { return (string)GetValue(RobotBlade2TargetProperty); }
set { SetValue(RobotBlade2TargetProperty, value); }
}
public static readonly DependencyProperty RobotBlade2TargetProperty =
DependencyProperty.Register("RobotBlade2Target", typeof(string), typeof(AtmRobot3), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public Dictionary StationPosition
{
get { return (Dictionary)GetValue(StationPositionProperty); }
set { SetValue(StationPositionProperty, value); }
}
// Using a DependencyProperty as the backing store for StationPosition2. This enables animation, styling, binding, etc...
public static readonly DependencyProperty StationPositionProperty =
DependencyProperty.Register("StationPosition", typeof(Dictionary), typeof(AtmRobot3), new PropertyMetadata(null, StationPositionChangedCallback));
public bool ShowDock
{
get { return (bool)GetValue(ShowDockProperty); }
set { SetValue(ShowDockProperty, value); }
}
// Using a DependencyProperty as the backing store for ShowDock. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ShowDockProperty =
DependencyProperty.Register("ShowDock", typeof(bool), typeof(AtmRobot3), new PropertyMetadata(false));
public WaferInfo Wafer1
{
get { return (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(WaferInfo), typeof(AtmRobot3), new PropertyMetadata(null));
public WaferInfo Wafer2
{
get { return (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(WaferInfo), typeof(AtmRobot3), new PropertyMetadata(null));
private string CurrentPosition
{
get; set;
}
private List