|
|
@@ -367,10 +367,8 @@ namespace BeDesignerSCADA |
|
|
|
{ |
|
|
|
System.Windows.Controls.ComboBox toggle = (System.Windows.Controls.ComboBox)sender; |
|
|
|
Xceed.Wpf.Toolkit.PropertyGrid.PropertyItem propertyGridCommand = toggle.DataContext as Xceed.Wpf.Toolkit.PropertyGrid.PropertyItem; |
|
|
|
if (toggle.Tag != null) |
|
|
|
if (toggle.Tag != null && !string.IsNullOrEmpty(toggle.Text)) |
|
|
|
propertyGridCommand.Value = "{" + $"Binding {toggle.Tag}.{toggle.Text}" + "}"; |
|
|
|
else |
|
|
|
propertyGridCommand.Value = "{" + $"Binding {toggle.Tag}." + "}"; |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
@@ -389,7 +387,6 @@ namespace BeDesignerSCADA |
|
|
|
try |
|
|
|
{ |
|
|
|
viewModel.DevValueList = new System.Collections.ObjectModel.ObservableCollection<string>(); |
|
|
|
|
|
|
|
if (sender is System.Windows.Controls.ComboBox) |
|
|
|
{ |
|
|
|
System.Windows.Controls.ComboBox toggle = (System.Windows.Controls.ComboBox)sender; |
|
|
@@ -406,6 +403,7 @@ namespace BeDesignerSCADA |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 设备名称选择 |
|
|
|
/// </summary> |
|
|
@@ -419,9 +417,9 @@ namespace BeDesignerSCADA |
|
|
|
{ |
|
|
|
System.Windows.Controls.ComboBox toggle = (System.Windows.Controls.ComboBox)sender; |
|
|
|
Xceed.Wpf.Toolkit.PropertyGrid.PropertyItem propertyGridCommand = toggle.DataContext as Xceed.Wpf.Toolkit.PropertyGrid.PropertyItem; |
|
|
|
if(toggle.Tag!=null) |
|
|
|
if(toggle.Tag!=null && !string.IsNullOrEmpty(toggle.Text)) |
|
|
|
propertyGridCommand.Value = "{" + $"Binding {toggle.Text}.{toggle.Tag}" + "}"; |
|
|
|
else |
|
|
|
else if(!string.IsNullOrEmpty(toggle.Text)) |
|
|
|
propertyGridCommand.Value = "{" + $"Binding {toggle.Text}." + "}"; |
|
|
|
|
|
|
|
} |
|
|
@@ -432,7 +430,6 @@ namespace BeDesignerSCADA |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void namebox_DropDownOpened(object sender,EventArgs e) |
|
|
|
{ |
|
|
|
viewModel.DevNameList = new System.Collections.ObjectModel.ObservableCollection<string>(); |
|
|
|