CAN设置添加

This commit is contained in:
hsc
2026-07-02 15:36:55 +08:00
parent 63f43853fa
commit 60dc155ccf
20 changed files with 1250 additions and 413 deletions

View File

@@ -59,10 +59,9 @@ namespace SettingModule.ViewModels
public ObservableCollection<string> ConnectionTypes { get; } = new()
{
"None", "Tcp", "Serial"
"None", "Tcp", "Serial", "CAN"
};
#endregion
#region
public ICommand RefreshCommand { get; }
public ICommand SaveCommand { get; }
@@ -165,6 +164,7 @@ namespace SettingModule.ViewModels
{
"Tcp" => "TCPConfig",
"Serial" => "SerialPortConfig",
"CAN" => "CANConfig",
_ => string.Empty
};
@@ -200,6 +200,7 @@ namespace SettingModule.ViewModels
_scope = _globalInfo.ScopeDic[TestStatus];
_scopedContext = _globalInfo.ContextDic[TestStatus];
SystemConfig = _scope.Resolve<SystemConfig>();
ConfigService.EnsureDefaultCanDevice(SystemConfig);
if (DeviceList != null && DeviceList.Count > 0)
{
SelectedDevice = DeviceList[0];