自动加载dbc
This commit is contained in:
@@ -164,9 +164,9 @@ namespace CANModule.ViewModels
|
||||
set => SetProperty(ref _IsSaved, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<AutoDBCLoadItem> dbcAutoLoadList
|
||||
public ObservableCollection<AutoDBCLoadItem> DBCAutoLoadList
|
||||
{
|
||||
get => _systemConfig?.dbcAutoLoadList ?? new ObservableCollection<AutoDBCLoadItem>();
|
||||
get => _systemConfig?.DBCAutoLoadList ?? new ObservableCollection<AutoDBCLoadItem>();
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<Label Content="加载记录保存"
|
||||
VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
<DataGrid ItemsSource="{Binding dbcAutoLoadList}"
|
||||
<DataGrid ItemsSource="{Binding DBCAutoLoadList}"
|
||||
Width="650"
|
||||
IsReadOnly="True"
|
||||
AutoGenerateColumns="False"
|
||||
|
||||
Reference in New Issue
Block a user