|
|
@@ -49,16 +49,16 @@ namespace BeDesignerSCADA.Controls |
|
|
|
//读取文件 |
|
|
|
FileRead(_Path); |
|
|
|
} |
|
|
|
public MainCanvasPanel() |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
this.DataContext = viewModel; |
|
|
|
viewModel.Loaded(cav, runCanvas); |
|
|
|
//控件加载 |
|
|
|
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); |
|
|
|
CtlList.ItemsSource = controls; |
|
|
|
} |
|
|
|
//public MainCanvasPanel() |
|
|
|
//{ |
|
|
|
// InitializeComponent(); |
|
|
|
// this.DataContext = viewModel; |
|
|
|
// viewModel.Loaded(cav, runCanvas); |
|
|
|
// //控件加载 |
|
|
|
// 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); |
|
|
|
// CtlList.ItemsSource = controls; |
|
|
|
//} |
|
|
|
|
|
|
|
#region 位置调整 |
|
|
|
/// <summary> |
|
|
|