123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Input;
- using System.Collections.Generic;
- using Aitex.Core.UI.MVVM;
- using Aitex.Core.Utilities;
- using MECF.Framework.Simulator.Core.Commons;
- using CyberX8_Simulator.Devices;
- namespace CyberX8_Simulator.Views
- {
- /// <summary>
- /// Interaction logic for Simu_EfemView.xaml
- /// </summary>
- public partial class Simu_SunWayEfemView : UserControl
- {
- public Simu_SunWayEfemView()
- {
- InitializeComponent();
- this.DataContext = new Simu_SunWayEfemViewModel();
- this.Loaded += OnViewLoaded;
- }
- private void OnViewLoaded(object sender, RoutedEventArgs e)
- {
- (DataContext as TimerViewModelBase)?.Start();
- }
- }
- class Simu_SunWayEfemViewModel : SocketDeviceViewModel
- {
- public string Title
- {
- get { return "EFEM Simulator"; }
- }
- public string WaferMap
- {
- get { return _sim.SlotMap; }
- }
- private bool _doorOpen;
- [IgnorePropertyChange]
- public bool DoorOpen
- {
- get
- {
- return _doorOpen;
- }
- set
- {
- _doorOpen = value;
- _sim.SetCassetteDoor(_doorOpen);
- }
- }
- private bool _Maintain;
- [IgnorePropertyChange]
- public bool Maintain
- {
- get
- {
- return _Maintain;
- }
- set
- {
- _Maintain = value;
- _sim.SetMaintain(_Maintain);
- }
- }
- private bool _Protrude1;
- [IgnorePropertyChange]
- public bool Protrude1
- {
- get
- {
- return _Protrude1;
- }
- set
- {
- _Protrude1 = value;
- _sim.SetProtrude1(_Protrude1);
- }
- }
- private bool _Protrude2;
- [IgnorePropertyChange]
- public bool Protrude2
- {
- get
- {
- return _Protrude2;
- }
- set
- {
- _Protrude2 = value;
- _sim.SetProtrude2(_Protrude2);
- }
- }
- private bool _VAC;
- [IgnorePropertyChange]
- public bool VAC
- {
- get
- {
- return _VAC;
- }
- set
- {
- _VAC = value;
- _sim.SetVAC(_VAC);
- }
- }
- private bool _AIR;
- [IgnorePropertyChange]
- public bool AIR
- {
- get
- {
- return _AIR;
- }
- set
- {
- _AIR = value;
- _sim.SetAIR(_AIR);
- }
- }
- private bool _doorOpen1;
- public bool DoorOpen1
- {
- get
- {
- return _doorOpen1;
- }
- set
- {
- _doorOpen1 = value;
- _sim.IsDoorOpen1=value;
- }
- }
- private bool _doorOpen2;
- public bool DoorOpen2
- {
- get
- {
- return _doorOpen2;
- }
- set
- {
- _doorOpen2 = value;
- _sim.IsDoorOpen2 = value;
- }
- }
- private bool _doorOpen3;
- public bool DoorOpen3
- {
- get
- {
- return _doorOpen3;
- }
- set
- {
- _doorOpen3 = value;
- _sim.IsDoorOpen3 = value;
- }
- }
- private SunWayEfemSimulator _sim;
- public ICommand ClearCommand { get; set; }
- public ICommand SetAllCommand { get; set; }
- public ICommand RandomCommand { get; set; }
- public ICommand RandomDummyCommand { get; set; }
- public Simu_SunWayEfemViewModel() : base("SunWayEfemSimuViewModel")
- {
-
- ClearCommand = new DelegateCommand<string>(Clear);
- SetAllCommand = new DelegateCommand<string>(SetAll);
- RandomCommand = new DelegateCommand<string>(RandomGenerateWafer);
- RandomDummyCommand = new DelegateCommand<string>(RandomDummyGenerateWafer);
- _sim = new SunWayEfemSimulator();
- Init(_sim);
- }
- private void RandomGenerateWafer(string obj)
- {
- _sim.RandomWafer();
- }
- private void RandomDummyGenerateWafer(string obj)
- {
- _sim.RandomDummyWafer();
- }
- private void SetAll(string obj)
- {
- _sim.SetAllWafer();
- }
- private void Clear(string obj)
- {
- _sim.ClearWafer();
- }
- private List<string> _WaferSizeItems = new List<string>() { "200", "300"};
- public List<string> WaferSizeItems
- {
- get
- {
- return _WaferSizeItems;
- }
- }
- private string _SelectedWaferSize;
- public string SelectedWaferSize
- {
- get
- {
- return _SelectedWaferSize;
- }
- set
- {
- _SelectedWaferSize = value;
- _sim.WaferSize =int.Parse(value);
- }
- }
- }
- }
|