change - MainWindowViewModel修改

master
wenjy 10 months ago
parent 99b7c84e8f
commit 59da4ec243

@ -21,7 +21,6 @@ namespace SlnMesnac.WPF.ViewModel
public class MainWindowViewModel: ViewModelBase public class MainWindowViewModel: ViewModelBase
{ {
private readonly ILogger<MainWindowViewModel> _logger; private readonly ILogger<MainWindowViewModel> _logger;
private readonly RfidPool _rfidPool;
#region 参数定义 #region 参数定义
/// <summary> /// <summary>
/// PLC设备状态 /// PLC设备状态
@ -87,7 +86,6 @@ namespace SlnMesnac.WPF.ViewModel
{ {
_logger = App.ServiceProvider.GetService<ILogger<MainWindowViewModel>>(); _logger = App.ServiceProvider.GetService<ILogger<MainWindowViewModel>>();
_rfidPool = App.ServiceProvider.GetService<RfidPool>();
ControlOnClickCommand = new RelayCommand<object>(obj => ControlOnClick(obj)); ControlOnClickCommand = new RelayCommand<object>(obj => ControlOnClick(obj));
FormControlCommand = new RelayCommand<object>(x => FormControl(x)); FormControlCommand = new RelayCommand<object>(x => FormControl(x));
@ -127,8 +125,6 @@ namespace SlnMesnac.WPF.ViewModel
// 最小化当前窗口 // 最小化当前窗口
case "Minimized": case "Minimized":
var info = _rfidPool.GetRfidByKey("test2");
info.TimePeriodRead();
Application.Current.MainWindow.WindowState = WindowState.Minimized; Application.Current.MainWindow.WindowState = WindowState.Minimized;
break; break;
default: default:

Loading…
Cancel
Save