소스 검색

1

样式分支
fyf 2 년 전
부모
커밋
d1451a579c
4개의 변경된 파일16개의 추가작업 그리고 14개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

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


불러오는 중...
취소
저장