using MECF.Framework.Common.CommonData;
using SicUI.Controls.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;
namespace SicUI.Controls.M2C4Parts
{
///
/// RobotEfemTray.xaml 的交互逻辑
///
public partial class RobotEfemTray : UserControl, INotifyPropertyChanged
{
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;
}
}
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(RobotEfemTray), new PropertyMetadata(false));
// 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(RobotEfemTray), 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(RobotEfemTray), 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(RobotEfemTray), new PropertyMetadata(null));
//public Visibility IsArmWater => Wafer1 == null ? Visibility.Hidden : Wafer1.IsVisibility;
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(RobotEfemTray), 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(RobotEfemTray), 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(RobotEfemTray), 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(RobotEfemTray), 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(RobotEfemTray), 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(RobotEfemTray), 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(RobotEfemTray), 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... new PropertyMetadata(null, StationPositionChangedCallback)
public static readonly DependencyProperty StationPositionProperty =
DependencyProperty.Register("StationPosition", typeof(Dictionary), typeof(RobotEfemTray), new PropertyMetadata(null, StationPositionChangedCallback));
public Visibility HasWafer
{
get { return (Visibility)GetValue(HasWaferProperty); }
set { SetValue(HasWaferProperty, value); }
}
// Using a DependencyProperty as the backing store for Station. This enables animation, styling, binding, etc...
public static readonly DependencyProperty HasWaferProperty =
DependencyProperty.Register("HasWafer", typeof(Visibility), typeof(RobotEfemTray), new PropertyMetadata(Visibility.Hidden));
public Visibility HasTray
{
get { return (Visibility)GetValue(HasTrayProperty); }
set { SetValue(HasTrayProperty, value); }
}
// Using a DependencyProperty as the backing store for Station. This enables animation, styling, binding, etc...
public static readonly DependencyProperty HasTrayProperty =
DependencyProperty.Register("HasTray", typeof(Visibility), typeof(RobotEfemTray), new PropertyMetadata(Visibility.Hidden));
private List