using System; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Input; using Aitex.Core.RT.Log; using MECF.Framework.Common.DataCenter; using OpenSEMI.ClientBase; using OpenSEMI.ClientBase.Command; namespace VirgoUI.Client.Dialog { public class ThicknessDialogViewModel : DialogViewModel { private ICommand _SetThickCommand; public ICommand SetThickCommand { get { if (this._SetThickCommand == null) this._SetThickCommand = new BaseCommand>((EventCommandParameter arg) => this.OnSetThickCommand(arg)); return this._SetThickCommand; } } private ICommand _SetThinCommand; public ICommand SetThinCommand { get { if (this._SetThinCommand == null) this._SetThinCommand = new BaseCommand>((EventCommandParameter arg) => this.OnSetThinCommand(arg)); return this._SetThinCommand; } } private ICommand _BtnCancelCommand; public ICommand CancelCommand { get { if (this._BtnCancelCommand == null) this._BtnCancelCommand = new BaseCommand>((EventCommandParameter arg) => this.OnCancelCommand(arg)); return this._BtnCancelCommand; } } private ICommand _BtnIgnoreCommand; public ICommand IgnoreCommand { get { if (this._BtnIgnoreCommand == null) this._BtnIgnoreCommand = new BaseCommand>((EventCommandParameter arg) => this.OnIgnoreCommand(arg)); return this._BtnIgnoreCommand; } } protected override void OnInitialize() { base.OnInitialize(); } public ThicknessDialogViewModel( ) { this.DisplayName = "Wafer Thickness Type Selection"; } private void OnSetThickCommand(EventCommandParameter arg) { DialogResult = "Thick"; TryClose(true); } private void OnSetThinCommand(EventCommandParameter arg) { DialogResult = "Thin"; TryClose(true); } private void OnCancelCommand(EventCommandParameter arg) { DialogResult = ""; TryClose(false); } private void OnIgnoreCommand(EventCommandParameter arg) { DialogResult = "Ignore"; TryClose(true); } } }