| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 | 
							- 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 PunkHPX8_Simulator.Devices;
 
- namespace PunkHPX8_Simulator.Views
 
- {
 
-     /// <summary>
 
-     /// Interaction logic for Simu_EfemView.xaml
 
-     /// </summary>
 
-     public partial class Simu_EfemView : UserControl
 
-     {
 
-         public Simu_EfemView()
 
-         {
 
-             InitializeComponent();
 
-             this.DataContext = new EfemSimulatorViewModel();
 
-             this.Loaded += OnViewLoaded;
 
-         }
 
-         private void OnViewLoaded(object sender, RoutedEventArgs e)
 
-         {
 
-             (DataContext as TimerViewModelBase)?.Start();
 
-         }
 
-     }
 
-     class EfemSimulatorViewModel : 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 SunWayEfemSimulator _sim;
 
-         public ICommand Place1Command { get; set; }
 
-         public ICommand Remove1Command { get; set; }
 
-         public ICommand Place2Command { get; set; }
 
-         public ICommand Remove2Command { get; set; }
 
-         public ICommand Place3Command { get; set; }
 
-         public ICommand Remove3Command { get; set; }
 
-         public ICommand ClearCommand { get; set; }
 
-         public ICommand SetAllCommand { get; set; }
 
-         public ICommand RandomCommand { get; set; }
 
-         public ICommand RandomDummyCommand { get; set; }
 
-         public EfemSimulatorViewModel() : base("EfemSimuViewModel")
 
-         {
 
-             Place1Command = new DelegateCommand<string>(Place1);
 
-             Remove1Command = new DelegateCommand<string>(Remove1);
 
-             Place2Command = new DelegateCommand<string>(Place2);
 
-             Remove2Command = new DelegateCommand<string>(Remove2);
 
-             Place3Command = new DelegateCommand<string>(Place3);
 
-             Remove3Command = new DelegateCommand<string>(Remove3);
 
-             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 void Remove1(string obj)
 
-         {
 
-             _sim.RemoveCarrier1();
 
-         }
 
-         private void Place1(string obj)
 
-         {
 
-             _sim.PlaceCarrier1();
 
-         }
 
-         private void Remove2(string obj)
 
-         {
 
-             _sim.RemoveCarrier2();
 
-         }
 
-         private void Place2(string obj)
 
-         {
 
-             _sim.PlaceCarrier2();
 
-         }
 
-         private void Remove3(string obj)
 
-         {
 
-             _sim.RemoveCarrier3();
 
-         }
 
-         private void Place3(string obj)
 
-         {
 
-             _sim.PlaceCarrier3();
 
-         }
 
-         private List<string> _WaferSizeItems = new List<string>() { "Small", "Mid", "Big"};
 
-         public List<string> WaferSizeItems
 
-         {
 
-             get
 
-             {
 
-                 return _WaferSizeItems;
 
-             }
 
-         }
 
-         private string _SelectedWaferSize;
 
-         public string SelectedWaferSize
 
-         {
 
-             get
 
-             {
 
-                 return _SelectedWaferSize;
 
-             }
 
-             set
 
-             {
 
-                 _SelectedWaferSize = value;
 
-                 switch (value)
 
-                 {
 
-                     case "Small":
 
-                         _sim.WaferSize = 3;
 
-                         break;
 
-                     case "Mid":
 
-                         _sim.WaferSize = 4;
 
-                         break;
 
-                     case "Big":
 
-                         _sim.WaferSize = 6;
 
-                         break;
 
-                 }
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |