From 49cf92b0f77403889738e9fe86b1f4a7782eb5b9 Mon Sep 17 00:00:00 2001
From: pengliangyang <1406009520@qq.com>
Date: Wed, 26 Oct 2022 16:00:28 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../BPASmartClient.DosingSystem.csproj | 2 +-
DosingSystem/Model/DeviceInquire.cs | 2 +-
DosingSystem/Service/SiemensDevice.cs | 2 +-
DosingSystem/View/RecipeControlView.xaml | 2 --
DosingSystem/View/RecipeControlView.xaml.cs | 2 +-
DosingSystem/ViewModel/NewRecipeViewModel.cs | 2 +-
.../ViewModel/RecipeControlViewModel.cs | 24 ++++++++++------
.../ViewModel/RecipeSettingsViewModel.cs | 28 ++++++++++++++-----
8 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/DosingSystem/BPASmartClient.DosingSystem.csproj b/DosingSystem/BPASmartClient.DosingSystem.csproj
index 15315834..8a2d893c 100644
--- a/DosingSystem/BPASmartClient.DosingSystem.csproj
+++ b/DosingSystem/BPASmartClient.DosingSystem.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/DosingSystem/Model/DeviceInquire.cs b/DosingSystem/Model/DeviceInquire.cs
index 120b1252..9d803541 100644
--- a/DosingSystem/Model/DeviceInquire.cs
+++ b/DosingSystem/Model/DeviceInquire.cs
@@ -115,7 +115,7 @@ namespace BPASmartClient.DosingSystem
else Json.Data.BaseParModel.NetworkSegAddress = IPSegment;
TestData();
IpAddressLines();
- DeviceDataInit();
+ //DeviceDataInit();
ThreadManage.GetInstance().StartLong(new Action(() =>
{
if (IPQueues.Count >= IPLists.Count)
diff --git a/DosingSystem/Service/SiemensDevice.cs b/DosingSystem/Service/SiemensDevice.cs
index 3187285d..90315ec0 100644
--- a/DosingSystem/Service/SiemensDevice.cs
+++ b/DosingSystem/Service/SiemensDevice.cs
@@ -38,7 +38,7 @@ namespace BPASmartClient.DosingSystem
ThreadManage.GetInstance().StartLong(new Action(() =>
{
- GlobalDevice.PlcData = MySiemens.ReadClass(3);//获取PLC到上位机的数据
+ //GlobalDevice.PlcData = MySiemens.ReadClass(3);//获取PLC到上位机的数据
var res = MySiemens.Read(DataType.DataBlock, 4, 134, VarType.Word, 32);
if (res != null && res is ushort[] ushorts && ushorts.Length == 32)
{
diff --git a/DosingSystem/View/RecipeControlView.xaml b/DosingSystem/View/RecipeControlView.xaml
index bf2c21b4..a05ea430 100644
--- a/DosingSystem/View/RecipeControlView.xaml
+++ b/DosingSystem/View/RecipeControlView.xaml
@@ -875,8 +875,6 @@
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
-
-
p.RawMaterialId == rm);
- if (res != null) Global.DeviceRawMaterials.Remove(res);
+ if (res != null) RawMaterials.Remove(res);
}
});
diff --git a/DosingSystem/ViewModel/RecipeControlViewModel.cs b/DosingSystem/ViewModel/RecipeControlViewModel.cs
index 374d5d0b..78e1dc23 100644
--- a/DosingSystem/ViewModel/RecipeControlViewModel.cs
+++ b/DosingSystem/ViewModel/RecipeControlViewModel.cs
@@ -19,8 +19,8 @@ namespace BPASmartClient.DosingSystem.ViewModel
{
public class RecipeControlViewModel : NotifyBase
{
- ConcurrentQueue RecipeNames = new ConcurrentQueue();
- ObservableCollection StockStatus = new ObservableCollection();
+ public static ConcurrentQueue RecipeNames = new ConcurrentQueue();
+ public static ObservableCollection StockStatus = new ObservableCollection();
public RecipeControlViewModel()
{
StartCommand = new RelayCommand