|
|
@@ -345,7 +345,13 @@ namespace BeDesignerSCADA.Controls |
|
|
|
{ |
|
|
|
System.Windows.Controls.ComboBox toggle = (System.Windows.Controls.ComboBox)sender; |
|
|
|
if (toggle.Tag == null) return; |
|
|
|
CommunicationModel mode=viewModel.communicationPar?.CommunicationDevices?.ToList().Find(par => par.DeviceName == toggle.Tag.ToString()); |
|
|
|
|
|
|
|
CommunicationPar communication = null; |
|
|
|
if (DataBusModel.GetInstance().KeyValues.ContainsKey(viewModel.VariablePath)) |
|
|
|
{ |
|
|
|
communication = DataBusModel.GetInstance().KeyValues[viewModel.VariablePath]; |
|
|
|
} |
|
|
|
CommunicationModel mode= communication?.CommunicationDevices?.ToList().Find(par => par.DeviceName == toggle.Tag.ToString()); |
|
|
|
if (mode != null) |
|
|
|
{ |
|
|
|
mode?.VarTableModels?.ToList().ForEach(par => { viewModel.DevValueList.Add(par.VarName); }); |
|
|
@@ -391,7 +397,12 @@ namespace BeDesignerSCADA.Controls |
|
|
|
private void namebox_DropDownOpened(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
viewModel.DevNameList = new System.Collections.ObjectModel.ObservableCollection<string>(); |
|
|
|
viewModel.communicationPar?.CommunicationDevices?.ToList().ForEach(x => { viewModel.DevNameList.Add(x.DeviceName); }); |
|
|
|
CommunicationPar communication = null; |
|
|
|
if (DataBusModel.GetInstance().KeyValues.ContainsKey(viewModel.VariablePath)) |
|
|
|
{ |
|
|
|
communication = DataBusModel.GetInstance().KeyValues[viewModel.VariablePath]; |
|
|
|
} |
|
|
|
communication?.CommunicationDevices?.ToList().ForEach(x => { viewModel.DevNameList.Add(x.DeviceName); }); |
|
|
|
} |
|
|
|
#endregion |
|
|
|
} |
|
|
|