123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639 |
- using Aitex.Core.Common;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using Aitex.Sorter.UI.Controls;
- using MECF.Framework.Common.CommonData;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Windows;
- using System.Windows.Media.Animation;
- using System.Windows.Media.Media3D;
- namespace EfemUI.Controls
- {
- /// <summary>
- /// EFEM2LPJet.xaml 的交互逻辑
- /// </summary>
- public partial class EFEM2LPJetAB : EFEMBase
- {
- public EFEM2LPJetAB()
- {
- InitializeComponent();
- root.DataContext = this;
- }
- public bool IsEnableTextMenu
- {
- get { return (bool)GetValue(IsEnableTextMenuProperty); }
- set { SetValue(IsEnableTextMenuProperty, value); }
- }
- // Using a DependencyProperty as the backing store for IsEnableTextMenu. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty IsEnableTextMenuProperty =
- DependencyProperty.Register("IsEnableTextMenu", typeof(bool), typeof(EFEM2LPJetAB), new PropertyMetadata(true));
- public WaferInfo Aligner1Wafer
- {
- get { return (WaferInfo)GetValue(Aligner1WaferProperty); }
- set { SetValue(Aligner1WaferProperty, value); }
- }
- // Using a DependencyProperty as the backing store for Aligner1Wafer. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty Aligner1WaferProperty =
- DependencyProperty.Register("Aligner1Wafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
- public WaferInfo Aligner2Wafer
- {
- get { return (WaferInfo)GetValue(Aligner2WaferProperty); }
- set { SetValue(Aligner2WaferProperty, value); }
- }
- // Using a DependencyProperty as the backing store for Aligner2Wafer. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty Aligner2WaferProperty =
- DependencyProperty.Register("Aligner2Wafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
- public WaferInfo CoolingBuffer1Wafer
- {
- get { return (WaferInfo)GetValue(CoolingBuffer1WaferProperty); }
- set { SetValue(CoolingBuffer1WaferProperty, value); }
- }
- // Using a DependencyProperty as the backing store for CoolingBuffer1Wafer. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty CoolingBuffer1WaferProperty =
- DependencyProperty.Register("CoolingBuffer1Wafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
- public WaferInfo CoolingBuffer2Wafer
- {
- get { return (WaferInfo)GetValue(CoolingBuffer2WaferProperty); }
- set { SetValue(CoolingBuffer2WaferProperty, value); }
- }
- // Using a DependencyProperty as the backing store for CoolingBuffer2Wafer. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty CoolingBuffer2WaferProperty =
- DependencyProperty.Register("CoolingBuffer2Wafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
- public WaferInfo FlipperWafer
- {
- get { return (WaferInfo)GetValue(FlipperWaferProperty); }
- set { SetValue(FlipperWaferProperty, value); }
- }
- // Using a DependencyProperty as the backing store for FlipperWafer. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty FlipperWaferProperty =
- DependencyProperty.Register("FlipperWafer", typeof(WaferInfo), typeof(EFEM2LPJetAB), new PropertyMetadata(null));
- public WaferDisplayMode WaferIDDisplayMode
- {
- get { return (WaferDisplayMode)GetValue(WaferDisplayModeProperty); }
- set { SetValue(WaferDisplayModeProperty, value); }
- }
- // Using a DependencyProperty as the backing store for WaferIDDisplayMode. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty WaferDisplayModeProperty =
- DependencyProperty.Register("WaferIDDisplayMode", typeof(WaferDisplayMode), typeof(EFEM2LPJetAB), new PropertyMetadata(WaferDisplayMode.None));
- [Subscription("CoolingBuffer1Disable", "System")]
- public bool CoolingBuffer1Disable
- {
- get;
- set;
- }
- [Subscription("CoolingBuffer2Disable", "System")]
- public bool CoolingBuffer2Disable
- {
- get;
- set;
- }
- [Subscription("Aligner1Disable", "System")]
- public bool Aligner1Disable
- {
- get;
- set;
- }
- [Subscription("Aligner2Disable", "System")]
- public bool Aligner2Disable
- {
- get;
- set;
- }
- [Subscription("RobotMoveInfo", "Robot")]
- public RobotMoveInfo RobotMoveInfo
- {
- get;
- set;
- }
- public override Dictionary<string, StationPosition> StationPosition
- {
- get
- {
- return new Dictionary<string, StationPosition>
- {
- { "ArmA.System",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=155,
- Arm=240,
- Hand=236
- },
- EndPosition= new RobotPosition()
- {
- Root=155,
- Arm=240,
- Hand=236
- }
- }
- },
- { "ArmB.System",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=25,
- Arm=120,
- Hand=484
- },
- EndPosition= new RobotPosition()
- {
- Root=25,
- Arm=120,
- Hand=484
- }
- }
- },
- { "ArmA.LP1",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=228,
- Arm=179,
- Hand=67
- },
- EndPosition= new RobotPosition()
- {
- Root=189,
- Arm=225,
- Hand=52
- }
- }
- },
- { "ArmB.LP1",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=13,
- Arm=173,
- Hand=281
- },
- EndPosition= new RobotPosition()
- {
- Root=37,
- Arm=131,
- Hand=302
- }
- }
- },
- { "ArmA.LP2",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=159,
- Arm=187,
- Hand=93
- },
- EndPosition= new RobotPosition()
- {
- Root=147,
- Arm=227,
- Hand=61
- }
- }
- },
- { "ArmB.LP2",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=-33,
- Arm=178,
- Hand=286
- },
- EndPosition= new RobotPosition()
- {
- Root=-5,
- Arm=140,
- Hand=301
- }
- }
- },
- { "ArmA.Flipper",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=291,
- Arm=187,
- Hand=88
- },
- EndPosition= new RobotPosition()
- {
- Root=277,
- Arm=230,
- Hand=58
- }
- }
- },
- { "ArmB.Flipper",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=87,
- Arm=166,
- Hand=307
- },
- EndPosition= new RobotPosition()
- {
- Root=129,
- Arm=117,
- Hand=318
- }
- }
- },
- { "ArmA.CoolingBuffer1",new StationPosition()
- {
- StartPosition= new RobotPosition()//取完
- {
- X=0,
- Root=265,
- Arm=192,
- Hand=76
- },
- EndPosition= new RobotPosition()//去取
- {
- Root=258,
- Arm=228,
- Hand=50
- }
- }
- },
- { "ArmB.CoolingBuffer1",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=99,
- Arm=150,
- Hand=284
- },
- EndPosition= new RobotPosition()
- {
- Root=111,
- Arm=120,
- Hand=301
- }
- }
- },
- { "ArmA.CoolingBuffer2",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=255,
- Arm=200,
- Hand=55
- },
- EndPosition= new RobotPosition()
- {
- Root=230,
- Arm=235,
- Hand=45
- }
- }
- },
- { "ArmB.CoolingBuffer2",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=55,
- Arm=150,
- Hand=309
- },
- EndPosition= new RobotPosition()
- {
- Root=84,
- Arm=110,
- Hand=322
- }
- }
- },
- { "ArmA.Aligner1",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=95,
- Arm=200,
- Hand=66
- },
- EndPosition= new RobotPosition()
- {
- Root=75,
- Arm=230,
- Hand=57
- }
- }
- },
- { "ArmB.Aligner1",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=-100,
- Arm=172,
- Hand=290
- },
- EndPosition= new RobotPosition()
- {
- Root=-80,
- Arm=142,
- Hand=300
- }
- }
- },
- { "ArmA.Aligner2",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=132,
- Arm=205,
- Hand=49
- },
- EndPosition= new RobotPosition()
- {
- Root=88,
- Arm=250,
- Hand=49
- }
- }
- },
- { "ArmB.Aligner2",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=-81,
- Arm=164,
- Hand=304
- },
- EndPosition= new RobotPosition()
- {
- Root=-37,
- Arm=115,
- Hand=310
- }
- }
- },
- { "ArmA.Buffer",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=78,
- Arm=198,
- Hand=55
- },
- EndPosition= new RobotPosition()
- {
- Root=46,
- Arm=243,
- Hand=48
- }
- }
- },
- { "ArmB.Buffer",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=-126,
- Arm=173,
- Hand=278
- },
- EndPosition= new RobotPosition()
- {
- Root=-104,
- Arm=132,
- Hand=307
- }
- }
- },
- { "ArmA.LL1",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=79,
- Arm=141,
- Hand=410
- },
- EndPosition= new RobotPosition()
- {
- Root=143,
- Arm=130,
- Hand=357
- }
- }
- },
- { "ArmB.LL1",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=87,
- Arm=130,
- Hand=413
- },
- EndPosition= new RobotPosition()
- {
- Root=137,
- Arm=122,
- Hand=371
- }
- }
- },
- { "ArmA.LL2",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=73,
- Arm=220,
- Hand=337
- },
- EndPosition= new RobotPosition()
- {
- Root=24,
- Arm=236,
- Hand=370
- }
- }
- },
- { "ArmB.LL2",new StationPosition()
- {
- StartPosition= new RobotPosition()
- {
- X=0,
- Root=99,
- Arm=205,
- Hand=326
- },
- EndPosition= new RobotPosition()
- {
- Root=26,
- Arm=226,
- Hand=377
- }
- }
- }
- };
- }
- }
- [Subscription("Aligner1.IsEnable")]
- public bool Aligner1Enable
- {
- get;
- set;
- }
- [Subscription("Aligner2.IsEnable")]
- public bool Aligner2Enable
- {
- get;
- set;
- }
- [Subscription("Buffer.IsEnable")]
- public bool BufferEnable
- {
- get;
- set;
- }
- [Subscription("PMA.IsEnable")]
- public bool PMAEnable
- {
- get;
- set;
- }
- [Subscription("PMB.IsEnable")]
- public bool PMBEnable
- {
- get;
- set;
- }
- [Subscription("LP1.IsEnable")]
- public bool LP1Enable
- {
- get;
- set;
- }
- [Subscription("LP2.IsEnable")]
- public bool LP2Enable
- {
- get;
- set;
- }
- [Subscription("Flipper.IsEnable")]
- public bool FlipperEnable
- {
- get;
- set;
- }
- [Subscription("CoolingBuffer1.IsEnable")]
- public bool CoolingBuffer1Enable
- {
- get;
- set;
- }
- [Subscription("CoolingBuffer2.IsEnable")]
- public bool CoolingBuffer2Enable
- {
- get;
- set;
- }
- [Subscription("System.IsPMADoorOpen")]
- public bool IsPMADoorOpen
- {
- get;
- set;
- }
- [Subscription("System.IsPMBDoorOpen")]
- public bool IsPMBDoorOpen
- {
- get;
- set;
- }
- private bool _isFlipperOverOrigin;
- [Subscription("Flipper.IsFlipperOverOrigin")]
- public bool IsFlipperOverOrigin
- {
- get => _isFlipperOverOrigin;
- set
- {
- if (_isFlipperOverOrigin != value)
- {
- _isFlipperOverOrigin = value;
- //FlipperAnimation();
- }
- }
- }
- private bool _triggerFlipperTurnOver = false;
- private void FlipperAnimation()
- {
-
- DoubleAnimation da = new DoubleAnimation();
- da.Duration = new Duration(TimeSpan.FromSeconds(1));
- da.To = _isFlipperOverOrigin ? 0d : 180d;
- this.Dispatcher.Invoke(() =>
- {
- AxisAngleRotation3D aar = this.FindName("aar") as AxisAngleRotation3D;
- if (aar != null)
- {
- aar.BeginAnimation(AxisAngleRotation3D.AngleProperty, da);
- }
- else
- {
- Debug.WriteLine("AxisAngleRotation3D named 'aar' not found.");
- }
- });
- //AxisAngleRotation3D aar = this.FindName("aar") as AxisAngleRotation3D;
- //aar.BeginAnimation(AxisAngleRotation3D.AngleProperty, da);
- }
- }
- }
|