pry 2 år sedan
förälder
incheckning
f35f16fe7a
27 ändrade filer med 46 tillägg och 40 borttagningar
  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 Visa fil

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

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

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

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/GraphStar.xaml.cs Visa fil

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/NewConveyorBelt.xaml.cs Visa fil

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/NumberBox.cs Visa fil

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

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


+ 4
- 4
BPASmartClient.SCADAControl/CustomerControls/StatusLight.cs Visa fil

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

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheBlueProgressBar.cs Visa fil

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheComboBox.xaml.cs Visa fil

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

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheGreenProgressBar.cs Visa fil

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheListBox.xaml.cs Visa fil

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

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheProgressBar.cs Visa fil

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


+ 2
- 2
BPASmartClient.SCADAControl/CustomerControls/TheRadioButton.cs Visa fil

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

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheRedis.xaml.cs Visa fil

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheSlider.cs Visa fil

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


+ 1
- 1
BPASmartClient.SCADAControl/CustomerControls/TheTextBox.cs Visa fil

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


+ 4
- 1
BPASmartClient.SCADAControl/CustomerControls/TheTimer.cs Visa fil

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


+ 1
- 1
BPASmartClient.SCADAControl/Themes/Generic.xaml Visa fil

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

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

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


Laddar…
Avbryt
Spara