using BPASmartClient.Helper; using Microsoft.Toolkit.Mvvm.ComponentModel; using Microsoft.Toolkit.Mvvm.Input; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FryPot_DosingSystem.ViewModel { internal class CopyInfoViewModel:ObservableObject { private string _fryNum; public string FryNum { get { return _fryNum; } set { _fryNum = value;OnPropertyChanged(); } } public RelayCommand ConfimCommand { get; set; } public CopyInfoViewModel() { ConfimCommand = new RelayCommand(() => { if (FryNum != null && FryNum != "" && int.TryParse(FryNum.Trim(), out int Num)) { ActionManage.GetInstance.Send("CopyPotNum",Num); ActionManage.GetInstance.Send("CloseCopyInfoView"); } }); } } }