pry 2 years ago
parent
commit
f35f16fe7a
27 changed files with 46 additions and 40 deletions
  1. +1
    -0
      BPASmart.ConfigurationSoftware/MainWindow.xaml
  2. +2
    -2
      BPASmart.ConfigurationSoftware/MainWindowViewModel.cs
  3. +2
    -2
      BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj
  4. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/GraphArrow.xaml.cs
  5. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/GraphStar.xaml.cs
  6. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/NewConveyorBelt.xaml.cs
  7. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/NumberBox.cs
  8. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/Silos.xaml.cs
  9. +4
    -4
      BPASmartClient.SCADAControl/CustomerControls/StatusLight.cs
  10. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheAPI.xaml.cs
  11. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheBlueProgressBar.cs
  12. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheComboBox.xaml.cs
  13. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheDataGrid.xaml.cs
  14. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheGreenProgressBar.cs
  15. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheListBox.xaml.cs
  16. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheMQTT.xaml.cs
  17. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheProgressBar.cs
  18. +2
    -2
      BPASmartClient.SCADAControl/CustomerControls/TheRadioButton.cs
  19. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheRedProgressBar.cs
  20. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheRedis.xaml.cs
  21. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheSlider.cs
  22. +1
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheTextBox.cs
  23. +4
    -1
      BPASmartClient.SCADAControl/CustomerControls/TheTimer.cs
  24. +0
    -0
      BPASmartClient.SCADAControl/Images/btnkeys.png
  25. +1
    -1
      BPASmartClient.SCADAControl/Themes/Generic.xaml
  26. +3
    -1
      BeDesignerSCADA/Adorners/SelectionAdorner.cs
  27. +10
    -10
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs

+ 1
- 0
BPASmart.ConfigurationSoftware/MainWindow.xaml View File

@@ -6,6 +6,7 @@
xmlns:local="clr-namespace:BPASmart.ConfigurationSoftware"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
WindowState="Maximized"
Width="800"
Height="450"
Topmost="False"


+ 2
- 2
BPASmart.ConfigurationSoftware/MainWindowViewModel.cs View File

@@ -85,8 +85,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);
}
});



+ 2
- 2
BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj View File

@@ -13,7 +13,7 @@
<None Remove="Images\api.png" />
<None Remove="Images\biogebj.png" />
<None Remove="Images\bj.png" />
<None Remove="Images\btnnormal.png" />
<None Remove="Images\btnkeys.png" />
<None Remove="Images\button1.png" />
<None Remove="Images\button2.png" />
<None Remove="Images\Cb_Checked.png" />
@@ -70,7 +70,7 @@
<Resource Include="Images\bj.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\btnnormal.png">
<Resource Include="Images\btnkeys.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Cb_Checked.png">


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/GraphArrow.xaml.cs View File

@@ -45,7 +45,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
{
IsEnabled = true;
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/GraphStar.xaml.cs View File

@@ -45,7 +45,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
{
IsEnabled = true;
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/NewConveyorBelt.xaml.cs View File

@@ -105,7 +105,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
{
IsEnabled = true;
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/NumberBox.cs View File

@@ -71,7 +71,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
{
IsEnabled = true;
Register();
Style = null;
//Style = null;
Focusable = true;
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/Silos.xaml.cs View File

@@ -111,7 +111,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
{
IsEnabled = true;
Register();
Style = null;
//Style = null;
}
}
}


+ 4
- 4
BPASmartClient.SCADAControl/CustomerControls/StatusLight.cs View File

@@ -72,16 +72,16 @@ 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.Relative));
break;
case -1:
image.Source = new BitmapImage(new Uri("pack://application:,,,/Images/State11.png", UriKind.Absolute));
image.Source = new BitmapImage(new Uri(@"/BPASmartClient.SCADAControl;component/Images/State11.png", UriKind.Relative));
break;
case 1:
image.Source = new BitmapImage(new Uri("pack://application:,,,/Images/State1.png", UriKind.Absolute));
image.Source = new BitmapImage(new Uri(@"/BPASmartClient.SCADAControl;component/Images/State1.png", UriKind.Relative));
break;
case 2:
image.Source = new BitmapImage(new Uri("pack://application:,,,/Images/State2.png", UriKind.Absolute));
image.Source = new BitmapImage(new Uri(@"/BPASmartClient.SCADAControl;component/Images/State2.png", UriKind.Relative));
break;
default:
break;


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheAPI.xaml.cs View File

@@ -86,7 +86,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheBlueProgressBar.cs View File

@@ -46,7 +46,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheComboBox.xaml.cs View File

@@ -61,7 +61,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
Focusable = true;
IsEnabled = true;
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheDataGrid.xaml.cs View File

@@ -59,7 +59,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
isExecuteState = value;
if (IsExecuteState)
{
Style = null;
//Style = null;
Register();
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheGreenProgressBar.cs View File

@@ -47,7 +47,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheListBox.xaml.cs View File

@@ -73,7 +73,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
isExecuteState = value;
if (IsExecuteState)
{
Style = null;
//Style = null;
Register();
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheMQTT.xaml.cs View File

@@ -108,7 +108,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheProgressBar.cs View File

@@ -50,7 +50,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 2
- 2
BPASmartClient.SCADAControl/CustomerControls/TheRadioButton.cs View File

@@ -26,7 +26,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
ResourceDictionary languageResDic = new ResourceDictionary();
languageResDic.Source = new Uri(@"/BPASmartClient.SCADAControl;component/Themes/Generic.xaml",UriKind.RelativeOrAbsolute);
this.Resources.MergedDictionaries.Add(languageResDic);
//SetCurrentValue(ContentProperty, "单选按钮");
SetCurrentValue(ContentProperty, "单选按钮");
}
static TheRadioButton()
{
@@ -45,7 +45,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheRedProgressBar.cs View File

@@ -47,7 +47,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheRedis.xaml.cs View File

@@ -108,7 +108,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheSlider.cs View File

@@ -38,7 +38,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheTextBox.cs View File

@@ -93,7 +93,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
IsEnabled = true;
Focusable = true;
Register();
Style = null;
//Style = null;
}
}
}


+ 4
- 1
BPASmartClient.SCADAControl/CustomerControls/TheTimer.cs View File

@@ -27,6 +27,9 @@ namespace BPASmartClient.SCADAControl.CustomerControls
{
Width = 40;
Height = 40;
ResourceDictionary languageResDic = new ResourceDictionary();
languageResDic.Source = new Uri(@"/BPASmartClient.SCADAControl;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute);
this.Resources.MergedDictionaries.Add(languageResDic);
}
static TheTimer()
{
@@ -46,7 +49,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls
if (IsExecuteState)
{
Register();
Style = null;
//Style = null;
}
}
}


BPASmartClient.SCADAControl/Images/btnnormal.png → BPASmartClient.SCADAControl/Images/btnkeys.png View File


+ 1
- 1
BPASmartClient.SCADAControl/Themes/Generic.xaml View File

@@ -1431,7 +1431,7 @@
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="../Images/btnnormal.png" />
<ImageBrush ImageSource="/BPASmartClient.SCADAControl;component/Images/btnkeys.png" />
</Setter.Value>
</Setter>
<Setter Property="Padding" Value="2,0,0,0" />


+ 3
- 1
BeDesignerSCADA/Adorners/SelectionAdorner.cs View File

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

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


Loading…
Cancel
Save