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