修改登录跳转页面
This commit is contained in:
parent
44215a008b
commit
f7df2f6c79
|
@ -596,7 +596,7 @@ namespace DM_Weight.ViewModels
|
|||
// };
|
||||
// timer.Start();
|
||||
//}
|
||||
logger.Info($"当前时间:{DateTime.Now}\r\n获取录像机的时间");
|
||||
//logger.Info($"当前时间:{DateTime.Now}\r\n获取录像机的时间");
|
||||
//获取录像机的时间
|
||||
//_chkFunction.HIK_DVR_TIME();
|
||||
//_chkFunction.HIKStartDVRRecord();
|
||||
|
|
|
@ -96,12 +96,12 @@ namespace DM_Weight.ViewModels
|
|||
// get => !_portUtil.fridgeSerial.IsOpen;
|
||||
//}
|
||||
//录像机登录状态
|
||||
private bool _hikMsg;
|
||||
public bool HIKMsg
|
||||
{
|
||||
get=>_hikMsg;
|
||||
set=>SetProperty(ref _hikMsg, value);
|
||||
}
|
||||
//private bool _hikMsg;
|
||||
//public bool HIKMsg
|
||||
//{
|
||||
// get=>_hikMsg;
|
||||
// set=>SetProperty(ref _hikMsg, value);
|
||||
//}
|
||||
|
||||
//public LoginWindowViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, PortUtil portUtil, FingerprintUtil fingerprintUtil)
|
||||
//{
|
||||
|
@ -255,10 +255,10 @@ _exitCommand ??= new DelegateCommand(Exit);
|
|||
{
|
||||
//添加参数,键值对格式
|
||||
keys.Add("operator", user);
|
||||
System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
{
|
||||
//System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
//{
|
||||
_regionManager.RequestNavigate("MainRegion", "HomeWindow", keys);
|
||||
}));
|
||||
//}));
|
||||
}
|
||||
// 双人登录模式
|
||||
else
|
||||
|
@ -271,10 +271,10 @@ _exitCommand ??= new DelegateCommand(Exit);
|
|||
keys.Add("reviewer", user);
|
||||
Reviewer = user;
|
||||
RaisePropertyChanged("Reviewer");
|
||||
System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
{
|
||||
//System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
//{
|
||||
_regionManager.RequestNavigate("MainRegion", "HomeWindow", keys);
|
||||
}));
|
||||
//}));
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -295,10 +295,10 @@ _exitCommand ??= new DelegateCommand(Exit);
|
|||
keys.Add("operator", user);
|
||||
Operator = user;
|
||||
RaisePropertyChanged("Operator");
|
||||
System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
{
|
||||
//System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
//{
|
||||
_regionManager.RequestNavigate("MainRegion", "HomeWindow", keys);
|
||||
}));
|
||||
//}));
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -364,10 +364,10 @@ _exitCommand ??= new DelegateCommand(Exit);
|
|||
void LoginEvent(FingerprintMsg msg)
|
||||
{
|
||||
logger.Info(msg.ToString());
|
||||
//if (msg.Message.Equals("CONNECT"))
|
||||
//{
|
||||
// FingerMsg = !msg.Result;
|
||||
//}
|
||||
if (msg.Message.Equals("CONNECT"))
|
||||
{
|
||||
FingerMsg = !msg.Result;
|
||||
}
|
||||
if (LoginBtnEnable)
|
||||
{
|
||||
if (msg.Message.Equals("LOGIN"))
|
||||
|
|
|
@ -64,23 +64,22 @@ namespace DM_Weight.ViewModels
|
|||
IRegionManager _regionManager;
|
||||
IUnityContainer _container;
|
||||
//private CHKFunction _cHKFunction;
|
||||
public MainWindowViewModel(IRegionManager regionManager, IUnityContainer container, IEventAggregator eventAggregator, ScreenUtil screenUtil)
|
||||
public MainWindowViewModel(IRegionManager regionManager, IUnityContainer container, IEventAggregator eventAggregator)
|
||||
{
|
||||
//_portUtil = portUtil;
|
||||
this.eventAggregator = eventAggregator;
|
||||
this.eventAggregator.GetEvent<SnackbarEvent>().Subscribe(doMyPrismEvent2);
|
||||
_screenUtil = screenUtil;
|
||||
//_fingerprintUtil = fingerprintUtil;
|
||||
_regionManager = regionManager;
|
||||
_container = container;
|
||||
//_cHKFunction = cHKFunction;
|
||||
System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
{
|
||||
//System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
//{
|
||||
|
||||
_container.RegisterType<object, LoginWindow>("LoginWindow");
|
||||
_regionManager.RequestNavigate("MainRegion", "LoginWindow");
|
||||
_regionManager.RegisterViewWithRegion("MainRegion", "LoginWindow");
|
||||
|
||||
}));
|
||||
//}));
|
||||
}
|
||||
|
||||
void doMyPrismEvent2(AlertMsg msg)
|
||||
|
|
Loading…
Reference in New Issue