逻辑规则无法弹窗修复问题
This commit is contained in:
@@ -101,6 +101,8 @@ namespace CapMachine.Wpf
|
|||||||
|
|
||||||
containerRegistry.RegisterSingleton<ConfigService>();
|
containerRegistry.RegisterSingleton<ConfigService>();
|
||||||
containerRegistry.RegisterSingleton<AlarmService>();
|
containerRegistry.RegisterSingleton<AlarmService>();
|
||||||
|
containerRegistry.RegisterSingleton<LogicRuleService>();
|
||||||
|
|
||||||
////注册设备服务
|
////注册设备服务
|
||||||
//containerRegistry.RegisterSingleton<MachineDataService>();
|
//containerRegistry.RegisterSingleton<MachineDataService>();
|
||||||
containerRegistry.RegisterSingleton<CanDriveService>();
|
containerRegistry.RegisterSingleton<CanDriveService>();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
namespace CapMachine.Wpf.Services
|
namespace CapMachine.Wpf.Services
|
||||||
{
|
{
|
||||||
@@ -61,6 +62,14 @@ namespace CapMachine.Wpf.Services
|
|||||||
case "过热度/过冷度配置":
|
case "过热度/过冷度配置":
|
||||||
ShowSuperHeatCool(msg.Par);
|
ShowSuperHeatCool(msg.Par);
|
||||||
break;
|
break;
|
||||||
|
case "规则转换":
|
||||||
|
if (SysRunServer.MachineRunState1.IsRunState)
|
||||||
|
{
|
||||||
|
MessageBox.Show("请不要在运行时编辑规则转换,此时更改可能导致运行出错,请停止后再编辑");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ShowLogicRule(msg.Par);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -94,6 +103,40 @@ namespace CapMachine.Wpf.Services
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 过热度和过冷度配置弹窗
|
||||||
|
/// </summary>
|
||||||
|
private void ShowLogicRule(object par)
|
||||||
|
{
|
||||||
|
//弹窗
|
||||||
|
DialogService.ShowDialog("DialogLogicRuleView", new DialogParameters() { { "Name", par } }, (par) =>
|
||||||
|
{
|
||||||
|
if (par.Result == ButtonResult.OK)
|
||||||
|
{
|
||||||
|
//保存配置信息
|
||||||
|
//PPCService.SaveSuperHeatCoolConfig();
|
||||||
|
|
||||||
|
//是否改变规格
|
||||||
|
var ReturnValue = par.Parameters.GetValue<bool>("IsRuleEdit");
|
||||||
|
if (ReturnValue)
|
||||||
|
{
|
||||||
|
MessageBox.Show("检测到你已经改变了规则,CAN或者LIN配置中如果已经加载规则或者连接的话,则会出现错误,那么你需要重启软件");
|
||||||
|
//逻辑可能更改了
|
||||||
|
EventAggregator.GetEvent<LogicRuleChangeEvent>().Publish("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (par.Result == ButtonResult.Cancel)
|
||||||
|
{
|
||||||
|
//取消
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user