Commit 9b7d6fbc 张东亮

添加立即处理状态

1 个父辈 85f89f2e
......@@ -93,6 +93,8 @@ namespace DeviceLibrary
return "W=";
case MsgLevel.alarm:
return "A=";
case MsgLevel.critical:
return "C=";
}
return "";
......
......@@ -347,7 +347,8 @@ namespace DeviceLibrary
warning,
info,
alarm
alarm,
critical,
}
public enum ErrInfo
{
......
......@@ -153,20 +153,33 @@ namespace DeviceLibrary
}
public static void UserPause(bool userpause)
{
UserPause("", userpause);
UserPause("", userpause,false);
}
public static void UserPause(string msg="",bool userpause=true) {
UserPauseSet?.Invoke(null, userpause);
mainMachine.UserPause = userpause;
public static void UserPause(string msg="",bool userpause=true,bool upload=true) {
if (userpause)
{
if(string.IsNullOrEmpty(msg))
{
if(upload)
{
Msg.add("用户暂停", MsgLevel.critical);
}
LogUtil.info("用户暂停");
}
else
LogUtil.info("系统暂停: "+msg);
{
if (upload)
{
Msg.add("系统暂停: " + msg, MsgLevel.critical);
}
LogUtil.info("系统暂停: " + msg);
}
}
else
LogUtil.info("用户取消暂停");
UserPauseSet?.Invoke(null, userpause);
mainMachine.UserPause = userpause;
}
public static void IgnoreSafecheck(bool s)
{
......
......@@ -468,7 +468,7 @@ namespace TheMachine
private void btn_opendoor_Click(object sender, EventArgs e)
{
LogUtil.info("用户点击打开舱门");
RobotManage.UserPause(true);
RobotManage.UserPause("打开舱门", true);
FrmReleaseDoor frmReleaseDoor = new FrmReleaseDoor();
frmReleaseDoor.ShowDialog();
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!