|
|
|
@ -17,28 +17,19 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 显示模态弹框
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static EButtonType ShowDialog(EButtonType buttons,string content,string title="")
|
|
|
|
|
public static EButtonType ShowDialog(EButtonType buttons,string content,string title="",bool warning=false)
|
|
|
|
|
{
|
|
|
|
|
if(!GlobalVar.DisableBuzzer)
|
|
|
|
|
if (warning)
|
|
|
|
|
{
|
|
|
|
|
Ops.On("蜂鸣器");
|
|
|
|
|
BuzzerManager.Instance.On();
|
|
|
|
|
}
|
|
|
|
|
LightManger.Instance.SetStatus(ELightStatus.Red);
|
|
|
|
|
LogHelper.Debug(content);
|
|
|
|
|
EButtonType ret = EButtonType.None;
|
|
|
|
|
FrmDialog fd = new FrmDialog();
|
|
|
|
|
ret = fd.ShowMessage(buttons, content, "",title);
|
|
|
|
|
if (!GlobalVar.DisableBuzzer)
|
|
|
|
|
{
|
|
|
|
|
Ops.Off("蜂鸣器");
|
|
|
|
|
}
|
|
|
|
|
if (MachineManage.Instance.MachineStatus== EMachineStatus.Stop)
|
|
|
|
|
if(warning)
|
|
|
|
|
{
|
|
|
|
|
LightManger.Instance.SetStatus(ELightStatus.Yellow);
|
|
|
|
|
}
|
|
|
|
|
else if(MachineManage.Instance.MachineStatus== EMachineStatus.Working)
|
|
|
|
|
{
|
|
|
|
|
LightManger.Instance.SetStatus(ELightStatus.Green);
|
|
|
|
|
BuzzerManager.Instance.Off();
|
|
|
|
|
}
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
@ -51,10 +42,11 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static EButtonType ShowDialog(AlarmEntity alarmInfo, EButtonType buttons)
|
|
|
|
|
{
|
|
|
|
|
if (!GlobalVar.DisableBuzzer)
|
|
|
|
|
{
|
|
|
|
|
Ops.On("蜂鸣器");
|
|
|
|
|
}
|
|
|
|
|
//if (!GlobalVar.DisableBuzzer)
|
|
|
|
|
//{
|
|
|
|
|
// Ops.On("蜂鸣器");
|
|
|
|
|
//}
|
|
|
|
|
BuzzerManager.Instance.On();
|
|
|
|
|
LightManger.Instance.SetStatus(ELightStatus.Red);
|
|
|
|
|
string logInfo = $"{alarmInfo.CN}";
|
|
|
|
|
LogHelper.Debug(logInfo);
|
|
|
|
@ -65,18 +57,19 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
boxList.Add(alarmInfo.AlarmID, fd);
|
|
|
|
|
ret = fd.ShowMessage(buttons, alarmInfo.CN,alarmInfo.EN);
|
|
|
|
|
boxList.Remove(alarmInfo.AlarmID);
|
|
|
|
|
if (!GlobalVar.DisableBuzzer)
|
|
|
|
|
{
|
|
|
|
|
Ops.Off("蜂鸣器");
|
|
|
|
|
}
|
|
|
|
|
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop)
|
|
|
|
|
{
|
|
|
|
|
LightManger.Instance.SetStatus(ELightStatus.Yellow);
|
|
|
|
|
}
|
|
|
|
|
else if (MachineManage.Instance.MachineStatus == EMachineStatus.Working)
|
|
|
|
|
{
|
|
|
|
|
LightManger.Instance.SetStatus(ELightStatus.Green);
|
|
|
|
|
}
|
|
|
|
|
//if (!GlobalVar.DisableBuzzer)
|
|
|
|
|
//{
|
|
|
|
|
// Ops.Off("蜂鸣器");
|
|
|
|
|
//}
|
|
|
|
|
//if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop)
|
|
|
|
|
//{
|
|
|
|
|
// LightManger.Instance.SetStatus(ELightStatus.Yellow);
|
|
|
|
|
//}
|
|
|
|
|
//else if (MachineManage.Instance.MachineStatus == EMachineStatus.Working)
|
|
|
|
|
//{
|
|
|
|
|
// LightManger.Instance.SetStatus(ELightStatus.Green);
|
|
|
|
|
//}
|
|
|
|
|
BuzzerManager.Instance.Off();
|
|
|
|
|
}
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|