1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Input;
- using Aitex.Core.UI.MVVM;
- using MECF.Framework.Simulator.Core.Commons;
- using Virgo_DSimulator.Devices;
- namespace Virgo_DSimulator.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 EfemSimulatorServer _sim;
- public ICommand PlaceCommand { get; set; }
- public ICommand RemoveCommand { get; set; }
- public ICommand ClearCommand { get; set; }
- public ICommand SetAllCommand { get; set; }
- public ICommand RandomCommand { get; set; }
- public EfemSimulatorViewModel() : base("EfemSimuViewModel")
- {
- PlaceCommand = new DelegateCommand<string>(Place);
- RemoveCommand = new DelegateCommand<string>(Remove);
- ClearCommand = new DelegateCommand<string>(Clear);
- SetAllCommand = new DelegateCommand<string>(SetAll);
- RandomCommand = new DelegateCommand<string>(RandomGenerateWafer);
- _sim = new EfemSimulatorServer();
- Init(_sim);
- }
- private void RandomGenerateWafer(string obj)
- {
- _sim.RandomWafer();
- }
- private void SetAll(string obj)
- {
- _sim.SetAllWafer();
- }
- private void Clear(string obj)
- {
- _sim.ClearWafer();
- }
- private void Remove(string obj)
- {
- _sim.RemoveCarrier();
- }
- private void Place(string obj)
- {
- _sim.PlaceCarrier();
- }
- }
- }
|