Ver a proveniência

1

样式分支
fyf há 2 anos
ascendente
cometimento
d1451a579c
4 ficheiros alterados com 16 adições e 14 eliminações
  1. +2
    -2
      BPASmart.ConfigurationSoftware/MainWindowViewModel.cs
  2. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/StatusLight.cs
  3. +3
    -1
      BeDesignerSCADA/Adorners/SelectionAdorner.cs
  4. +10
    -10
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs

+ 2
- 2
BPASmart.ConfigurationSoftware/MainWindowViewModel.cs Ver ficheiro

@@ -77,8 +77,8 @@ namespace BPASmart.ConfigurationSoftware
var res = mainCanvasPanels.FirstOrDefault(p => p.PageName == o.ToString());
if (res != null)
{
ConstructorInfo cti = res.MainCanvasPanelModel.GetType()?.GetConstructor(System.Type.EmptyTypes);
MainContent = (FrameworkElement)cti?.Invoke(null);
//ConstructorInfo cti = res.MainCanvasPanelModel.GetType()?.GetConstructor(System.Type.EmptyTypes);
MainContent = res.MainCanvasPanelModel;// (FrameworkElement)cti?.Invoke(null);
}
});



+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/StatusLight.cs Ver ficheiro

@@ -72,7 +72,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
switch (StatusValue)
{
case 0:
image.Source = new BitmapImage(new Uri("pack://application:,,,/Images/State0.png", UriKind.Absolute));
image.Source = new BitmapImage(new Uri(@"/BPASmartClient.SCADAControl;component/Images/State0.png", UriKind.Absolute));
break;
case -1:
image.Source = new BitmapImage(new Uri("pack://application:,,,/Images/State11.png", UriKind.Absolute));


+ 3
- 1
BeDesignerSCADA/Adorners/SelectionAdorner.cs Ver ficheiro

@@ -28,7 +28,9 @@ namespace BeDesignerSCADA.Adorners
MouseDown += SelectionAdorner_MouseDown;
MouseMove += SelectionAdorner_MouseMove;
MouseUp += SelectionAdorner_MouseUp;

ResourceDictionary languageResDic = new ResourceDictionary();
languageResDic.Source = new Uri(@"/BeDesignerSCADA;component/Themes/Styles.xaml", UriKind.RelativeOrAbsolute);
this.Resources.MergedDictionaries.Add(languageResDic);
ContextMenu = FindResource("AdornerRightMenu") as ContextMenu;
Tag = CanvasPanel.GetParentObject<CanvasPanel>(AdornedElement);



+ 10
- 10
BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs Ver ficheiro

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


Carregando…
Cancelar
Guardar