关抽屉后去掉完成与取消按钮。自动退出通过promise方法
This commit is contained in:
parent
8478ac3626
commit
98e770854e
|
@ -67,6 +67,8 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
//保存库存
|
||||
SaveStock();
|
||||
RequestData();
|
||||
Status = 0;
|
||||
break;
|
||||
// 数量变化
|
||||
case EventType.UPDATEQUANTITY:
|
||||
|
@ -212,8 +214,6 @@ namespace DM_Weight.ViewModels
|
|||
logger.Info($"库存已更新{it.DrugId},{it.Quantity+it.AddQuantity}");
|
||||
}
|
||||
});
|
||||
RequestData();
|
||||
Status = 0;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -73,6 +73,8 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
//保存库存
|
||||
SaveStock();
|
||||
RequestData();
|
||||
Status = 0;
|
||||
break;
|
||||
// 数量变化
|
||||
case EventType.UPDATEQUANTITY:
|
||||
|
@ -211,8 +213,6 @@ namespace DM_Weight.ViewModels
|
|||
logger.Info($"库存已更新{it.DrugId},{it.Quantity - it.TakeQuantity}");
|
||||
}
|
||||
});
|
||||
RequestData();
|
||||
Status = 0;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -549,7 +549,7 @@ namespace DM_Weight.ViewModels
|
|||
// 无人操作鼠标键盘
|
||||
if ((DateTime.Now - _portUtil.dateTime).TotalSeconds > autoExit && CheckComputerFreeState.GetLastInputTime() > autoExit)
|
||||
{
|
||||
logger.Info($"设备30秒内无人操作,用户【{Operator?.Nickname}】自动退出登录,_portUtil.Operate:{_portUtil.Operate},totalSecond:{(DateTime.Now - _portUtil.dateTime).TotalSeconds},lastInputTime:{CheckComputerFreeState.GetLastInputTime()},autoExit:{autoExit}");
|
||||
logger.Info($"设备{autoExit}内无人操作,用户【{Operator?.Nickname}】自动退出登录,_portUtil.Operate:{_portUtil.Operate},totalSecond:{(DateTime.Now - _portUtil.dateTime).TotalSeconds},lastInputTime:{CheckComputerFreeState.GetLastInputTime()},autoExit:{autoExit}");
|
||||
|
||||
Operator = null;
|
||||
Reviewer = null;
|
||||
|
|
|
@ -17,6 +17,7 @@ using DM_Weight.Views;
|
|||
using Unity;
|
||||
using log4net.Repository.Hierarchy;
|
||||
using log4net;
|
||||
using System.Windows;
|
||||
|
||||
namespace DM_Weight.ViewModels
|
||||
{
|
||||
|
@ -86,19 +87,23 @@ namespace DM_Weight.ViewModels
|
|||
|
||||
void doMyPrismEvent2(AlertMsg msg)
|
||||
{
|
||||
switch (msg.Type)
|
||||
Application.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
case MsgType.INFO:
|
||||
this.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#00e676"));
|
||||
break;
|
||||
case MsgType.ERROR:
|
||||
this.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#b71c1c"));
|
||||
break;
|
||||
default:
|
||||
this.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#00e676"));
|
||||
break;
|
||||
}
|
||||
SnackbarMessageQueue.Enqueue(msg.Message);
|
||||
switch (msg.Type)
|
||||
{
|
||||
case MsgType.INFO:
|
||||
this.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#00e676"));
|
||||
break;
|
||||
case MsgType.ERROR:
|
||||
this.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#b71c1c"));
|
||||
break;
|
||||
default:
|
||||
this.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#00e676"));
|
||||
break;
|
||||
}
|
||||
|
||||
SnackbarMessageQueue.Enqueue(msg.Message);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue