CAN/LIN 导入和导出功能

This commit is contained in:
2026-04-09 21:56:22 +08:00
parent 48514b3162
commit 532374d1c4
46 changed files with 20232 additions and 109 deletions

View File

@@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
using CapMachine.Core;
using CapMachine.Model;
using CapMachine.Model.CANLIN;
@@ -152,12 +152,13 @@ namespace CapMachine.Wpf.ViewModels
}
/// <summary>
/// CAN/LIN配置变更事件处理
/// CAN/LIN 配置导入后刷新当前页面。
/// </summary>
/// <param name="msg"></param>
/// <param name="msg">事件消息。</param>
private void CanLinConfigChangedEventCall(string msg)
{
RefreshConfigList();
InitLoadCanConfigPro();
InitWriteRuleCbx();
}
/// <summary>
@@ -948,18 +949,12 @@ namespace CapMachine.Wpf.ViewModels
/// <exception cref="NotImplementedException"></exception>
private void SchEnableCmdCall(object par)
{
var dd = SelectedCANConfigExdDto.SchEnable;
var Result = (bool)par;
if (Result)
if (SelectedCANConfigExdDto == null)
{
CanDriveService.ToomossCanDrive.SchEnable = true;
return;
}
else
{
CanDriveService.ToomossCanDrive.SchEnable = false;
}
CanDriveService.ToomossCanDrive.SchEnable = SelectedCANConfigExdDto.SchEnable;
}
@@ -1362,22 +1357,22 @@ namespace CapMachine.Wpf.ViewModels
{ "SelectCanLinConfigProId",SelectCanLinConfigPro.Id},
}, (par) =>
{
if (par.Result == ButtonResult.OK)
{
////程序名称
ListCANScheduleConfigDto = par.Parameters.GetValue<ObservableCollection<CANScheduleConfigDto>>("ReturnValue");
//把更新后的最新值给当前的主集合中
SelectCanLinConfigPro.CanScheduleConfigs = Mapper.Map<List<CANScheduleConfig>>(ListCANScheduleConfigDto.ToList());
{
if (par.Result == ButtonResult.OK)
{
////程序名称
ListCANScheduleConfigDto = par.Parameters.GetValue<ObservableCollection<CANScheduleConfigDto>>("ReturnValue");
//把更新后的最新值给当前的主集合中
SelectCanLinConfigPro.CanScheduleConfigs = Mapper.Map<List<CANScheduleConfig>>(ListCANScheduleConfigDto.ToList());
}
else if (par.Result == ButtonResult.Cancel)
{
//取消
}
else if (par.Result == ButtonResult.Cancel)
{
//取消
}
}
});
});
}
else
{