|
@@ -39,7 +39,7 @@ namespace BeDesignerSCADA.Controls |
|
|
/// 布局文件路径 |
|
|
/// 布局文件路径 |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public string Path = string.Empty; |
|
|
public string Path = string.Empty; |
|
|
|
|
|
|
|
|
|
|
|
List<Type> controls = new List<Type>(); |
|
|
MainViewModelNew viewModel = new MainViewModelNew(); |
|
|
MainViewModelNew viewModel = new MainViewModelNew(); |
|
|
public MainCanvasPanel(string _Path) |
|
|
public MainCanvasPanel(string _Path) |
|
|
{ |
|
|
{ |
|
@@ -50,7 +50,8 @@ namespace BeDesignerSCADA.Controls |
|
|
viewModel.Loaded(cav, runCanvas); |
|
|
viewModel.Loaded(cav, runCanvas); |
|
|
//控件加载 |
|
|
//控件加载 |
|
|
Assembly assembly = Assembly.LoadFile($"{System.AppDomain.CurrentDomain.BaseDirectory}\\BPASmartClient.SCADAControl.dll"); //Assembly.GetExecutingAssembly(); |
|
|
Assembly assembly = Assembly.LoadFile($"{System.AppDomain.CurrentDomain.BaseDirectory}\\BPASmartClient.SCADAControl.dll"); //Assembly.GetExecutingAssembly(); |
|
|
var controls = assembly.GetTypes().Where(t => t.GetInterface("IExecutable") != null).OrderBy(o => o.Name); |
|
|
|
|
|
|
|
|
controls = assembly.GetTypes().Where(t => t.GetInterface("IExecutable") != null).OrderBy(o => o.Name)?.ToList(); |
|
|
|
|
|
//controls.Add(new Line().GetType()); |
|
|
CtlList.ItemsSource = controls; |
|
|
CtlList.ItemsSource = controls; |
|
|
//读取文件 |
|
|
//读取文件 |
|
|
FileRead(_Path); |
|
|
FileRead(_Path); |
|
@@ -588,12 +589,5 @@ namespace BeDesignerSCADA.Controls |
|
|
// communication?.CommunicationDevices?.ToList().ForEach(x => { viewModel.DevNameList.Add(x.DeviceName); }); |
|
|
// communication?.CommunicationDevices?.ToList().ForEach(x => { viewModel.DevNameList.Add(x.DeviceName); }); |
|
|
//} |
|
|
//} |
|
|
#endregion |
|
|
#endregion |
|
|
|
|
|
|
|
|
private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |