From 98ba49489d5dcbe73d4a11c9a2751c3ff75fac1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A6=82=E6=84=8F=20=E5=BD=AD?= <2417589739@qq.com>
Date: Thu, 27 Apr 2023 17:33:01 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Pages/View/MainView.xaml | 51 +++--
.../Resource/MyStyle.xaml | 113 ++++++++++
.../View/BomOfMaterialView.xaml | 213 ++++++++++++++----
.../View/DeviceMaterialParView.xaml | 129 ++---------
.../View/ManualControlView.xaml | 4 +-
.../View/NewLocalRecipeView.xaml | 2 +-
.../View/PlcVarMonitorView.xaml | 196 ++++++++++++----
.../View/ProcessMonitorView.xaml | 175 ++++++++++----
.../View/RecipeInfosView.xaml | 162 ++++++++++---
.../View/RecipeReceiveView.xaml | 24 +-
.../View/SiemensRecipeReceiveView.xaml | 6 +-
.../View/StockBinRawMaterialView.xaml | 205 ++++++++++-------
.../View/SystemParView.xaml | 146 +++++++++---
.../View/WindSendParView.xaml | 168 ++++++++++----
.../ViewModel/ManualControlViewModel.cs | 91 ++++++--
15 files changed, 1173 insertions(+), 512 deletions(-)
create mode 100644 BPASmartClient.JXJFoodSmallStation/Resource/MyStyle.xaml
diff --git a/BPASmartClient.CustomResource/Pages/View/MainView.xaml b/BPASmartClient.CustomResource/Pages/View/MainView.xaml
index fb4ce75c..4577d212 100644
--- a/BPASmartClient.CustomResource/Pages/View/MainView.xaml
+++ b/BPASmartClient.CustomResource/Pages/View/MainView.xaml
@@ -21,7 +21,7 @@
-
+
@@ -376,33 +376,33 @@
+ x:Name="bd1"
+ Width="25"
+ Height="13"
+ Margin="0,-10,-5,0"
+ HorizontalAlignment="Right"
+ VerticalAlignment="Top"
+ Panel.ZIndex="100"
+ Background="#2600CAFF"
+ CornerRadius="3"
+ Cursor="Hand"
+ Visibility="Collapsed">
+ HorizontalAlignment="Center"
+ FontSize="8"
+ Foreground="#FF00E6F7"
+ Text="{Binding ListNum, Mode=TwoWay}" />
+ x:Name="image1"
+ Width="{TemplateBinding Width}"
+ Height="{TemplateBinding Height}"
+ Panel.ZIndex="0"
+ RenderOptions.BitmapScalingMode="HighQuality"
+ SnapsToDevicePixels="True"
+ Source="/BPASmartClient.CustomResource;component/Image/告警/无告警.png"
+ UseLayoutRounding="True" />
@@ -581,12 +581,13 @@
+ ToolTip="心跳检测报警" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BPASmartClient.JXJFoodSmallStation/View/BomOfMaterialView.xaml b/BPASmartClient.JXJFoodSmallStation/View/BomOfMaterialView.xaml
index a3b512d6..de8dcec5 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/BomOfMaterialView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/BomOfMaterialView.xaml
@@ -1,19 +1,32 @@
-
+
+
+
+
+
+
+
+
+
+
+ -->
+
+
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
+
+
-
-
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/BPASmartClient.JXJFoodSmallStation/View/DeviceMaterialParView.xaml b/BPASmartClient.JXJFoodSmallStation/View/DeviceMaterialParView.xaml
index 66182267..2ce29854 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/DeviceMaterialParView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/DeviceMaterialParView.xaml
@@ -16,111 +16,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -342,9 +242,9 @@
Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding StirringSpeed}" />
-
+
-
@@ -354,13 +254,14 @@
Cursor="SizeWE" />
-
-
+
+
+ IsChecked="{Binding AutoModeStatus}" />
+ IsChecked="{Binding ManualMode}" />
diff --git a/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml b/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml
index 40a7fdf4..d9cb3f60 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml
@@ -11,7 +11,7 @@
Height="645"
AllowsTransparency="True"
Background="{x:Null}"
- Topmost="false"
+ Topmost="True"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
diff --git a/BPASmartClient.JXJFoodSmallStation/View/PlcVarMonitorView.xaml b/BPASmartClient.JXJFoodSmallStation/View/PlcVarMonitorView.xaml
index 58899358..082d2106 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/PlcVarMonitorView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/PlcVarMonitorView.xaml
@@ -1,92 +1,190 @@
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/BPASmartClient.JXJFoodSmallStation/View/ProcessMonitorView.xaml b/BPASmartClient.JXJFoodSmallStation/View/ProcessMonitorView.xaml
index d1b37827..17794e2b 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/ProcessMonitorView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/ProcessMonitorView.xaml
@@ -1,83 +1,170 @@
-
+
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml b/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml
index c1e0de8e..f7602989 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml
@@ -52,9 +52,10 @@
-
+ BorderThickness="1">
@@ -69,63 +70,150 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
- 原料名称
- 原料位置
- 原料桶号
- 原料重量
+
+ 原料名称
+
+
+ 原料位置
+
+
+ 原料桶号
+
+
+ 原料重量
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/BPASmartClient.JXJFoodSmallStation/View/RecipeReceiveView.xaml b/BPASmartClient.JXJFoodSmallStation/View/RecipeReceiveView.xaml
index e434f984..07b8ba80 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/RecipeReceiveView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/RecipeReceiveView.xaml
@@ -45,34 +45,40 @@
-
+
-
+
-
+
-
-
-
+
-
+
-
+
+
-
+
+
+
+
+
+
+
+
+
-
+
-
+
+ Foreground="DeepSkyBlue"
+ Style="{StaticResource ImageButtonStyle}" />
+ Foreground="DeepSkyBlue"
+ Style="{StaticResource ImageButtonStyle}" />
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml b/BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml
index ba3465e3..79c43cc1 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml
@@ -131,8 +131,8 @@
-
-
+
+
-
+
+ IsChecked="{Binding WindSendConnect}" />
+ IsChecked="{Binding HKPlcConnect}" />
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/BPASmartClient.JXJFoodSmallStation/View/WindSendParView.xaml b/BPASmartClient.JXJFoodSmallStation/View/WindSendParView.xaml
index 85e2a6f7..0cdbad63 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/WindSendParView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/WindSendParView.xaml
@@ -6,8 +6,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.JXJFoodSmallStation.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
+ xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
d:DesignHeight="1080"
d:DesignWidth="1920"
mc:Ignorable="d">
@@ -16,6 +16,14 @@
+
+
+
+
+
+
+
+
@@ -24,7 +32,10 @@
-
+
-
+
@@ -48,79 +68,141 @@
Background="#ff0C255F">
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
-
-
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs
index c3e8859e..5f35d0e9 100644
--- a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs
+++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs
@@ -22,19 +22,21 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
- SystemMode = GVL_SmallStation.GetInstance.PlcSystemMode ? "手动" : "自动";
- if (GVL_SmallStation.GetInstance.PlcSystemMode) ManualMode = true;
- else AutoModeStatus = true;
+ PlcSystemMode = GVL_SmallStation.GetInstance.PlcSystemMode;
+ //SystemMode = GVL_SmallStation.GetInstance.PlcSystemMode ? "手动" : "自动";
+ //if (GVL_SmallStation.GetInstance.PlcSystemMode) ManualMode = true;
+ //else AutoModeStatus = true;
if (GVL_SmallStation.GetInstance.PlcSystemIsAutoRun)
{
- if (GVL_SmallStation.GetInstance.PlcSystemIsPause)
- {
- SystemStatus = "暂停";
- }
- else
- {
- SystemStatus = "运行";
- }
+ SystemStatus = GVL_SmallStation.GetInstance.PlcSystemIsPause ? "暂停" : "运行";
+ //if (GVL_SmallStation.GetInstance.PlcSystemIsPause)
+ //{
+ // SystemStatus = "暂停";
+ //}
+ //else
+ //{
+ // SystemStatus = "运行";
+ //}
}
else
{
@@ -288,11 +290,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
});
DebugMode = new RelayCommand(() =>
{
- ActionManage.GetInstance.Send("SystemDebugMode");
+ // ActionManage.GetInstance.Send("SystemDebugMode");
});
AutoMode = new RelayCommand(() =>
{
- ActionManage.GetInstance.Send("SystemAutoMode");
+ // ActionManage.GetInstance.Send("SystemAutoMode");
});
}
@@ -341,24 +343,73 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
public RelayCommand SystemStopCommand { get; set; }
public RelayCommand SystemPauseCommand { get; set; }
-
-
public RelayCommand SystemResetCommand { get; set; }
public RelayCommand AutoMode { get; set; }
public RelayCommand DebugMode { get; set; }
+ ///
+ /// 系统模式改变
+ ///
+ public static bool PlcSystemMode
+ {
+ get { return _mPlcSystemMode; }
+ set
+ {
+ if (_mPlcSystemMode != value || string.IsNullOrEmpty(SystemMode))
+ {
+ _mPlcSystemMode = value;
+ SystemMode = value ? "手动" : "自动";
+ if (value) ManualMode = true;
+ else AutoModeStatus = true;
+ }
- public bool AutoModeStatus { get { return _mAutoModeStatus; } set { _mAutoModeStatus = value; OnPropertyChanged(); } }
- private bool _mAutoModeStatus;
-
- public bool ManualMode { get { return _mManualMode; } set { _mManualMode = value; OnPropertyChanged(); } }
- private bool _mManualMode;
+ }
+ }
+ private static bool _mPlcSystemMode;
+ ///
+ /// 自动模式
+ ///
+ public static bool AutoModeStatus
+ {
+ get { return _mAutoModeStatus; }
+ set
+ {
+ if (_mAutoModeStatus != value || (!_mAutoModeStatus && !_mManualMode))
+ {
+ if (value)
+ ProcessControl.GetInstance.HKDevice.HK_PLC_S7.Write("DB44.DBX0.1", false);
+ _mAutoModeStatus = value;
+ OnStaticPropertyChanged();
+ }
+ }
+ }
+ private static bool _mAutoModeStatus;
+ ///
+ /// 手动模式
+ ///
+ public static bool ManualMode
+ {
+ get { return _mManualMode; }
+ set
+ {
+ if (_mManualMode != value || (!_mAutoModeStatus && !_mManualMode))
+ {
+ if (value)
+ ProcessControl.GetInstance.HKDevice.HK_PLC_S7.Write("DB44.DBX0.1", true);
+ _mManualMode = value;
+ OnStaticPropertyChanged();
+ }
+ }
+ }
+ private static bool _mManualMode;
}
+
+
public class CylinderModel : ObservableObject
{
public bool LeftTog { get { return _mLeftTog; } set { _mLeftTog = value; OnPropertyChanged(); } }