LIN Schedule
This commit is contained in:
@@ -120,7 +120,6 @@ namespace CapMachine.Wpf.ViewModels
|
||||
/// </summary>
|
||||
public IDialogService DialogService { get; }
|
||||
|
||||
|
||||
private ObservableCollection<CbxItems> _WriteRuleCbxItems;
|
||||
/// <summary>
|
||||
/// 写入的规格集合
|
||||
@@ -232,10 +231,14 @@ namespace CapMachine.Wpf.ViewModels
|
||||
}
|
||||
|
||||
//调度表配置信息
|
||||
if (SelectCanLinConfigPro.CanScheduleConfigs != null && SelectCanLinConfigPro.CanScheduleConfigs.Count() > 0)
|
||||
if (SelectCanLinConfigPro.LinScheduleConfigs != null && SelectCanLinConfigPro.LinScheduleConfigs.Count() > 0)
|
||||
{
|
||||
ListLINScheduleConfigDto = new ObservableCollection<LINScheduleConfigDto>(Mapper.Map<List<LINScheduleConfigDto>>(SelectCanLinConfigPro.LinScheduleConfigs));
|
||||
}
|
||||
else
|
||||
{
|
||||
ListLINScheduleConfigDto = new ObservableCollection<LINScheduleConfigDto>();
|
||||
}
|
||||
|
||||
//匹配选中的SelectCanLinConfigPro.CanLinConfigContents和ListLinLdfModel
|
||||
MatchSeletedAndLinLdfModel();
|
||||
@@ -601,7 +604,7 @@ namespace CapMachine.Wpf.ViewModels
|
||||
SelectCanLinConfigProConfigName = SelectCanLinConfigPro.ConfigName;
|
||||
|
||||
//调度表配置信息
|
||||
if (SelectCanLinConfigPro.CanScheduleConfigs != null && SelectCanLinConfigPro.CanScheduleConfigs.Count() > 0)
|
||||
if (SelectCanLinConfigPro.LinScheduleConfigs != null && SelectCanLinConfigPro.LinScheduleConfigs.Count() > 0)
|
||||
{
|
||||
ListLINScheduleConfigDto = new ObservableCollection<LINScheduleConfigDto>(Mapper.Map<List<LINScheduleConfigDto>>(SelectCanLinConfigPro.LinScheduleConfigs));
|
||||
}
|
||||
@@ -1235,8 +1238,6 @@ namespace CapMachine.Wpf.ViewModels
|
||||
InitLoadLinConfigPro();
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
case "Delete":
|
||||
if (SelectedWriteCanLinRWConfigDto != null)
|
||||
@@ -1257,41 +1258,41 @@ namespace CapMachine.Wpf.ViewModels
|
||||
break;
|
||||
case "WriteSch"://调度表
|
||||
|
||||
LinDriveService.ToomossLinDrive.LinTest();
|
||||
//LinDriveService.ToomossLinDrive.LinTest();
|
||||
|
||||
LinDriveService.ToomossLinDrive.StartSchedule();
|
||||
break;
|
||||
//
|
||||
if (LinDriveService.ToomossLinDrive.OpenState)
|
||||
{
|
||||
//弹窗
|
||||
DialogService.ShowDialog("DialogLINSchConfigView", new DialogParameters() {
|
||||
{"ListMsg", LinDriveService.CmdData.GroupBy(a=>a.MsgName).Select(a=>a.Key).ToList() },
|
||||
{ "ListLINScheduleConfigDto",ListLINScheduleConfigDto},
|
||||
{ "SelectCanLinConfigProId",SelectCanLinConfigPro.Id},
|
||||
|
||||
//var data = LinDriveService.CmdData.GroupBy(a => a.MsgName).Select(a => a.Key).ToList();
|
||||
}, (par) =>
|
||||
{
|
||||
if (par.Result == ButtonResult.OK)
|
||||
{
|
||||
////程序名称
|
||||
ListLINScheduleConfigDto = par.Parameters.GetValue<ObservableCollection<LINScheduleConfigDto>>("ReturnValue");
|
||||
//把更新后的最新值给当前的主集合中
|
||||
SelectCanLinConfigPro.LinScheduleConfigs = Mapper.Map<List<LINScheduleConfig>>(ListLINScheduleConfigDto.ToList());
|
||||
|
||||
//if (data != null && data.Count > 0)
|
||||
//{
|
||||
// //弹窗
|
||||
// DialogService.ShowDialog("DialogLINSchConfigView", new DialogParameters() {
|
||||
// {"ListMsg", LinDriveService.CmdData.GroupBy(a=>a.MsgName).Select(a=>a.Key).ToList() },
|
||||
// { "ListLINScheduleConfigDto",ListLINScheduleConfigDto},
|
||||
// { "SelectCanLinConfigProId",SelectCanLinConfigPro.Id},
|
||||
}
|
||||
else if (par.Result == ButtonResult.Cancel)
|
||||
{
|
||||
//取消
|
||||
|
||||
// }, (par) =>
|
||||
// {
|
||||
// if (par.Result == ButtonResult.OK)
|
||||
// {
|
||||
// ////程序名称
|
||||
// ListLINScheduleConfigDto = par.Parameters.GetValue<ObservableCollection<LINScheduleConfigDto>>("ReturnValue");
|
||||
// //把更新后的最新值给当前的主集合中
|
||||
// SelectCanLinConfigPro.LinScheduleConfigs = Mapper.Map<List<LINScheduleConfig>>(ListLINScheduleConfigDto.ToList());
|
||||
}
|
||||
|
||||
// }
|
||||
// else if (par.Result == ButtonResult.Cancel)
|
||||
// {
|
||||
// //取消
|
||||
|
||||
// }
|
||||
|
||||
// });
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// System.Windows.MessageBox.Show("未发现写入的执行的命令数据,无法配置?", "提示", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Hand);
|
||||
//}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Windows.MessageBox.Show("未发现写入的执行的命令数据,无法配置?", "提示", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Hand);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user