fyf преди 2 години
родител
ревизия
f66b854335
променени са 2 файла, в които са добавени 4 реда и са изтрити 10 реда
  1. +1
    -1
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml
  2. +3
    -9
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs

+ 1
- 1
BeDesignerSCADA/Controls/MainCanvasPanel.xaml Целия файл

@@ -148,7 +148,7 @@
<icon:Material Kind="FileCode"/>
</ToggleButton>

<Slider DockPanel.Dock="Right" x:Name="slikl" Width="100" Maximum="16" Minimum="1" Margin="4 0 0 0" ValueChanged="Slider_ValueChanged"
<Slider DockPanel.Dock="Right" x:Name="slikl" Width="100" Maximum="16" Minimum="1" Margin="4 0 0 0"
HorizontalContentAlignment="Center" Value="{Binding ElementName=cav,Path=GridPxiel}" ></Slider>
<TextBlock DockPanel.Dock="Right" Text="对齐:" VerticalAlignment="Center" Margin="16 0 0 0"/>



+ 3
- 9
BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs Целия файл

@@ -39,7 +39,7 @@ namespace BeDesignerSCADA.Controls
/// 布局文件路径
/// </summary>
public string Path = string.Empty;
List<Type> controls = new List<Type>();
MainViewModelNew viewModel = new MainViewModelNew();
public MainCanvasPanel(string _Path)
{
@@ -50,7 +50,8 @@ namespace BeDesignerSCADA.Controls
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);
controls = assembly.GetTypes().Where(t => t.GetInterface("IExecutable") != null).OrderBy(o => o.Name)?.ToList();
//controls.Add(new Line().GetType());
CtlList.ItemsSource = controls;
//读取文件
FileRead(_Path);
@@ -588,12 +589,5 @@ namespace BeDesignerSCADA.Controls
// communication?.CommunicationDevices?.ToList().ForEach(x => { viewModel.DevNameList.Add(x.DeviceName); });
//}
#endregion

private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
}
}


}

Зареждане…
Отказ
Запис