using Aitex.Core.UI.MVVM; using Aitex.Sorter.Common; using Aitex.Sorter.UI.Controls.Common; using MECF.Framework.Common.OperationCenter; using System.Collections.Generic; using System.Windows; using System.Windows.Input; using Aitex.Core.Util; namespace Aitex.Sorter.UI.ViewModel.Maintenance { public class AlignerNoHomeViewModel : UIViewModelBase { public bool EnablePageControl { get { return !IsOnlineMode; } } [Subscription("System.IsOnlineMode")] public bool IsOnlineMode { get; set; } public AlignerNoHomeViewModel(string vmName) : base(vmName) { Command = new DelegateCommand(DoCommand); } public bool AlignerInitialized { get; set; } [Subscription("Aligner.Busy")] public bool AlignerIsBusy { get; set; } [Subscription("Aligner.Error")] public bool AlignerIsError { get; set; } [Subscription("Aligner.WaferOnAligner")] public bool WaferOnAligner { get; set; } public string ElapseTime { get; set; } public int Notch { get; set; } public string AlignerStatus { get; set; } public ICommand Command { get; private set; } private void DoCommand(DependencyObject sender) { var command = CommandHelper.GetCommandItem(sender); var lstParameter = new List(command.Parameters); lstParameter.Insert(0, command.Target); lstParameter.Insert(1, command.CommandName); InvokeClient.Instance.Service.DoOperation(OperationName.DeviceOperation, lstParameter.ToArray()); } } }