Browse Source

1

样式分支
fyf 2 years ago
parent
commit
f66b854335
2 changed files with 4 additions and 10 deletions
  1. +1
    -1
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml
  2. +3
    -9
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs

+ 1
- 1
BeDesignerSCADA/Controls/MainCanvasPanel.xaml View File

@@ -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 View File

@@ -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)
{
}
}


}

Loading…
Cancel
Save