From 412b56935c12b13704ae718cd1e5bf95c4efc593 Mon Sep 17 00:00:00 2001 From: hsc Date: Thu, 9 Jul 2026 16:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8A=A0=E8=BD=BDdbc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CANModule/ViewModels/ZLGCANFDViewModel.cs | 16 +++---- CANModule/Views/ZLGCANFDView.xaml | 2 +- UIShare/GlobalVariable/DeviceManager.cs | 58 ++++++++++++++++++++++- UIShare/GlobalVariable/SystemConfig.cs | 2 +- UIShare/PubEvent/DBCFileNotFoundEvent.cs | 17 +++++++ 5 files changed, 83 insertions(+), 12 deletions(-) create mode 100644 UIShare/PubEvent/DBCFileNotFoundEvent.cs diff --git a/CANModule/ViewModels/ZLGCANFDViewModel.cs b/CANModule/ViewModels/ZLGCANFDViewModel.cs index 9688c8a..67ec38c 100644 --- a/CANModule/ViewModels/ZLGCANFDViewModel.cs +++ b/CANModule/ViewModels/ZLGCANFDViewModel.cs @@ -164,9 +164,9 @@ namespace CANModule.ViewModels set => SetProperty(ref _IsSaved, value); } - public ObservableCollection dbcAutoLoadList + public ObservableCollection DBCAutoLoadList { - get => _systemConfig?.dbcAutoLoadList ?? new ObservableCollection(); + get => _systemConfig?.DBCAutoLoadList ?? new ObservableCollection(); } private AutoDBCLoadItem _SelectedDcAutoLoad; @@ -360,7 +360,7 @@ namespace CANModule.ViewModels RaisePropertyChanged(nameof(BLFPath)); RaisePropertyChanged(nameof(DBCPath)); - RaisePropertyChanged(nameof(dbcAutoLoadList)); + RaisePropertyChanged(nameof(DBCAutoLoadList)); } public override void OnNavigatedFrom(NavigationContext navigationContext) @@ -413,7 +413,7 @@ namespace CANModule.ViewModels { if (SelectedDcAutoLoad != null) { - dbcAutoLoadList.Remove(SelectedDcAutoLoad); + DBCAutoLoadList.Remove(SelectedDcAutoLoad); } } @@ -491,10 +491,10 @@ namespace CANModule.ViewModels if (re && IsSaved) { - var item = dbcAutoLoadList.FirstOrDefault(s => s.DBCChannel == DBCChannel); + var item = DBCAutoLoadList.FirstOrDefault(s => s.DBCChannel == DBCChannel); if (item == null) { - dbcAutoLoadList.Add(new AutoDBCLoadItem + DBCAutoLoadList.Add(new AutoDBCLoadItem { DBCFilePath = DBCPath, DBCChannel = DBCChannel @@ -502,8 +502,8 @@ namespace CANModule.ViewModels } else { - dbcAutoLoadList.Remove(item); - dbcAutoLoadList.Add(new AutoDBCLoadItem + DBCAutoLoadList.Remove(item); + DBCAutoLoadList.Add(new AutoDBCLoadItem { DBCFilePath = DBCPath, DBCChannel = DBCChannel diff --git a/CANModule/Views/ZLGCANFDView.xaml b/CANModule/Views/ZLGCANFDView.xaml index 3c5a562..b063f7c 100644 --- a/CANModule/Views/ZLGCANFDView.xaml +++ b/CANModule/Views/ZLGCANFDView.xaml @@ -124,7 +124,7 @@