From e16afc9d10d271376151db77c6387f0b85f19d15 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: Fri, 16 Jun 2023 10:53:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=94=AF=E8=B0=83=E6=95=B4=E5=90=88?=
=?UTF-8?q?=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../BPASmartClient.Business.csproj | 2 +-
BPASmartClient.Business/Plugin/MQTTMgr.cs | 2 +-
BPASmartClient.Business/Plugin/OrderProxy.cs | 4 +-
BPASmartClient.Business/Plugin/StatusMgr.cs | 4 +-
.../BPASmartClient.CustomResource.csproj | 2 +-
.../Pages/Model/AlarmHelper.cs | 2 +-
.../Pages/Model/AlarmTest.cs | 2 +-
.../Pages/Model/VoiceAPI.cs | 2 +-
BPASmartClient.DRCoffee/CoffeeMachine.cs | 4 +-
BPASmartClient.Device/BaseDevice.cs | 18 ++--
BPASmartClient.DosingSystemSingle/App.xaml.cs | 4 +-
.../BPASmartClient.DosingSystemSingle.csproj | 2 +-
.../Model/DeviceInquire.cs | 8 +-
.../Service/SiemensDevice.cs | 4 +-
.../View/HardwareStatusView.xaml.cs | 2 +-
.../View/ManualControlView.xaml.cs | 2 +-
.../ViewModel/HardwareStatusViewModel.cs | 2 +-
.../ViewModel/ManualControlViewModel.cs | 2 +-
.../ViewModel/RecipeControlViewModel.cs | 4 +-
BPASmartClient.FoodStationTest/App.xaml.cs | 2 +-
.../BPASmartClient.FoodStationTest.csproj | 2 +-
.../Model/HK_PLC/HKDeviceStatus.cs | 2 +-
.../Model/ProcessControl.cs | 10 +--
.../Model/RawMaterial/DeviceInquire.cs | 10 +--
.../ViewModel/ManualControlViewModel.cs | 2 +-
.../ViewModel/ManualFlowViewModel.cs | 2 +-
.../ViewModel/RecipeControlViewModel.cs | 4 +-
BPASmartClient.GSIceCream/IceCreamMachine.cs | 4 +-
BPASmartClient.IceMaker/IceMakerMachine.cs | 2 +-
BPASmartClient.IoT/DataVClient.cs | 4 +-
BPASmartClient.IoT/Model/FileUpload.cs | 2 +-
BPASmartClient.JAKA/JakaMachine.cs | 2 +-
BPASmartClient.JXJFoodBigStation/App.xaml.cs | 2 +-
.../BPASmartClient.JXJFoodBigStation.csproj | 2 +-
.../Model/HK_PLC/HKDeviceStatus.cs | 2 +-
.../Model/ProcessControl.cs | 6 +-
.../Model/Siemens/SiemensDeviceStatus.cs | 2 +-
.../ViewModel/HKPlcCommMonitorViewModel.cs | 2 +-
.../ViewModel/ManualFlowViewModel.cs | 2 +-
.../App.xaml.cs | 2 +-
.../Model/HK_PLC/HKDeviceStatus.cs | 2 +-
.../Model/ProcessControl.cs | 10 +--
.../Model/RawMaterial/DeviceInquire.cs | 10 +--
.../Model/Siemens/SiemensDeviceStatus.cs | 2 +-
.../Model/WindSend/WindSendDeviceStatus.cs | 2 +-
.../ViewModel/ManualControlViewModel.cs | 2 +-
.../ViewModel/ManualFlowViewModel.cs | 2 +-
.../ViewModel/RecipeControlViewModel.cs | 4 +-
.../ViewModel/RobotViewModel.cs | 2 +-
.../BPASmartClient.JakaRobot.csproj | 2 +-
BPASmartClient.JakaRobot/JaKaHelper.cs | 4 +-
BPASmartClient.Juicer/JuicerMachine.cs | 2 +-
BPASmartClient.KHKJ/KHKJMachine.cs | 4 +-
BPASmartClient.KLMCoffee/CoffeeMachine.cs | 4 +-
BPASmartClient.Lebai/LebaiRobot.cs | 4 +-
BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs | 2 +-
.../MilkTeaCubeMachine.cs | 2 +-
BPASmartClient.MilkWithTea/App.xaml.cs | 3 +-
BPASmartClient.MilkWithTea/MainWindow.xaml.cs | 4 +-
.../ViewModel/LocalConfigureViewModel.cs | 26 +++---
.../ViewModel/MainControlViewModel.cs | 68 +++++++++-----
.../ViewModel/PatrameterSettiongViewModel.cs | 88 ++++++++++---------
.../ViewModel/RecipeConfigeViewModel.cs | 33 +++----
.../BPASmartClient.Modbus.csproj | 2 +-
.../BPASmartClient.Model.csproj | 2 +-
BPASmartClient.MorkBF/Control_MorkBF.cs | 6 +-
BPASmartClient.MorkF/Control_MorkF.cs | 88 +++++++++----------
.../ViewModel/DebugViewModel.cs | 2 +-
.../ViewModel/MaterialCalibrationViewModel.cs | 4 +-
BPASmartClient.MorkMOC/Control_MorkMOC.cs | 20 ++---
BPASmartClient.MorkMOC/Model/LocalMaterail.cs | 43 ++++-----
BPASmartClient.MorkMV1/Control_MorkMV1.cs | 2 +-
BPASmartClient.MorkMV1/DataServer.cs | 2 +-
.../ViewModel/DebugViewModel.cs | 2 +-
BPASmartClient.MorkMW/Control_MorkMW.cs | 2 +-
BPASmartClient.MorkS/Control_Morks.cs | 2 +-
BPASmartClient.MorkS/DataServer.cs | 2 +-
.../ViewModel/DebugViewModel.cs | 2 +-
BPASmartClient.MorkS/VoiceAPI.cs | 2 +-
BPASmartClient.MorkS3/Control_Morks.cs | 2 +-
BPASmartClient.MorkS3/DataServer.cs | 2 +-
.../ViewModel/DebugViewModel.cs | 2 +-
.../Control_MorkSUpgradedVer - 复制.cs | 2 +-
.../Control_MorkSUpgradedVer.cs | 2 +-
BPASmartClient.MorkSUpgradedVer/DataServer.cs | 2 +-
.../ViewModel/DebugViewModel.cs | 2 +-
.../View/DebugView.xaml.cs | 4 +-
.../ViewModel/DebugViewModel.cs | 2 +-
.../ViewModel/MonitorViewModel.cs | 2 +-
BPASmartClient.MorkT/View/DebugView.xaml.cs | 4 +-
.../ViewModel/DebugViewModel.cs | 2 +-
.../ViewModel/MonitorViewModel.cs | 2 +-
.../View/DebugView.xaml.cs | 4 +-
.../View/TestView.xaml.cs | 4 +-
.../ViewModel/TestViewModel.cs | 2 +-
.../View/DebugView.xaml.cs | 4 +-
.../ViewModel/DebugViewModel.cs | 2 +-
.../View/DebugView.xaml.cs | 4 +-
.../ViewModel/DebugViewModel.cs | 2 +-
.../ViewModel/MonitorViewModel.cs | 2 +-
.../View/DebugView.xaml.cs | 4 +-
.../ViewModel/DebugViewModel.cs | 2 +-
.../ViewModel/MonitorViewModel.cs | 2 +-
BPASmartClient.Nfc/BPASmartClient.Nfc.csproj | 2 +-
BPASmartClient.Nfc/NFCHelper.cs | 2 +-
.../BPASmartClient.S7Net.csproj | 2 +-
BPASmartClient.SCChip/ICChipMachine.cs | 2 +-
BPASmartClient.ScreenLib/Helper/Main.cs | 4 +-
.../ScreenSplitMealsControl1ViewModel.cs | 2 +-
.../ScreenSplitMealsControl2ViewModel.cs | 2 +-
.../ScreenSplitMealsControl3ViewModel.cs | 2 +-
.../ScreenALLControlViewModel.cs | 2 +-
.../炒锅/ScreenMaxWokControlViewModel.cs | 2 +-
.../炒锅/ScreenMinWokControlViewModel.cs | 2 +-
.../煮面机/ScreenMorksControlViewModel.cs | 2 +-
.../BPASmartClient.SerialPort.csproj | 2 +-
.../RobotGripperHelper.cs | 2 +-
.../App.xaml.cs | 2 +-
.../BPASmartClient.SmallBatchingSystem.csproj | 2 +-
.../Services/Control.cs | 6 +-
.../Services/PlcServer.cs | 2 +-
BPASmartClient.TourismCollege/App.xaml.cs | 2 +-
.../BPASmartClient.TourismCollege.csproj | 2 +-
.../BPASmartClient.Update.csproj | 2 +-
.../OrderListDialogViewModel.cs | 2 +-
BPASmartClient/App.xaml.cs | 2 +-
BPASmartClient/MainWindow.xaml.cs | 4 +-
DosingSystem/App.xaml.cs | 2 +-
.../BPASmartClient.DosingSystem.csproj | 2 +-
DosingSystem/Model/DeviceInquire.cs | 8 +-
DosingSystem/Service/SiemensDevice.cs | 4 +-
DosingSystem/View/HardwareStatusView.xaml.cs | 2 +-
DosingSystem/View/ManualControlView.xaml.cs | 2 +-
.../ViewModel/HardwareStatusViewModel.cs | 2 +-
.../ViewModel/ManualControlViewModel.cs | 2 +-
.../ViewModel/RecipeControlViewModel.cs | 4 +-
FryPot_DosingSystem/Control/DeviceOperate.cs | 12 +--
.../Control/DosingLogicControl.cs | 76 ++++++++--------
WpfTest/MainWindow.xaml.cs | 2 +-
139 files changed, 438 insertions(+), 403 deletions(-)
diff --git a/BPASmartClient.Business/BPASmartClient.Business.csproj b/BPASmartClient.Business/BPASmartClient.Business.csproj
index 2e3b76f8..b7492b30 100644
--- a/BPASmartClient.Business/BPASmartClient.Business.csproj
+++ b/BPASmartClient.Business/BPASmartClient.Business.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/BPASmartClient.Business/Plugin/MQTTMgr.cs b/BPASmartClient.Business/Plugin/MQTTMgr.cs
index b0a45fe6..7fedd3f7 100644
--- a/BPASmartClient.Business/Plugin/MQTTMgr.cs
+++ b/BPASmartClient.Business/Plugin/MQTTMgr.cs
@@ -67,7 +67,7 @@ namespace BPASmartClient.Business
ClientId = $"ClientId-[{clientId}]-DeviceId-[{deviceId}]-{Guid.NewGuid()}"
});
- ThreadManage.GetInstance().Start(() =>
+ TaskManage.GetInstance.Start(() =>
{
while (running)
{
diff --git a/BPASmartClient.Business/Plugin/OrderProxy.cs b/BPASmartClient.Business/Plugin/OrderProxy.cs
index 59459893..eb43e814 100644
--- a/BPASmartClient.Business/Plugin/OrderProxy.cs
+++ b/BPASmartClient.Business/Plugin/OrderProxy.cs
@@ -44,7 +44,7 @@ namespace BPASmartClient.Business
deviceMgr = Plugin.GetInstance().GetPlugin();
if (InternetInfo.IsEnableTest)
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
while (morkOrderPushes.Count > 0)
{
@@ -141,7 +141,7 @@ namespace BPASmartClient.Business
private void StartTargetDeviceOrderJob(int deviceId)
{
- ThreadManage.GetInstance().Start(() =>
+ TaskManage.GetInstance.Start(() =>
{
var device = deviceMgr.GetDevices().FirstOrDefault(p => p.DeviceId == deviceId);
while (running)
diff --git a/BPASmartClient.Business/Plugin/StatusMgr.cs b/BPASmartClient.Business/Plugin/StatusMgr.cs
index fcdee593..8df92a46 100644
--- a/BPASmartClient.Business/Plugin/StatusMgr.cs
+++ b/BPASmartClient.Business/Plugin/StatusMgr.cs
@@ -33,7 +33,7 @@ namespace BPASmartClient.Business
public void Start()
{
running = true;
- ThreadManage.GetInstance().Start(() =>
+ TaskManage.GetInstance.Start(() =>
{
while (running)
{
@@ -48,7 +48,7 @@ namespace BPASmartClient.Business
deviceStatus.BatchingInfo = new List();
- ThreadManage.GetInstance().Start(() =>
+ TaskManage.GetInstance.Start(() =>
{
while (running)
{
diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
index 2a15730c..2dfa88a4 100644
--- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
+++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
@@ -459,7 +459,7 @@
-
+
diff --git a/BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs b/BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs
index 896da888..efa5fb98 100644
--- a/BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs
+++ b/BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs
@@ -44,7 +44,7 @@ namespace BPASmartClient.CustomResource.Pages.Model
public static void Init()
{
AlarmViewModel.AlarmInfos = Alarms;
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (_Instance != null)
{
diff --git a/BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs b/BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs
index 5369cd45..3a6d923f 100644
--- a/BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs
+++ b/BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs
@@ -41,7 +41,7 @@ namespace BPASmartClient.CustomResource.Pages.Model
public static void Init()
{
AlarmViewModel.AlarmInfos = Alarms;
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (_Instance != null)
{
diff --git a/BPASmartClient.CustomResource/Pages/Model/VoiceAPI.cs b/BPASmartClient.CustomResource/Pages/Model/VoiceAPI.cs
index a669cccd..5def1bd4 100644
--- a/BPASmartClient.CustomResource/Pages/Model/VoiceAPI.cs
+++ b/BPASmartClient.CustomResource/Pages/Model/VoiceAPI.cs
@@ -20,7 +20,7 @@ namespace BPASmartClient.CustomResource
static VoiceAPI()
{
- BPA.Helper.ThreadManage.GetInstance().StartLong(new Action(() =>
+ BPA.Helper.TaskManage.GetInstance.StartLong(new Action(() =>
{
while (msg.Count > 0)
{
diff --git a/BPASmartClient.DRCoffee/CoffeeMachine.cs b/BPASmartClient.DRCoffee/CoffeeMachine.cs
index 7329ddb2..c782c497 100644
--- a/BPASmartClient.DRCoffee/CoffeeMachine.cs
+++ b/BPASmartClient.DRCoffee/CoffeeMachine.cs
@@ -87,7 +87,7 @@ namespace BPASmartClient.DRCoffee
///
private void MainLoop()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (!free)
{
@@ -96,7 +96,7 @@ namespace BPASmartClient.DRCoffee
Thread.Sleep(200);
}), "咖啡机询问线程");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
List temp = new List();
//一系列解包
diff --git a/BPASmartClient.Device/BaseDevice.cs b/BPASmartClient.Device/BaseDevice.cs
index 0252eace..072e3f50 100644
--- a/BPASmartClient.Device/BaseDevice.cs
+++ b/BPASmartClient.Device/BaseDevice.cs
@@ -184,7 +184,7 @@ namespace BPASmartClient.Device
public virtual void StartMain()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
int i = 0;
foreach (var peripheral in peripherals)
@@ -314,7 +314,7 @@ namespace BPASmartClient.Device
DeleteErrorAction?.Invoke(DeviceId, res);
}
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
AlarmMonitoring();
Thread.Sleep(500);
@@ -350,15 +350,15 @@ namespace BPASmartClient.Device
private void InitResetTask()
{
#region 复位程序
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (RTrig.GetInstance($"ResetProgram:{DeviceId}").Start(Initing))
{
- ThreadManage.GetInstance().StopTask($"MainTask:{DeviceId}", new Action(() =>
+ TaskManage.GetInstance.StopTask($"MainTask:{DeviceId}", new Action(() =>
{
- ThreadManage.GetInstance().StopTask($"ReadData:{DeviceId}", new Action(() =>
+ TaskManage.GetInstance.StopTask($"ReadData:{DeviceId}", new Action(() =>
{
- ThreadManage.GetInstance().StopTask($"GvlStatusMonitor:{DeviceId}", new Action(() =>
+ TaskManage.GetInstance.StopTask($"GvlStatusMonitor:{DeviceId}", new Action(() =>
{
ActionManage.GetInstance.Send("ClearOrders");
ResetProgram();
@@ -376,7 +376,7 @@ namespace BPASmartClient.Device
private void InitTask()
{
#region 数据读取
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
ReadData();
Thread.Sleep(10);
@@ -384,7 +384,7 @@ namespace BPASmartClient.Device
#endregion
#region 任务流程
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
MainTask();
Thread.Sleep(10);
@@ -392,7 +392,7 @@ namespace BPASmartClient.Device
#endregion
#region 设备状态监控
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
UpdateValue(InterfaceStatus);
Thread.Sleep(1000);
diff --git a/BPASmartClient.DosingSystemSingle/App.xaml.cs b/BPASmartClient.DosingSystemSingle/App.xaml.cs
index 6959b71c..20005e0f 100644
--- a/BPASmartClient.DosingSystemSingle/App.xaml.cs
+++ b/BPASmartClient.DosingSystemSingle/App.xaml.cs
@@ -38,7 +38,7 @@ namespace BPASmartClient.DosingSystemSingle
SystemHelper.GetInstance.CreateDesktopShortcut();
MenuInit();
DataInit();
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
DeviceInquire.GetInstance.Init();//配料机设备上线监听,设备列表初始化
}), "设备初始化");
@@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystemSingle
Json.Save();
Json.Save();
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.LogSave();
- ThreadManage.GetInstance().Dispose();
+ TaskManage.GetInstance.Dispose();
}
private void MenuInit()
diff --git a/BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj b/BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj
index f64bbcee..1089211a 100644
--- a/BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj
+++ b/BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/BPASmartClient.DosingSystemSingle/Model/DeviceInquire.cs b/BPASmartClient.DosingSystemSingle/Model/DeviceInquire.cs
index c8f7eea0..90154732 100644
--- a/BPASmartClient.DosingSystemSingle/Model/DeviceInquire.cs
+++ b/BPASmartClient.DosingSystemSingle/Model/DeviceInquire.cs
@@ -32,7 +32,7 @@ namespace BPASmartClient.DosingSystemSingle
public ObservableCollection devices { get; set; } = new ObservableCollection();
private void DeviceDataInit()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < DeviceLists.Count; i++)
{
@@ -117,7 +117,7 @@ namespace BPASmartClient.DosingSystemSingle
IpAddressLines();
//SiemensDevice.GetInstance.Connect(Json.Data.BaseParModel.DeviceAddress);
DeviceDataInit();
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IPQueues.Count >= IPLists.Count)
//IpAddressLines();
@@ -303,7 +303,7 @@ namespace BPASmartClient.DosingSystemSingle
AlarmHelper.Init();
if (modbusTcp.Connected)
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
this.DeviceName = modbusTcp.GetString(DeviceAddress.DeviceName, 20)?.Trim()?.Replace(" ", "");
deviceStatus.RunStatus = (ushort)this.modbusTcp.ReadShort(DeviceAddress.RunStatus); //获取设备运行状态
@@ -341,7 +341,7 @@ namespace BPASmartClient.DosingSystemSingle
public void Dispose()
{
- ThreadManage.GetInstance().StopTask($"{DeviceName} 开始监听");
+ TaskManage.GetInstance.StopTask($"{DeviceName} 开始监听");
}
public void Start(float Value)
diff --git a/BPASmartClient.DosingSystemSingle/Service/SiemensDevice.cs b/BPASmartClient.DosingSystemSingle/Service/SiemensDevice.cs
index a4c2c4a9..7237f56d 100644
--- a/BPASmartClient.DosingSystemSingle/Service/SiemensDevice.cs
+++ b/BPASmartClient.DosingSystemSingle/Service/SiemensDevice.cs
@@ -35,14 +35,14 @@ namespace BPASmartClient.DosingSystemSingle
}
IsConnect = MySiemens.IsConnected;
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IsConnect) MySiemens.Write("DB4.DBX0.0", tempValue);//设备心跳
tempValue = !tempValue;
Thread.Sleep(100);
}), "设备心跳", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IsConnect)
{
diff --git a/BPASmartClient.DosingSystemSingle/View/HardwareStatusView.xaml.cs b/BPASmartClient.DosingSystemSingle/View/HardwareStatusView.xaml.cs
index 9710f283..5d4d2c13 100644
--- a/BPASmartClient.DosingSystemSingle/View/HardwareStatusView.xaml.cs
+++ b/BPASmartClient.DosingSystemSingle/View/HardwareStatusView.xaml.cs
@@ -24,7 +24,7 @@ namespace BPASmartClient.DosingSystemSingle.View
public HardwareStatusView()
{
InitializeComponent();
- this.Unloaded += (o, e) => { ThreadManage.GetInstance().StopTask("输送带料仓状态监控"); };
+ this.Unloaded += (o, e) => { TaskManage.GetInstance.StopTask("输送带料仓状态监控"); };
}
}
}
diff --git a/BPASmartClient.DosingSystemSingle/View/ManualControlView.xaml.cs b/BPASmartClient.DosingSystemSingle/View/ManualControlView.xaml.cs
index 10b9b012..9a199e0b 100644
--- a/BPASmartClient.DosingSystemSingle/View/ManualControlView.xaml.cs
+++ b/BPASmartClient.DosingSystemSingle/View/ManualControlView.xaml.cs
@@ -24,7 +24,7 @@ namespace BPASmartClient.DosingSystemSingle.View
public ManualControlView()
{
InitializeComponent();
- this.Unloaded += (o, e) => { ThreadManage.GetInstance().StopTask("手动气缸状态监控"); };
+ this.Unloaded += (o, e) => { TaskManage.GetInstance.StopTask("手动气缸状态监控"); };
this.SizeChanged += ManualControlView_SizeChanged;
this.cy.Height = this.list1.ActualHeight + 40;
this.zd.Height = this.list2.ActualHeight + 40;
diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs
index 1d01dfd5..6feded15 100644
--- a/BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs
+++ b/BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs
@@ -35,7 +35,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel
// }
// }
//});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < Json.Data.OutletInfoModels.Count; i++)
{
diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs
index c0a5ebb1..7f73c15d 100644
--- a/BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs
+++ b/BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs
@@ -113,7 +113,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel
ModelSwitchText = res ? "自动" : "手动";*/
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < cylinderModels.Count; i++)
{
diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs
index 6d0b2869..9b5f0348 100644
--- a/BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs
+++ b/BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs
@@ -97,7 +97,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel
///
private void RecipeRun()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (RecipeNames.Count > 0)
{
@@ -200,7 +200,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel
///
private void RecipeStatusInquire()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < Recipes.Count; i++)
{
diff --git a/BPASmartClient.FoodStationTest/App.xaml.cs b/BPASmartClient.FoodStationTest/App.xaml.cs
index 33065442..4efab073 100644
--- a/BPASmartClient.FoodStationTest/App.xaml.cs
+++ b/BPASmartClient.FoodStationTest/App.xaml.cs
@@ -66,7 +66,7 @@ namespace BPASmartClient.FoodStationTest
Json.Save();
Json.Save();
MessageNotify.GetInstance.LogSave();
- ThreadManage.GetInstance().Dispose();
+ TaskManage.GetInstance.Dispose();
}
private void MenuInit()
diff --git a/BPASmartClient.FoodStationTest/BPASmartClient.FoodStationTest.csproj b/BPASmartClient.FoodStationTest/BPASmartClient.FoodStationTest.csproj
index 93735b1f..49bd8a14 100644
--- a/BPASmartClient.FoodStationTest/BPASmartClient.FoodStationTest.csproj
+++ b/BPASmartClient.FoodStationTest/BPASmartClient.FoodStationTest.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs b/BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs
index 5de76862..ce373991 100644
--- a/BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs
+++ b/BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs
@@ -13,7 +13,7 @@ namespace BPASmartClient.FoodStationTest.Model.HK_PLC
public PlcReadAddressDB45 DeviceStatus = new PlcReadAddressDB45();
public void Init()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IsConnected)
{
diff --git a/BPASmartClient.FoodStationTest/Model/ProcessControl.cs b/BPASmartClient.FoodStationTest/Model/ProcessControl.cs
index ed62dce8..fb8ede9e 100644
--- a/BPASmartClient.FoodStationTest/Model/ProcessControl.cs
+++ b/BPASmartClient.FoodStationTest/Model/ProcessControl.cs
@@ -68,7 +68,7 @@ namespace BPASmartClient.FoodStationTest.Model
RegisterInit();
DeviceConnect();
//Json.Data.Recipes = TestData.GetInstance.Recipes;//添加测试数据
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GVL_SmallStation.GetInstance.DisEnableStockAlarm = Json.Data.deviceConnectPar.ShieldStockbinAlarm;
if (HKDevice.IsConnected)
@@ -91,7 +91,7 @@ namespace BPASmartClient.FoodStationTest.Model
}
Thread.Sleep(200);
}), "海科plc通信心跳", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (GVL_SmallStation.GetInstance.Order_Cancel)
{
@@ -104,13 +104,13 @@ namespace BPASmartClient.FoodStationTest.Model
}
Thread.Sleep(10);
}), "小料站流程控制", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
RealTimeData();
Thread.Sleep(10);
}), "西门子PLC和小料站PLC的实时数据交互流程", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
HKPlcRead();
GetStatus();
@@ -1176,7 +1176,7 @@ namespace BPASmartClient.FoodStationTest.Model
MessageNotify.GetInstance.ShowRunLog("海科plc初始化完成");
}
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
diff --git a/BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs b/BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs
index 572e4b4a..fe350ef6 100644
--- a/BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs
+++ b/BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs
@@ -33,7 +33,7 @@ namespace BPASmartClient.FoodStationTest.Model
public ObservableCollection devices { get; set; } = new ObservableCollection();
private void DeviceDataInit()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < DeviceLists.Count; i++)
{
@@ -57,7 +57,7 @@ namespace BPASmartClient.FoodStationTest.Model
{
devices.ElementAt(deviceIndex).DeviceName = DeviceLists.ElementAt(i).Value.DeviceName;
}
- if (!ThreadManage.GetInstance().IsContainsKey($"{deviceName} 开始监听"))
+ if (!TaskManage.GetInstance.IsContainsKey($"{deviceName} 开始监听"))
{
DeviceLists[DeviceLists.ElementAt(i).Key].Init(deviceName);
}
@@ -111,7 +111,7 @@ namespace BPASmartClient.FoodStationTest.Model
//TestData();
IpAddressLines();
DeviceDataInit();
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IPQueues.Count >= IPLists.Count)
IpAddressLines();
@@ -338,7 +338,7 @@ namespace BPASmartClient.FoodStationTest.Model
//AlarmHelper.Init();
if (modbusTcp.IsConnected())
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (modbusTcp.IsConnected())
{
@@ -402,7 +402,7 @@ namespace BPASmartClient.FoodStationTest.Model
public void Dispose()
{
- ThreadManage.GetInstance().StopTask($"{DeviceName} 开始监听");
+ TaskManage.GetInstance.StopTask($"{DeviceName} 开始监听");
}
///
diff --git a/BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs
index 0ac18020..6ac72a0c 100644
--- a/BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs
+++ b/BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs
@@ -17,7 +17,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel
{
public ManualControlViewModel()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
PlcSystemMode = GVL_SmallStation.GetInstance.PlcSystemMode;
//SystemMode = GVL_SmallStation.GetInstance.PlcSystemMode ? "手动" : "自动";
diff --git a/BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs
index 8199436c..802701a8 100644
--- a/BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs
+++ b/BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs
@@ -120,7 +120,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel
MessageNotify.GetInstance.ShowUserLog("手动清零配方完成数目。");
}
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
RecipeDosingCompleNum = GVL_SmallStation.GetInstance.RecipeDosingCompleNum;
Recipe1DosingComplete = GVL_SmallStation.GetInstance.RecipeStockBinDosing[0].ToBinString();
diff --git a/BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs
index 1ad7926b..58b2eca6 100644
--- a/BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs
+++ b/BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs
@@ -45,7 +45,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (devices.Count > 0)
{
@@ -93,7 +93,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel
}), "启动配方下发", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < Recipes.Count; i++)
{
diff --git a/BPASmartClient.GSIceCream/IceCreamMachine.cs b/BPASmartClient.GSIceCream/IceCreamMachine.cs
index a85ff268..443cd321 100644
--- a/BPASmartClient.GSIceCream/IceCreamMachine.cs
+++ b/BPASmartClient.GSIceCream/IceCreamMachine.cs
@@ -77,7 +77,7 @@ namespace BPASmartClient.GSIceCream
private MSG_RESOLVE_STEP currentStep;
private void MainLoop()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (!free)
{
@@ -86,7 +86,7 @@ namespace BPASmartClient.GSIceCream
Thread.Sleep(500);
}), "冰淇淋询问线程");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
ResolveMsg();
}), "冰淇淋解析线程");
diff --git a/BPASmartClient.IceMaker/IceMakerMachine.cs b/BPASmartClient.IceMaker/IceMakerMachine.cs
index 23a91f8e..76733970 100644
--- a/BPASmartClient.IceMaker/IceMakerMachine.cs
+++ b/BPASmartClient.IceMaker/IceMakerMachine.cs
@@ -14,7 +14,7 @@ namespace BPASmartClient.IceMaker
{
iceMakerHelper.Open(communicationPar.SerialPort, communicationPar.BaudRate);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
IsConnected = iceMakerHelper.IsOpen;
if (!IsConnected) IsWork = false;
diff --git a/BPASmartClient.IoT/DataVClient.cs b/BPASmartClient.IoT/DataVClient.cs
index 86612fb7..e5d1aa11 100644
--- a/BPASmartClient.IoT/DataVClient.cs
+++ b/BPASmartClient.IoT/DataVClient.cs
@@ -192,7 +192,7 @@ namespace BPASmartClient.IoT
///
public void Dispose()
{
- ThreadManage.GetInstance().StopTask("DataV数据上报");
+ TaskManage.GetInstance.StopTask("DataV数据上报");
}
///
@@ -250,7 +250,7 @@ namespace BPASmartClient.IoT
///
public void Start()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (DeviceDataV != null && DeviceDataV.GetIsConnected() && DeviceDataV.deviceTable != null)
{
diff --git a/BPASmartClient.IoT/Model/FileUpload.cs b/BPASmartClient.IoT/Model/FileUpload.cs
index f20a8c94..f63f2122 100644
--- a/BPASmartClient.IoT/Model/FileUpload.cs
+++ b/BPASmartClient.IoT/Model/FileUpload.cs
@@ -33,7 +33,7 @@ namespace BPASmartClient.IoT.Model
///
public static void FileRequest(DataVReport dataV)
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
try
{
diff --git a/BPASmartClient.JAKA/JakaMachine.cs b/BPASmartClient.JAKA/JakaMachine.cs
index 40f2e018..9d858d4f 100644
--- a/BPASmartClient.JAKA/JakaMachine.cs
+++ b/BPASmartClient.JAKA/JakaMachine.cs
@@ -14,7 +14,7 @@ namespace BPASmartClient.JAKA
{
jaKaHelper.Connect(communicationPar.IPAddress);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
IsConnected = jaKaHelper.IsConnected;
if (!IsConnected)
diff --git a/BPASmartClient.JXJFoodBigStation/App.xaml.cs b/BPASmartClient.JXJFoodBigStation/App.xaml.cs
index 0e7ac47a..6b0da0f3 100644
--- a/BPASmartClient.JXJFoodBigStation/App.xaml.cs
+++ b/BPASmartClient.JXJFoodBigStation/App.xaml.cs
@@ -61,7 +61,7 @@ namespace BPASmartClient.JXJFoodBigStation
Json.Save();
base.OnExit(e);
MessageNotify.GetInstance.LogSave();
- ThreadManage.GetInstance().Dispose();
+ TaskManage.GetInstance.Dispose();
}
private void MenuInit()
diff --git a/BPASmartClient.JXJFoodBigStation/BPASmartClient.JXJFoodBigStation.csproj b/BPASmartClient.JXJFoodBigStation/BPASmartClient.JXJFoodBigStation.csproj
index 253bf603..718a6952 100644
--- a/BPASmartClient.JXJFoodBigStation/BPASmartClient.JXJFoodBigStation.csproj
+++ b/BPASmartClient.JXJFoodBigStation/BPASmartClient.JXJFoodBigStation.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
index 5528f08a..e8aaa5dc 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
@@ -29,7 +29,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
{
MessageNotify.GetInstance.ShowRunLog("DB99块初始化值 失败");
}
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{/*
var res = HK_PLC_S7.ReadClass(97);//料仓里原料的编码
if (res != null && res is StockBinName data9)
diff --git a/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs b/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
index 72acd2dd..203b6713 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
@@ -1929,7 +1929,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model
public void ThreadInit()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (!HKDevice.IsConnected && GVL_BigStation.IsAllowHKPlcConnect)
{
@@ -1944,7 +1944,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model
Thread.Sleep(10);
}), "西门子和海科PLC重新连接", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GVL_BigStation.HeartBeatToPlc = !GVL_BigStation.HeartBeatToPlc;
HKDevice.HK_PLC_S7.Write("DB99.DBX0.0", GVL_BigStation.HeartBeatToPlc);
@@ -2016,7 +2016,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model
}
Thread.Sleep(10);
}), "海科plc和西门子数据交互", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
testRawMaterialNameData();//自定义料仓名称
if (GVL_BigStation.Order_Cancel)
diff --git a/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs b/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs
index f91ee920..56ea467d 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs
@@ -20,7 +20,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.Siemens
bool printFirstLog = false;
public void Init()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IsConnected)
{
diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs
index 6c8c6310..0199dd2d 100644
--- a/BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs
+++ b/BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs
@@ -23,7 +23,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel
PropertyInfo[] properties = type.GetProperties();
double Offset = 0.0;
string addressPos = "";
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
foreach (PropertyInfo mi in properties)
{
diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs
index 7c70df92..52417c5b 100644
--- a/BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs
+++ b/BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs
@@ -80,7 +80,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel
}
}
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
Heartbeat = GVL_BigStation.HeartBeatFromPlc;
Thread.Sleep(100);
diff --git a/BPASmartClient.JXJFoodSmallStation/App.xaml.cs b/BPASmartClient.JXJFoodSmallStation/App.xaml.cs
index ddbca016..20417a73 100644
--- a/BPASmartClient.JXJFoodSmallStation/App.xaml.cs
+++ b/BPASmartClient.JXJFoodSmallStation/App.xaml.cs
@@ -72,7 +72,7 @@ namespace BPASmartClient.JXJFoodSmallStation
Json.Save();
Json.Save();
MessageNotify.GetInstance.LogSave();
- ThreadManage.GetInstance().Dispose();
+ TaskManage.GetInstance.Dispose();
}
private void MenuInit()
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs b/BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs
index db9873d0..42c655d4 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs
@@ -19,7 +19,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.HK_PLC
public PlcReadAddressDB45 DeviceStatus = new PlcReadAddressDB45();
public void Init()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IsConnected)
{
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs b/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
index 897ad763..c84feeea 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
@@ -83,7 +83,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
RegisterInit();
DeviceConnect();
//Json.Data.Recipes = TestData.GetInstance.Recipes;//添加测试数据
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GVL_SmallStation.GetInstance.DisEnableStockAlarm = Json.Data.deviceConnectPar.ShieldStockbinAlarm;
if (HKDevice.IsConnected)
@@ -104,7 +104,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
Thread.Sleep(200);
}), "海科plc通信心跳", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (GVL_SmallStation.GetInstance.Order_Cancel)
{
@@ -117,7 +117,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
Thread.Sleep(10);
}), "小料站流程控制", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
RealTimeData();
foreach (var item in Json.Data.windSendRawMaterial)
@@ -133,7 +133,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
Thread.Sleep(10);
}), "西门子PLC和小料站PLC的实时数据交互流程", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
HKPlcRead();
GetStatus();
@@ -1575,7 +1575,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
WindSendDevice.Init();
MessageNotify.GetInstance.ShowRunLog("风送粉料plc初始化完成");
}
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs b/BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs
index 2d0fd3f4..6a790e7b 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs
@@ -34,7 +34,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
public ObservableCollection devices { get; set; } = new ObservableCollection();
private void DeviceDataInit()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < DeviceLists.Count; i++)
{
@@ -58,7 +58,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
{
devices.ElementAt(deviceIndex).DeviceName = DeviceLists.ElementAt(i).Value.DeviceName;
}
- if (!ThreadManage.GetInstance().IsContainsKey($"{deviceName} 开始监听"))
+ if (!TaskManage.GetInstance.IsContainsKey($"{deviceName} 开始监听"))
{
DeviceLists[DeviceLists.ElementAt(i).Key].Init(deviceName);
}
@@ -112,7 +112,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
//TestData();
IpAddressLines();
DeviceDataInit();
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IPQueues.Count >= IPLists.Count)
IpAddressLines();
@@ -344,7 +344,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
//AlarmHelper.Init();
if (modbusTcp.Connected)
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (modbusTcp.Connected)
{
@@ -408,7 +408,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
public void Dispose()
{
- ThreadManage.GetInstance().StopTask($"{DeviceName} 开始监听");
+ TaskManage.GetInstance.StopTask($"{DeviceName} 开始监听");
}
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs
index 923b55c2..5c7df4f5 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs
@@ -19,7 +19,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.Siemens
public XL_DataColl_DB DataColl = new XL_DataColl_DB();
public void Init()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IsConnected)
{
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
index d384fbcd..9f77d8af 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
@@ -20,7 +20,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
public bool test;
public void Init()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IsConnected)
{
diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs
index 4369b966..ebb7980f 100644
--- a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs
+++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs
@@ -20,7 +20,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
public ManualControlViewModel()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
PlcSystemMode = GVL_SmallStation.GetInstance.PlcSystemMode;
//SystemMode = GVL_SmallStation.GetInstance.PlcSystemMode ? "手动" : "自动";
diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs
index 1e48242b..3dfc6c82 100644
--- a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs
+++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs
@@ -187,7 +187,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
MessageNotify.GetInstance.ShowUserLog("手动清零配方完成数目。");
}
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
RecipeDosingCompleNum = GVL_SmallStation.GetInstance.RecipeDosingCompleNum;
Recipe1DosingComplete = GVL_SmallStation.GetInstance.RecipeStockBinDosing[0].ToBinString();
diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs
index ee128dbc..c2ff5722 100644
--- a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs
+++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs
@@ -50,7 +50,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (devices.Count > 0)
{
@@ -97,7 +97,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
}), "启动配方下发",true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < Recipes.Count; i++)
{
diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs
index 9521020a..935b2a75 100644
--- a/BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs
+++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs
@@ -24,7 +24,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
public RobotViewModel()
{
- ThreadManage.GetInstance().StartLong(() =>
+ TaskManage.GetInstance.StartLong(() =>
{
IsRunProgramNum = GVL_SmallStation.GetInstance.RobotProgramNum;
RobotIsAutoMode = GVL_SmallStation.GetInstance.RobotStatus.GetBitValue(2);
diff --git a/BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj b/BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj
index 85bec872..b6c447bb 100644
--- a/BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj
+++ b/BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/BPASmartClient.JakaRobot/JaKaHelper.cs b/BPASmartClient.JakaRobot/JaKaHelper.cs
index 11f899fc..97ae6bf8 100644
--- a/BPASmartClient.JakaRobot/JaKaHelper.cs
+++ b/BPASmartClient.JakaRobot/JaKaHelper.cs
@@ -101,7 +101,7 @@ namespace BPASmartClient.JakaRobot
//bool ErrorFlag = false;
- //ThreadManage.GetInstance().StartLong(new Action(() =>
+ //TaskManage.GetInstance.StartLong(new Action(() =>
//{
// if (rshd == -1 || login == false)
// {
@@ -149,7 +149,7 @@ namespace BPASmartClient.JakaRobot
MessageLog.GetInstance.Show("节卡机器人物理网络准备就绪");
Thread.Sleep(3000);
bool ErrorFlag = false;
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (rshd == -1 || login == false)
{
diff --git a/BPASmartClient.Juicer/JuicerMachine.cs b/BPASmartClient.Juicer/JuicerMachine.cs
index 6f26cf60..b9098a53 100644
--- a/BPASmartClient.Juicer/JuicerMachine.cs
+++ b/BPASmartClient.Juicer/JuicerMachine.cs
@@ -14,7 +14,7 @@ namespace BPASmartClient.Juicer
{
juicerHelper.Open(communicationPar.SerialPort, communicationPar.BaudRate);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
IsConnected = juicerHelper.IsOpen;
status["JuiceIsConnect"] = juicerHelper.IsOpen;
diff --git a/BPASmartClient.KHKJ/KHKJMachine.cs b/BPASmartClient.KHKJ/KHKJMachine.cs
index d29fb990..6ad55824 100644
--- a/BPASmartClient.KHKJ/KHKJMachine.cs
+++ b/BPASmartClient.KHKJ/KHKJMachine.cs
@@ -40,7 +40,7 @@ namespace BPASmartClient.KHKJ
private void MainLoop()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (!free)
{
@@ -49,7 +49,7 @@ namespace BPASmartClient.KHKJ
Thread.Sleep(500);
}), "KHKJ询问线程");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
ResolveMsg();
}), "KHKJ解析线程");
diff --git a/BPASmartClient.KLMCoffee/CoffeeMachine.cs b/BPASmartClient.KLMCoffee/CoffeeMachine.cs
index 59ce892b..69b0b257 100644
--- a/BPASmartClient.KLMCoffee/CoffeeMachine.cs
+++ b/BPASmartClient.KLMCoffee/CoffeeMachine.cs
@@ -87,7 +87,7 @@ namespace BPASmartClient.KLMCoffee
///
private void MainLoop()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (!free)
{
@@ -96,7 +96,7 @@ namespace BPASmartClient.KLMCoffee
Thread.Sleep(200);
}), "咖啡机询问线程");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
ResolveMsg();
}), "咖啡机解析线程");
diff --git a/BPASmartClient.Lebai/LebaiRobot.cs b/BPASmartClient.Lebai/LebaiRobot.cs
index fe73a251..e15754d8 100644
--- a/BPASmartClient.Lebai/LebaiRobot.cs
+++ b/BPASmartClient.Lebai/LebaiRobot.cs
@@ -42,8 +42,8 @@ namespace BPASmartClient.Lebai
public override void Start()
{
LebaiHelper.GetInstance().Connect(communicationPar.IPAddress);
- ThreadManage.GetInstance().StartLong(() => { LebaiHelper.GetInstance().Reconnect(communicationPar.IPAddress); Thread.Sleep(5000); }, "机器人重连检测");
- ThreadManage.GetInstance().StartLong(() =>
+ TaskManage.GetInstance.StartLong(() => { LebaiHelper.GetInstance().Reconnect(communicationPar.IPAddress); Thread.Sleep(5000); }, "机器人重连检测");
+ TaskManage.GetInstance.StartLong(() =>
{
IsConnected = LebaiHelper.GetInstance().IsConnected;
status["RobotIsConnected"] = LebaiHelper.GetInstance().IsConnected;
diff --git a/BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs b/BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs
index b082b973..163671be 100644
--- a/BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs
+++ b/BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs
@@ -20,7 +20,7 @@ namespace BPASmartClient.PLC
{
modbusTcp.ConnectOk = new Action(() =>
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
IsConnected = modbusTcp.Connected;
if (!IsConnected) IsWork = false;
diff --git a/BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs b/BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs
index 24f2d641..8bbd7b4d 100644
--- a/BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs
+++ b/BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs
@@ -49,7 +49,7 @@ namespace BPASmartClient.MilkTeaCube
break;
}
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
IsConnected = modbus.Connected;
if (!IsConnected) IsWork = false;
diff --git a/BPASmartClient.MilkWithTea/App.xaml.cs b/BPASmartClient.MilkWithTea/App.xaml.cs
index 70f3caea..a8149cc4 100644
--- a/BPASmartClient.MilkWithTea/App.xaml.cs
+++ b/BPASmartClient.MilkWithTea/App.xaml.cs
@@ -1,7 +1,6 @@
global using BPA.Message;
global using BPA.Message.Enum;
global using BPASmartClient.Device;
-global
global using BPA.Helper;
global using BPASmartClient.MilkWithTea.Model;
global using BPASmartClient.Model;
@@ -29,7 +28,7 @@ namespace BPASmartClient.MilkWithTea
{
base.OnStartup(e);
SystemHelper.GetInstance.CreateDesktopShortcut();
-
+
}
}
}
diff --git a/BPASmartClient.MilkWithTea/MainWindow.xaml.cs b/BPASmartClient.MilkWithTea/MainWindow.xaml.cs
index cafe065c..e2517c9b 100644
--- a/BPASmartClient.MilkWithTea/MainWindow.xaml.cs
+++ b/BPASmartClient.MilkWithTea/MainWindow.xaml.cs
@@ -96,7 +96,7 @@ namespace BPASmartClient.MilkWithTea
private void Initialize()
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
GetDevices();
mainConsole = new MainConsole();
@@ -105,7 +105,7 @@ namespace BPASmartClient.MilkWithTea
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
try
{
diff --git a/BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs b/BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs
index d4f5f90f..55315ed4 100644
--- a/BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs
+++ b/BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs
@@ -1,5 +1,5 @@
using BPASmartClient.MorkMOC;
-using CommunityToolkit.Mvvm.Input;
+//using CommunityToolkit.Mvvm.Input;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -19,16 +19,16 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// 本地奶茶配方列表
///
public ObservableCollection localMaterialRecipes { get; set; } = Json.Data.localRecipes;
-
+
///
/// 删除配方奶茶
///
- [BPARelayCommand]
+ //[BPARelayCommand]
private void DeleteRecipe(object o)
{
if (o == null) return;
- if(o is string id)
+ if (o is string id)
{
var res = localMaterialRecipes.FirstOrDefault(p => p.RecipeID == id);
if (res != null)
@@ -36,8 +36,8 @@ namespace BPASmartClient.MilkWithTea.ViewModel
localMaterialRecipes.Remove(res);
Json.Save();
}
-
-
+
+
}
}
@@ -48,11 +48,11 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// 物料位置名称集合
///
public ObservableCollection localMaterails { get; set; } = Json.Data.localMaterails;
-
+
///
/// 更新物料位置
///
- [BPARelayCommand]
+ //[BPARelayCommand]
private void UpdateMaterialPosion()
{
Json.Save();
@@ -61,12 +61,12 @@ namespace BPASmartClient.MilkWithTea.ViewModel
public LocalConfigureViewModel()
{
-
-
+
+
}
-
-
-
+
+
+
}
}
diff --git a/BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs b/BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs
index caab85c8..9b3a67df 100644
--- a/BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs
+++ b/BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs
@@ -1,11 +1,11 @@
-global using CommunityToolkit.Mvvm.Input;
+//global using CommunityToolkit.Mvvm.Input;
using BPA.Helper;
-
+
namespace BPASmartClient.MilkWithTea.ViewModel
{
- partial class MainControlViewModel: NotifyBase
+ partial class MainControlViewModel : NotifyBase
{
///
@@ -21,27 +21,48 @@ namespace BPASmartClient.MilkWithTea.ViewModel
///
/// 订单状态列表
///
- public ObservableCollection orderStatusLists { get; set; } = new ObservableCollection();
+ public ObservableCollection orderStatusLists { get; set; } = new ObservableCollection();
///
/// 等待取餐列表
///
- public ObservableCollection WaitTakeMeal { get; set; } = new ObservableCollection();
+ public ObservableCollection WaitTakeMeal { get; set; } = new ObservableCollection();
///
/// 当前正在制作的奶茶
///
- [ObservableProperty]
+ public string CurrentGood { get { return _currentGood; } set { _currentGood = value; OnPropertyChanged(); } }
private string _currentGood = "茉莉花茶";
+
///
/// 奶茶制作百分比
///
- [ObservableProperty]
+ public string MakePercent { get { return _makePercent; } set { _makePercent = value; OnPropertyChanged(); } }
private string _makePercent = "0";
- [ObservableProperty]
+ ///
+ /// 奶茶制作百分比
+ ///
+ public LocalRecipe SelectedRecipe { get { return _selectedRecipe; } set { _selectedRecipe = value; OnPropertyChanged(); } }
private LocalRecipe _selectedRecipe;
+
+ /////
+ ///// 当前正在制作的奶茶
+ /////
+ //[ObservableProperty]
+ //private string _currentGood = "茉莉花茶";
+
+
+ /////
+ ///// 奶茶制作百分比
+ /////
+ //[ObservableProperty]
+ //private string _makePercent = "0";
+
+ //[ObservableProperty]
+ //private LocalRecipe _selectedRecipe;
+
///
/// 当前正在制作的奶茶
///
@@ -50,14 +71,14 @@ namespace BPASmartClient.MilkWithTea.ViewModel
///
/// 本地奶茶制作
///
- [BPARelayCommand]
+ //[BPARelayCommand]
private void MakeGood()
{
- if(SelectedRecipe == null) return;
- foreach(var item in SelectedRecipe.localMaterails)
+ if (SelectedRecipe == null) return;
+ foreach (var item in SelectedRecipe.localMaterails)
{
var res = Json.Data.localMaterails.FirstOrDefault(p => p.MaterialID == item.MaterialID);
- if ( res!= null)
+ if (res != null)
{
item.MaterialPosition = res.MaterialPosition;
}
@@ -67,7 +88,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
return;
}
}
- ActionManage.GetInstance.Send( "MakeGoods",SelectedRecipe);
+ ActionManage.GetInstance.Send("MakeGoods", SelectedRecipe);
}
@@ -82,13 +103,16 @@ namespace BPASmartClient.MilkWithTea.ViewModel
orderStatusLists.Add(new MorkOrder()
{
- StartDate = "11:20",EndDate ="11:24",CompleteDate ="4",OrderStatus = ORDER_STATUS.COMPLETED_COOK,
- OrderPush = morkOrderPush
+ StartDate = "11:20",
+ EndDate = "11:24",
+ CompleteDate = "4",
+ OrderStatus = ORDER_STATUS.COMPLETED_COOK,
+ OrderPush = morkOrderPush
});
orderStatusLists.Add(new MorkOrder()
{
-
+
StartDate = "11:36",
EndDate = "11:40",
CompleteDate = "4",
@@ -98,7 +122,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
});
orderStatusLists.Add(new MorkOrder()
{
-
+
StartDate = "10:33",
EndDate = "10:28",
CompleteDate = "5",
@@ -111,12 +135,12 @@ namespace BPASmartClient.MilkWithTea.ViewModel
}
-
+
///
/// MQTT 大屏取餐通知委托
///
- public void Init()
+ public void Init()
{
//清除订单数据
//ActionManage.GetInstance.Register(new Action(() =>
@@ -178,7 +202,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
EventBus.GetInstance().Subscribe(0, OrderStatusChangedHandle);
- ActionManage.GetInstance.Register(new Action
public ObservableCollection materialPosions { get; set; } = new ObservableCollection();
- [ObservableProperty]
+
+ public int MaterialID { get { return _materialID; } set { _materialID = value; OnPropertyChanged(); } }
private int _materialID = 0;
///
/// 出料重量
///
- [ObservableProperty]
- private int _outMaterilWeight;
+ public int OutMaterilWeight { get { return _outMaterilWeight; } set { _outMaterilWeight = value; OnPropertyChanged(); } }
+ private int _outMaterilWeight = 0;
///
/// 矫正的通道号
///
- [ObservableProperty]
+ public int CorrectPassway { get { return _CorrectPassway; } set { _CorrectPassway = value; OnPropertyChanged(); } }
private int _CorrectPassway = 0;
+
///
/// 通道是否开启
///
- [ObservableProperty]
- private bool _passwayIsOpen ;
+ public bool PasswayIsOpen { get { return _passwayIsOpen; } set { _passwayIsOpen = value; OnPropertyChanged(); } }
+ private bool _passwayIsOpen;
+
///
/// 矫正重量
///
- [ObservableProperty]
- private int _correctMatetailWeight = 0;
+ public int CorrectMatetailWeight { get { return _correctMatetailWeight; } set { _correctMatetailWeight = value; OnPropertyChanged(); } }
+ private int _correctMatetailWeight;
+
///
- /// 矫正时间
+ /// 矫正重量
///
- [ObservableProperty]
- private int _outTime = 0;
+ public int OutTime { get { return _outTime; } set { _outTime = value; OnPropertyChanged(); } }
+ private int _outTime;
public bool IsEnable { get { return !GLobal.makeEnable; } set { GLobal.makeEnable = !value; OnPropertyChanged(); } }
///
/// 出料动作
///
- [BPARelayCommand]
+ //[BPARelayCommand]
private void OutMaterial()
{
ActionManage.GetInstance.Send("通道口出料", new object[] { MaterialID, OutMaterilWeight });
@@ -64,7 +68,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
///
/// 开始矫正
///
- [BPARelayCommand]
+ //[BPARelayCommand]
private void CheckPassway()
{
@@ -72,7 +76,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
///
/// 开启通道
///
- [BPARelayCommand]
+ //[BPARelayCommand]
private void OpenPassway()
{
@@ -80,7 +84,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
///
/// 确认重量
///
- [BPARelayCommand]
+ //[BPARelayCommand]
private void CheckMaterailWeight()
{
@@ -90,48 +94,52 @@ namespace BPASmartClient.MilkWithTea.ViewModel
///
/// 店铺名称
///
- [ObservableProperty]
- private string? _shopName = string.Empty;
+ public string ShopName { get { return _shopName; } set { _shopName = value; OnPropertyChanged(); } }
+ private string _shopName;
+
///
/// 店铺ID
///
- [ObservableProperty]
- private string? _shopID = string.Empty;
+ public string ShopID { get { return _shopID; } set { _shopID = value; OnPropertyChanged(); } }
+ private string _shopID;
+
///
/// 设备ID
///
- [ObservableProperty]
- private string? _deviceID = string.Empty;
+ public string DeviceID { get { return _deviceID; } set { _deviceID = value; OnPropertyChanged(); } }
+ private string _deviceID;
+
///
/// PLC地址
///
- [ObservableProperty]
- private string? _pLCAdress = string.Empty;
+ public string PLCAdress { get { return _pLCAdress; } set { _pLCAdress = value; OnPropertyChanged(); } }
+ private string _pLCAdress;
- [ObservableProperty]
+ public bool IsPort { get { return _isPort; } set { _isPort = value; OnPropertyChanged(); } }
private bool _isPort = true;
- [ObservableProperty]
+ public Visibility VsIP { get { return _vsIP; } set { _vsIP = value; OnPropertyChanged(); } }
private Visibility _vsIP = Visibility.Hidden;
- [ObservableProperty]
+ public Visibility VsPort { get { return _vsPort; } set { _vsPort = value; OnPropertyChanged(); } }
private Visibility _vsPort = Visibility.Visible;
- [ObservableProperty]
+ public string[] Ports { get { return _ports; } set { _ports = value; OnPropertyChanged(); } }
private string[] _ports;
- [ObservableProperty]
+ public string Prot { get { return _prot; } set { _prot = value; OnPropertyChanged(); } }
private string _prot;
- [BPARelayCommand]
+
+ //[BPARelayCommand]
private void SaveDevices()
{
SaveDeviceMessage();
}
- [BPARelayCommand]
+ //[BPARelayCommand]
private void ChangeCommunation()
{
- if(IsPort)
+ if (IsPort)
{
VsPort = Visibility.Visible;
VsIP = Visibility.Hidden;
@@ -157,24 +165,24 @@ namespace BPASmartClient.MilkWithTea.ViewModel
}
if (GLobal.deviceConfig.Count > 0)
{
- ShopName = GLobal.deviceConfig.ElementAtOrDefault(0).ShopName ;
+ ShopName = GLobal.deviceConfig.ElementAtOrDefault(0).ShopName;
ShopID = GLobal.deviceConfig.ElementAtOrDefault(0).ShopId;
-
+
DeviceID = GLobal.deviceConfig.ElementAtOrDefault(0).deviceModels.ElementAt(0).DeviceId;
PLCAdress = GLobal.deviceConfig.ElementAtOrDefault(0).deviceModels.ElementAt(0).communicationDevcies.ElementAt(0).communicationPar.IPAddress;
}
-
+
}
private void SaveDeviceMessage()
{
-
+
if (GLobal.deviceConfig.Count > 0)
{
GLobal.deviceConfig.ElementAtOrDefault(0).ShopName = ShopName;
GLobal.deviceConfig.ElementAtOrDefault(0).ShopId = ShopID;
GLobal.deviceConfig.ElementAtOrDefault(0).deviceModels.ElementAtOrDefault(0).DeviceId = DeviceID;
- if(IsPort)
+ if (IsPort)
{
GLobal.deviceConfig.ElementAtOrDefault(0).deviceModels.ElementAtOrDefault(0).communicationDevcies.ElementAtOrDefault(0).communicationPar.IsSerialPort = true;
GLobal.deviceConfig.ElementAtOrDefault(0).deviceModels.ElementAtOrDefault(0).communicationDevcies.ElementAtOrDefault(0).communicationPar.SerialPort = Prot;
@@ -192,6 +200,6 @@ namespace BPASmartClient.MilkWithTea.ViewModel
}
-
+
}
}
diff --git a/BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs b/BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs
index 87f67d3c..168fbdb4 100644
--- a/BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs
+++ b/BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs
@@ -7,44 +7,45 @@ using System.Windows.Controls;
namespace BPASmartClient.MilkWithTea.ViewModel
{
- partial class RecipeConfigeViewModel:NotifyBase
+ partial class RecipeConfigeViewModel : NotifyBase
{
public static ObservableCollection Materails { get; set; } = new ObservableCollection();
- public Dictionary materialNames { get; set; } = new Dictionary();
+ public Dictionary materialNames { get; set; } = new Dictionary();
- [ObservableProperty]
- private string _name = String.Empty;
+ public string Name { get { return _name; } set { _name = value; OnPropertyChanged(); } }
+ private string _name;
- [BPARelayCommand]
+
+ //[BPARelayCommand]
private void AddMaterial()
{
Materails.Add(new LocalMaterail());
}
- [BPARelayCommand]
+ //[BPARelayCommand]
private void Delete(object o)
{
if (o == null) return;
- if(o is ListBoxItem id)
+ if (o is ListBoxItem id)
{
- Materails.Remove((LocalMaterail)id.DataContext);
+ Materails.Remove((LocalMaterail)id.DataContext);
}
}
- [BPARelayCommand]
+ //[BPARelayCommand]
private void Save()
{
- if(Name == String.Empty)
+ if (Name == String.Empty)
{
return;
}
- if(Json.Data.localRecipes.FirstOrDefault(p=>p.RecipeName == Name)!= null)
+ if (Json.Data.localRecipes.FirstOrDefault(p => p.RecipeName == Name) != null)
{
return;
}
- foreach(var materail in Materails)
+ foreach (var materail in Materails)
{
- materail.MaterialName = materialNames[materail.MaterialID];
+ materail.MaterialName = materialNames[materail.MaterialID];
}
Json.Data.localRecipes.Add(new LocalRecipe
{
@@ -59,11 +60,11 @@ namespace BPASmartClient.MilkWithTea.ViewModel
public RecipeConfigeViewModel()
{
- if(Json.Data.localMaterails.Count > 0)
+ if (Json.Data.localMaterails.Count > 0)
{
- foreach(var item in Json.Data.localMaterails)
+ foreach (var item in Json.Data.localMaterails)
{
- if(item.MaterialID!=null&&item.MaterialName!=null)
+ if (item.MaterialID != null && item.MaterialName != null)
{
materialNames.Add(item.MaterialID, item.MaterialName);
}
diff --git a/BPASmartClient.Modbus/BPASmartClient.Modbus.csproj b/BPASmartClient.Modbus/BPASmartClient.Modbus.csproj
index 0792c82e..6cdfc5d6 100644
--- a/BPASmartClient.Modbus/BPASmartClient.Modbus.csproj
+++ b/BPASmartClient.Modbus/BPASmartClient.Modbus.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/BPASmartClient.Model/BPASmartClient.Model.csproj b/BPASmartClient.Model/BPASmartClient.Model.csproj
index ffb969b1..d97c330f 100644
--- a/BPASmartClient.Model/BPASmartClient.Model.csproj
+++ b/BPASmartClient.Model/BPASmartClient.Model.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/BPASmartClient.MorkBF/Control_MorkBF.cs b/BPASmartClient.MorkBF/Control_MorkBF.cs
index 0ca17c49..34a4e1e4 100644
--- a/BPASmartClient.MorkBF/Control_MorkBF.cs
+++ b/BPASmartClient.MorkBF/Control_MorkBF.cs
@@ -52,8 +52,8 @@ namespace BPASmartClient.MorkBF
DataParse();//数据解析
ScreenDataServer();//大屏数据上报
ActionManage.GetInstance.Send("更新菜单");
- ThreadManage.GetInstance().Start(FirePot1_Process, "炒锅1流程");
- ThreadManage.GetInstance().Start(FirePot2_Process, "炒锅2流程");
+ TaskManage.GetInstance.Start(FirePot1_Process, "炒锅1流程");
+ TaskManage.GetInstance.Start(FirePot2_Process, "炒锅2流程");
DeviceProcessLogShow("MORKF 设备初始化完成");
}
@@ -1014,7 +1014,7 @@ namespace BPASmartClient.MorkBF
private void ScreenDataServer()
{
LocalMqtt.GetInstance.Init(ScreenDeviceType.大炒);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
List statsModels = new List();
statsModels.Add(new StatsModel() { Name = "帝王蟹", Count = 666 });
diff --git a/BPASmartClient.MorkF/Control_MorkF.cs b/BPASmartClient.MorkF/Control_MorkF.cs
index 2734cbf0..68e4a328 100644
--- a/BPASmartClient.MorkF/Control_MorkF.cs
+++ b/BPASmartClient.MorkF/Control_MorkF.cs
@@ -272,7 +272,7 @@ namespace BPASmartClient.MorkF
private void Task2ReadMaterialData()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
//获取定位到达状态
@@ -302,7 +302,7 @@ namespace BPASmartClient.MorkF
}), 2);
}), "ReadMaterialSmartArriveCompleteData", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
ReadMaterialData();
@@ -423,7 +423,7 @@ namespace BPASmartClient.MorkF
#region 菜品库
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
FoodLibInit();
}), "FoodLibInit");
@@ -434,7 +434,7 @@ namespace BPASmartClient.MorkF
}), "ModeChange");
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
if (!UpdateMaterialLibraryStock())
{
@@ -444,56 +444,56 @@ namespace BPASmartClient.MorkF
}), "SurplusCheck");
ActionManage.GetInstance.Register(new Action((o) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
Electromagnetism(o);
}), "Electromagnetism");
}), "Electromagnetism");
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
PawToPoint1();
}), "PawToPoint1");
}), "PawToPoint1");
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
PawToPoint2();
}), "PawToPoint2");
}), "PawToPoint2");
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
PawToPoint3();
}), "PawToPoint3");
}), "PawToPoint3");
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
GetDistance_1();
}), "GetDistance_1");
}), "GetDistance_1");
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
GetDistance_2();
}), "GetDistance_2");
}), "GetDistance_2");
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
GetDistance_3();
}), "GetDistance_3");
}), "GetDistance_3");
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
PawExtend();
}), "PawTurnFront");
@@ -501,14 +501,14 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
PawShrink();
}), "PawTurnBack");
}), "PawTurnBack");
ActionManage.GetInstance.Register(new Action((list) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
if (list is List list_int)
{
@@ -549,7 +549,7 @@ namespace BPASmartClient.MorkF
}), "ArmRunRight");
ActionManage.GetInstance.Register(new Action((list) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
if (list is List list_int)
{
@@ -562,7 +562,7 @@ namespace BPASmartClient.MorkF
}), "SetNowPosition");
ActionManage.GetInstance.Register(new Action((list) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
if (list is List list_object)
{
@@ -586,7 +586,7 @@ namespace BPASmartClient.MorkF
#region 配料控制
ActionManage.GetInstance.Register(new Action((o) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
OutSeasoning(o, fryIndex);
}), "OutMaterials");
@@ -597,7 +597,7 @@ namespace BPASmartClient.MorkF
#region 炒锅
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
Plc1Reset(fryIndex);
}), "Plc1Reset");
@@ -605,7 +605,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
AddOil();
}), "AddOil");
@@ -613,7 +613,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
StartFire(fryIndex);
}), "StartFire");
@@ -621,7 +621,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
StopFire(fryIndex);
}), "StopFire");
@@ -629,7 +629,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
StartStir(fryIndex);
}), "StartStir");
@@ -637,7 +637,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
StopStir(fryIndex);
}), "StopStir");
@@ -645,7 +645,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
MagnetOn(fryIndex);
}), "MagnetOn");
@@ -653,7 +653,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
MagnetOff(fryIndex);
}), "MagnetOff");
@@ -661,7 +661,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
string error;
OutFood(fryIndex, out error);
@@ -670,7 +670,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
StirArmGoOrigin(fryIndex);
}), "StirArmGoOrigin");
@@ -678,7 +678,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
string error;
StirArmGoWork(fryIndex, out error);
@@ -687,7 +687,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
HBOTGoWork(fryIndex);
}), "HBOTGoWork");
@@ -695,7 +695,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
OutMeal(fryIndex);
}), "OutMeal");
@@ -703,7 +703,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action((o) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
SetFire(o, fryIndex);
}), "SetFire");
@@ -711,7 +711,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action((o) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
SetFry(o);
}), "SetFry");
@@ -719,7 +719,7 @@ namespace BPASmartClient.MorkF
ActionManage.GetInstance.Register(new Action((o) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
SetStir(o, fryIndex);
}), "SetStir");
@@ -840,12 +840,12 @@ namespace BPASmartClient.MorkF
if (!morkFs.ContainsKey(num))
{
//根据调试界面的当前炒锅编号停止炒制线程
- ThreadManage.GetInstance().StopTask(String.Format(striConst, fryIndex.ToString(), nowStirFryGood[fryIndex].GoodName), new Action(() => { Plc1Reset(fryIndex); }));
+ TaskManage.GetInstance.StopTask(String.Format(striConst, fryIndex.ToString(), nowStirFryGood[fryIndex].GoodName), new Action(() => { Plc1Reset(fryIndex); }));
}
else
{
//根据炒锅编号停止炒制线程
- ThreadManage.GetInstance().StopTask(String.Format(striConst, fryIndex.ToString(), nowStirFryGood[num].GoodName), new Action(() => { Plc1Reset(num); }));
+ TaskManage.GetInstance.StopTask(String.Format(striConst, fryIndex.ToString(), nowStirFryGood[num].GoodName), new Action(() => { Plc1Reset(num); }));
}
}
@@ -1530,7 +1530,7 @@ namespace BPASmartClient.MorkF
}
WriteSpeed(50000);//移动速度
- //ThreadManage.GetInstance().Start(new Action(() =>
+ //TaskManage.GetInstance.Start(new Action(() =>
//{
// //收缩爪子
// PawShrink();
@@ -1834,7 +1834,7 @@ namespace BPASmartClient.MorkF
///
private void GetMaterailTest(MaterialOperation materialOperation)
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
bool ret = false;
try
@@ -1955,7 +1955,7 @@ namespace BPASmartClient.MorkF
///
public void Plc1Reset(int num)
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
StopFire(num);
Thread.Sleep(200);
@@ -2581,7 +2581,7 @@ namespace BPASmartClient.MorkF
//炒锅取菜状态置为未取到
morkFs[i].GetMaterialComplete = false;
//开启线程进行炒制
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
try
{
@@ -2604,7 +2604,7 @@ namespace BPASmartClient.MorkF
foreach (var potActions in res.StirPotActions)
{
- if (ThreadManage.GetInstance().IsComplete(String.Format(striConst, i.ToString(), nowStirFryGood[i].GoodName)))
+ if (TaskManage.GetInstance.IsComplete(String.Format(striConst, i.ToString(), nowStirFryGood[i].GoodName)))
{
return;
}
@@ -2837,7 +2837,7 @@ namespace BPASmartClient.MorkF
morkFs[i].ScreenClear();
//异常菜品统计数量+1
morkFs[i].orderAbnormalCount++;
- ThreadManage.GetInstance().StopTask($"炒锅{i}{res.GoodName}炒制线程");
+ TaskManage.GetInstance.StopTask($"炒锅{i}{res.GoodName}炒制线程");
MessageLog.GetInstance.ShowEx($"炒锅{i}炒制菜品{res.GoodName}出错,错误信息:" + ex.Message);
}
finally
@@ -2865,7 +2865,7 @@ namespace BPASmartClient.MorkF
///
private void UpdateMaterialSurplus()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
List listSurplus = MaterialSurplusOperation.GetInstance().materialSurplus.dicSurplus;
@@ -2923,7 +2923,7 @@ namespace BPASmartClient.MorkF
ml_morkf.MaterailIsWorking = true;
MessageLog.GetInstance.Show("开始操作菜品库");
- //ThreadManage.GetInstance().Start(new Action(()=>{
+ //TaskManage.GetInstance.Start(new Action(()=>{
// GetMaterail(res.x_high, res.y, res.fryNum);
//}),"菜品库操作");
GetMaterailTest(res);
@@ -2944,7 +2944,7 @@ namespace BPASmartClient.MorkF
private void ScreenDataServer()
{
LocalMqtt.GetInstance.Init(ScreenDeviceType.小炒);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
//statsModels.Add(new StatsModel() { Name = "帝王蟹", Count = 666 });
ScreenModelMinWok maxWok = new ScreenModelMinWok
diff --git a/BPASmartClient.MorkF/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkF/ViewModel/DebugViewModel.cs
index e1876535..7bf9883a 100644
--- a/BPASmartClient.MorkF/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkF/ViewModel/DebugViewModel.cs
@@ -318,7 +318,7 @@ namespace BPASmartClient.MorkF.ViewModel
;
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
//variableMonitors = Plugin.GetInstance()?.GetPlugin()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
diff --git a/BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs b/BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs
index 5f5ce179..b41f4ee1 100644
--- a/BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs
+++ b/BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs
@@ -1029,7 +1029,7 @@ namespace BPASmartClient.MorkF.ViewModel
PhysicalMaterialCoordinate();
ActionManage.GetInstance.Register(new Action((o) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
if(o is List nums)
{
@@ -1039,7 +1039,7 @@ namespace BPASmartClient.MorkF.ViewModel
}), "CalibrationCallBack");
ActionManage.GetInstance.Register(new Action((o) =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
if (o is List nums)
{
diff --git a/BPASmartClient.MorkMOC/Control_MorkMOC.cs b/BPASmartClient.MorkMOC/Control_MorkMOC.cs
index 73f14073..961b3a18 100644
--- a/BPASmartClient.MorkMOC/Control_MorkMOC.cs
+++ b/BPASmartClient.MorkMOC/Control_MorkMOC.cs
@@ -8,7 +8,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-
+using static BPA.Helper.EventBus;
namespace BPASmartClient.MorkMOC
{
@@ -22,7 +22,7 @@ namespace BPASmartClient.MorkMOC
//放大倍数
const int expand = 10;
-
+
public override void DoMain()
{
ServerInit();
@@ -132,9 +132,9 @@ namespace BPASmartClient.MorkMOC
/// 设定出料重量
///
///
- private void SetMaterialsWeight(Dictionary goodPushes)
+ private void SetMaterialsWeight(Dictionary goodPushes)
{
- foreach(var good in goodPushes)
+ foreach (var good in goodPushes)
{
WriteControl(polymerBatching.plcData[good.Key - 1].WeightVar, good.Value * expand);
DeviceProcessLogShow($"{good.Key}号通道出料量:{good.Value}g");
@@ -151,7 +151,7 @@ namespace BPASmartClient.MorkMOC
{
WriteControl(polymerBatching.plcData[good.Key - 1].StartUpVar, true);
Thread.Sleep(3000);//写入PLC开启通道后 PLC会先把完成信号置0,等待出料完成后置1
- while(!morkMoc.OutMaterailCompelete)//接收到完成信号后退出循环
+ while (!morkMoc.OutMaterailCompelete)//接收到完成信号后退出循环
{
Thread.Sleep(1000);
//需要加入超时提示或处理
@@ -165,7 +165,7 @@ namespace BPASmartClient.MorkMOC
{
GetStatus("M10.0", new Action((obj) =>
{
- if (obj is bool[] bools && bools.Length > 0 )
+ if (obj is bool[] bools && bools.Length > 0)
{
morkMoc.OutMaterailCompelete = bools[0];
}
@@ -182,14 +182,14 @@ namespace BPASmartClient.MorkMOC
ActionManage.GetInstance.Register(new Action((o) =>
{
if (o == null) return;
- if(o is LocalRecipe recipe)
+ if (o is LocalRecipe recipe)
{
Dictionary OrderPushes = new Dictionary();
- foreach(var item in recipe.localMaterails)
+ foreach (var item in recipe.localMaterails)
{
OrderPushes.Add(Convert.ToInt32(item.MaterialPosition), Convert.ToInt32(item.MaterialWeight));
}
-
+
morkMoc.morkOrderPushes.Enqueue(new OrderLocInfo()
{
GoodName = recipe.RecipeName,
@@ -197,7 +197,7 @@ namespace BPASmartClient.MorkMOC
GoodPushes = OrderPushes
});
}
- }),"MakeGoods");
+ }), "MakeGoods");
}
public override void Stop()
diff --git a/BPASmartClient.MorkMOC/Model/LocalMaterail.cs b/BPASmartClient.MorkMOC/Model/LocalMaterail.cs
index c138fd4d..634bcf3d 100644
--- a/BPASmartClient.MorkMOC/Model/LocalMaterail.cs
+++ b/BPASmartClient.MorkMOC/Model/LocalMaterail.cs
@@ -8,45 +8,48 @@ using System.Threading.Tasks;
namespace BPASmartClient.MorkMOC
{
- public partial class LocalMaterail:NotifyBase
+ public partial class LocalMaterail : NotifyBase
{
///
/// 物料ID
///
- [ObservableProperty]
- private string? _materialID;
- ///
- /// 物料本地名称
- ///
- [ObservableProperty]
- private string? _materialName;
+ public string MaterialID { get { return _materialID; } set { _materialID = value; OnPropertyChanged(); } }
+ private string _materialID;
+
+ ///
+ /// 物料本地名称
+ ///
+ public string MaterialName { get { return _materialName; } set { _materialName = value; OnPropertyChanged(); } }
+ private string _materialName;
+
///
/// 物料位置
///
- [ObservableProperty]
- private int? _materialPosition;
+ public int MaterialPosition { get { return _materialPosition; } set { _materialPosition = value; OnPropertyChanged(); } }
+ private int _materialPosition;
+
///
/// 物料重量
///
- [ObservableProperty]
- private string? _materialWeight;
-
-
+ public string MaterialWeight { get { return _materialWeight; } set { _materialWeight = value; OnPropertyChanged(); } }
+ private string _materialWeight;
}
- public partial class LocalRecipe:NotifyBase
+ public partial class LocalRecipe : NotifyBase
{
///
- /// 配方ID
+ /// 物料重量
///
- [ObservableProperty]
- private string? _recipeID;
+ public string RecipeID { get { return _recipeID; } set { _recipeID = value; OnPropertyChanged(); } }
+ private string _recipeID;
+
///
/// 配方名称
///
- [ObservableProperty]
- private string? _recipeName;
+ public string RecipeName { get { return _recipeName; } set { _recipeName = value; OnPropertyChanged(); } }
+ private string _recipeName;
+
///
/// 原料集合
///
diff --git a/BPASmartClient.MorkMV1/Control_MorkMV1.cs b/BPASmartClient.MorkMV1/Control_MorkMV1.cs
index 9125d970..68a3b434 100644
--- a/BPASmartClient.MorkMV1/Control_MorkMV1.cs
+++ b/BPASmartClient.MorkMV1/Control_MorkMV1.cs
@@ -65,7 +65,7 @@ namespace BPASmartClient.MorkMV1
if (o.Length > 0)
{
Random rd = new Random();
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
int NoodleLoc = (int)o[0] == 0 ? rd.Next(1, 6) : (int)o[0];
int BowlLoc = (int)o[1] == 0 ? rd.Next(10, 12) : (int)o[1];
diff --git a/BPASmartClient.MorkMV1/DataServer.cs b/BPASmartClient.MorkMV1/DataServer.cs
index df8c5da9..607168dc 100644
--- a/BPASmartClient.MorkMV1/DataServer.cs
+++ b/BPASmartClient.MorkMV1/DataServer.cs
@@ -26,7 +26,7 @@ namespace BPASmartClient.MorkMV1
mQTTProxy.ConnectOk = new Action(() =>
{
mQTTProxy.Subscrib(ScreenTOPIC.GetInstance.GetTopic(ScreenDeviceType.煮面机));
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
morkS.MorkS_OrderCount = Json.Data.Count;
SendScreenDataModel sendScreenDataModel = new SendScreenDataModel();
diff --git a/BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs
index f28f4676..5e80cb8d 100644
--- a/BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs
@@ -37,7 +37,7 @@ namespace BPASmartClient.MorkMV1.ViewModel
});
SimOrderRandomCloseCommand = new BPARelayCommand(() =>
{
- ThreadManage.GetInstance().StopTask("ForOrder");
+ TaskManage.GetInstance.StopTask("ForOrder");
MessageLog.GetInstance.Show("停止模拟随机订单");
});
EnableLacalSimOrder = new BPARelayCommand(() =>
diff --git a/BPASmartClient.MorkMW/Control_MorkMW.cs b/BPASmartClient.MorkMW/Control_MorkMW.cs
index 28c2f481..5cd3dc3a 100644
--- a/BPASmartClient.MorkMW/Control_MorkMW.cs
+++ b/BPASmartClient.MorkMW/Control_MorkMW.cs
@@ -37,7 +37,7 @@ namespace BPASmartClient.MorkMW
ConnectKlpRobot("192.168.0.100", 8001);
ServerInit();
DataParse();
- ThreadManage.GetInstance().StartLong(new Action(() => { VariableMonitor(); Thread.Sleep(5); }), "˱״̬߳", true);
+ TaskManage.GetInstance.StartLong(new Action(() => { VariableMonitor(); Thread.Sleep(5); }), "˱״̬߳", true);
}
private void VaribleMonitorDis()
diff --git a/BPASmartClient.MorkS/Control_Morks.cs b/BPASmartClient.MorkS/Control_Morks.cs
index 4fa8aa12..63673f5e 100644
--- a/BPASmartClient.MorkS/Control_Morks.cs
+++ b/BPASmartClient.MorkS/Control_Morks.cs
@@ -63,7 +63,7 @@ namespace BPASmartClient.MorkS
if (o.Length > 0)
{
Random rd = new Random();
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
int NoodleLoc = (int)o[0] == 0 ? rd.Next(1, 6) : (int)o[0];
int BowlLoc = (int)o[1] == 0 ? rd.Next(10, 12) : (int)o[1];
diff --git a/BPASmartClient.MorkS/DataServer.cs b/BPASmartClient.MorkS/DataServer.cs
index 6d7e01db..695a772b 100644
--- a/BPASmartClient.MorkS/DataServer.cs
+++ b/BPASmartClient.MorkS/DataServer.cs
@@ -26,7 +26,7 @@ namespace BPASmartClient.MorkS
mQTTProxy.ConnectOk = new Action(() =>
{
mQTTProxy.Subscrib(ScreenTOPIC.GetInstance.GetTopic(ScreenDeviceType.煮面机));
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
morkS.MorkS_OrderCount = Json.Data.Count;
SendScreenDataModel sendScreenDataModel = new SendScreenDataModel();
diff --git a/BPASmartClient.MorkS/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkS/ViewModel/DebugViewModel.cs
index 0dc55ecd..ca3f2412 100644
--- a/BPASmartClient.MorkS/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkS/ViewModel/DebugViewModel.cs
@@ -37,7 +37,7 @@ namespace BPASmartClient.MorkS.ViewModel
});
SimOrderRandomCloseCommand = new BPARelayCommand(() =>
{
- ThreadManage.GetInstance().StopTask("ForOrder");
+ TaskManage.GetInstance.StopTask("ForOrder");
MessageLog.GetInstance.Show("停止模拟随机订单");
});
EnableLacalSimOrder = new BPARelayCommand(() =>
diff --git a/BPASmartClient.MorkS/VoiceAPI.cs b/BPASmartClient.MorkS/VoiceAPI.cs
index 12ff63aa..9bc10513 100644
--- a/BPASmartClient.MorkS/VoiceAPI.cs
+++ b/BPASmartClient.MorkS/VoiceAPI.cs
@@ -14,7 +14,7 @@
// {
// public VoiceAPI()
// {
-// BPA.Helper.ThreadManage.GetInstance().StartLong(new Action(() =>
+// BPA.Helper.TaskManage.GetInstance.StartLong(new Action(() =>
// {
// while (msg.Count > 0)
// {
diff --git a/BPASmartClient.MorkS3/Control_Morks.cs b/BPASmartClient.MorkS3/Control_Morks.cs
index 698ba3a4..fe6d3e27 100644
--- a/BPASmartClient.MorkS3/Control_Morks.cs
+++ b/BPASmartClient.MorkS3/Control_Morks.cs
@@ -61,7 +61,7 @@ namespace BPASmartClient.MorkS3
if (o.Length > 0)
{
Random rd = new Random();
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
int NoodleLoc = (int)o[0] == 0 ? rd.Next(1, 6) : (int)o[0];
int BowlLoc = (int)o[1] == 0 ? rd.Next(10, 12) : (int)o[1];
diff --git a/BPASmartClient.MorkS3/DataServer.cs b/BPASmartClient.MorkS3/DataServer.cs
index 22062658..fe8fb9c9 100644
--- a/BPASmartClient.MorkS3/DataServer.cs
+++ b/BPASmartClient.MorkS3/DataServer.cs
@@ -26,7 +26,7 @@ namespace BPASmartClient.MorkS3
mQTTProxy.Connected = new Action(() =>
{
mQTTProxy.Subscrib(ScreenTOPIC.GetInstance.GetTopic(ScreenDeviceType.煮面机));
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
morkS.MorkS_OrderCount = Json.Data.Count;
SendScreenDataModel sendScreenDataModel = new SendScreenDataModel();
diff --git a/BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs
index e09cc384..a32bc15d 100644
--- a/BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs
@@ -37,7 +37,7 @@ namespace BPASmartClient.MorkS3.ViewModel
});
SimOrderRandomCloseCommand = new BPARelayCommand(() =>
{
- ThreadManage.GetInstance().StopTask("ForOrder");
+ TaskManage.GetInstance.StopTask("ForOrder");
MessageLog.GetInstance.Show("停止模拟随机订单");
});
EnableLacalSimOrder = new BPARelayCommand(() =>
diff --git a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs
index 447f4756..d3692369 100644
--- a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs
+++ b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs
@@ -62,7 +62,7 @@
// if (o.Length > 0)
// {
// Random rd = new Random();
-// ThreadManage.GetInstance().StartLong(new Action(() =>
+// TaskManage.GetInstance.StartLong(new Action(() =>
// {
// int NoodleLoc = (int)o[0] == 0 ? rd.Next(1, 6) : (int)o[0];
// int BowlLoc = (int)o[1] == 0 ? rd.Next(10, 12) : (int)o[1];
diff --git a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs
index cca244e3..2f7c165c 100644
--- a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs
+++ b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs
@@ -63,7 +63,7 @@ namespace BPASmartClient.MorkSUpgradedVer
if (o.Length > 0)
{
Random rd = new Random();
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
int NoodleLoc = (int)o[0] == 0 ? rd.Next(1, 6) : (int)o[0];
int BowlLoc = (int)o[1] == 0 ? rd.Next(10, 12) : (int)o[1];
diff --git a/BPASmartClient.MorkSUpgradedVer/DataServer.cs b/BPASmartClient.MorkSUpgradedVer/DataServer.cs
index bb23b186..ad3b8786 100644
--- a/BPASmartClient.MorkSUpgradedVer/DataServer.cs
+++ b/BPASmartClient.MorkSUpgradedVer/DataServer.cs
@@ -25,7 +25,7 @@ namespace BPASmartClient.MorkSUpgradedVer
mQTTProxy.ConnectOk = new Action(() =>
{
mQTTProxy.Subscrib(ScreenTOPIC.GetInstance.GetTopic(ScreenDeviceType.煮面机));
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
morkS.MorkS_OrderCount = Json.Data.Count;
SendScreenDataModel sendScreenDataModel = new SendScreenDataModel();
diff --git a/BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs
index 26f2cd8a..23a5ec49 100644
--- a/BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs
@@ -37,7 +37,7 @@ namespace BPASmartClient.MorkSUpgradedVer.ViewModel
});
SimOrderRandomCloseCommand = new BPARelayCommand(() =>
{
- ThreadManage.GetInstance().StopTask("ForOrder");
+ TaskManage.GetInstance.StopTask("ForOrder");
MessageLog.GetInstance.Show("停止模拟随机订单");
});
EnableLacalSimOrder = new BPARelayCommand(() =>
diff --git a/BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs b/BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs
index e9268639..6a6a6eb4 100644
--- a/BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs
+++ b/BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs
@@ -28,8 +28,8 @@ namespace BPASmartClient.MorkTJAKAJC.View
private void Dubug_Unloaded(object sender, RoutedEventArgs e)
{
- ThreadManage.GetInstance().StopTask("MorkT-状态刷新");
- ThreadManage.GetInstance().StopTask("MorkT-传感器监视");
+ TaskManage.GetInstance.StopTask("MorkT-状态刷新");
+ TaskManage.GetInstance.StopTask("MorkT-传感器监视");
}
}
diff --git a/BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs
index cca39553..e6ffb927 100644
--- a/BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs
@@ -233,7 +233,7 @@ namespace BPASmartClient.MorkTLebaiJC.ViewModel;
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
variableMonitors = Plugin.GetInstance()?.GetPlugin()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
diff --git a/BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs b/BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs
index 93f64ee0..7e305630 100644
--- a/BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs
+++ b/BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs
@@ -48,7 +48,7 @@ namespace BPASmartClient.MorkTLebaiJC.ViewModel
if (device.Name == "MorkT") DeviceId = device.DeviceId;
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
EventBus.GetInstance().Publish(new LebaiRobot_GetTCPInputEvent() { DeviceId = DeviceId, Pin = 1 },(res)=>
{
diff --git a/BPASmartClient.MorkT/View/DebugView.xaml.cs b/BPASmartClient.MorkT/View/DebugView.xaml.cs
index b00103d1..a2f989ea 100644
--- a/BPASmartClient.MorkT/View/DebugView.xaml.cs
+++ b/BPASmartClient.MorkT/View/DebugView.xaml.cs
@@ -28,8 +28,8 @@ namespace BPASmartClient.MorkT.View
private void Dubug_Unloaded(object sender, RoutedEventArgs e)
{
- ThreadManage.GetInstance().StopTask("MorkT-状态刷新");
- ThreadManage.GetInstance().StopTask("MorkT-传感器监视");
+ TaskManage.GetInstance.StopTask("MorkT-状态刷新");
+ TaskManage.GetInstance.StopTask("MorkT-传感器监视");
}
}
diff --git a/BPASmartClient.MorkT/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT/ViewModel/DebugViewModel.cs
index af6d1688..ddb62115 100644
--- a/BPASmartClient.MorkT/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkT/ViewModel/DebugViewModel.cs
@@ -233,7 +233,7 @@ namespace BPASmartClient.MorkT.ViewModel;
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
variableMonitors = Plugin.GetInstance()?.GetPlugin()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
diff --git a/BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs b/BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs
index d2e7de4c..6a7f0fd1 100644
--- a/BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs
+++ b/BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs
@@ -48,7 +48,7 @@ namespace BPASmartClient.MorkT.ViewModel
if (device.Name == "MorkT") DeviceId = device.DeviceId;
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
EventBus.GetInstance().Publish(new LebaiRobot_GetTCPInputEvent() { DeviceId = DeviceId, Pin = 1 },(res)=>
{
diff --git a/BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs b/BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs
index 40a16ba1..e25f0667 100644
--- a/BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs
+++ b/BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs
@@ -28,8 +28,8 @@ namespace BPASmartClient.MorkT_BarCounter.View
private void Dubug_Unloaded(object sender, RoutedEventArgs e)
{
- ThreadManage.GetInstance().StopTask("MorkT-状态刷新");
- ThreadManage.GetInstance().StopTask("MorkT-传感器监视");
+ TaskManage.GetInstance.StopTask("MorkT-状态刷新");
+ TaskManage.GetInstance.StopTask("MorkT-传感器监视");
}
}
diff --git a/BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs b/BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs
index 254bb845..03da5fe8 100644
--- a/BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs
+++ b/BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs
@@ -28,8 +28,8 @@ namespace BPASmartClient.MorkT_BarCounter.View
private void Dubug_Unloaded(object sender, RoutedEventArgs e)
{
- ThreadManage.GetInstance().StopTask("MorkT-状态刷新");
- ThreadManage.GetInstance().StopTask("MorkT-传感器监视");
+ TaskManage.GetInstance.StopTask("MorkT-状态刷新");
+ TaskManage.GetInstance.StopTask("MorkT-传感器监视");
}
}
diff --git a/BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs b/BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs
index 19a8fb07..d6611b20 100644
--- a/BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs
+++ b/BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs
@@ -327,7 +327,7 @@ namespace BPASmartClient.MorkT_BarCounter.ViewModel;
if (device.Name == "MorkT") DeviceId = device.DeviceId
;
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
variableMonitors = Plugin.GetInstance()?.GetPlugin()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
if (variableMonitors != null && variableMonitors.Count > 0)
diff --git a/BPASmartClient.MorkT_Container/View/DebugView.xaml.cs b/BPASmartClient.MorkT_Container/View/DebugView.xaml.cs
index 24a4ab5f..fd66aed2 100644
--- a/BPASmartClient.MorkT_Container/View/DebugView.xaml.cs
+++ b/BPASmartClient.MorkT_Container/View/DebugView.xaml.cs
@@ -28,8 +28,8 @@ namespace BPASmartClient.MorkT_Container.View
private void Dubug_Unloaded(object sender, RoutedEventArgs e)
{
- /* ThreadManage.GetInstance().StopTask("MorkT-状态刷新");
- ThreadManage.GetInstance().StopTask("MorkT-传感器监视");*/
+ /* TaskManage.GetInstance.StopTask("MorkT-状态刷新");
+ TaskManage.GetInstance.StopTask("MorkT-传感器监视");*/
}
}
diff --git a/BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs
index 18c314bb..13b421a5 100644
--- a/BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs
@@ -339,7 +339,7 @@ namespace BPASmartClient.MorkT_Container.ViewModel;
if (device.Name == "Container") DeviceId = device.DeviceId
;
});
- ThreadManage.GetInstance().StartLong(new Action(async () =>
+ TaskManage.GetInstance.StartLong(new Action(async () =>
{
variableMonitors = Plugin.GetInstance()?.GetPlugin()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
if (variableMonitors != null && variableMonitors.Count > 0)
diff --git a/BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs b/BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs
index 32c5c704..ad7eacf6 100644
--- a/BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs
+++ b/BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs
@@ -28,8 +28,8 @@ namespace BPASmartClient.MorkTHQ.View
private void Dubug_Unloaded(object sender, RoutedEventArgs e)
{
- //ThreadManage.GetInstance().StopTask("MorkT-状态刷新");
- //ThreadManage.GetInstance().StopTask("MorkT-传感器监视");
+ //TaskManage.GetInstance.StopTask("MorkT-状态刷新");
+ //TaskManage.GetInstance.StopTask("MorkT-传感器监视");
}
}
}
diff --git a/BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs
index ba9fe968..7f2c976c 100644
--- a/BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs
@@ -353,7 +353,7 @@ namespace BPASmartClient.MorkTHQ.ViewModel
if (device.Name == "MorkTHQ") DeviceId = device.DeviceId
;
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
variableMonitors = Plugin.GetInstance()?.GetPlugin()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
diff --git a/BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs b/BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs
index a7730b77..0dfcead9 100644
--- a/BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs
+++ b/BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs
@@ -48,7 +48,7 @@ namespace BPASmartClient.MorkTHQ.ViewModel
if (device.Name == "MorkT") DeviceId = device.DeviceId;
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
EventBus.GetInstance().Publish(new LebaiRobot_GetTCPInputEvent() { DeviceId = DeviceId, Pin = 1 },(res)=>
{
diff --git a/BPASmartClient.Morkt.JAKA.JC/View/DebugView.xaml.cs b/BPASmartClient.Morkt.JAKA.JC/View/DebugView.xaml.cs
index e9268639..6a6a6eb4 100644
--- a/BPASmartClient.Morkt.JAKA.JC/View/DebugView.xaml.cs
+++ b/BPASmartClient.Morkt.JAKA.JC/View/DebugView.xaml.cs
@@ -28,8 +28,8 @@ namespace BPASmartClient.MorkTJAKAJC.View
private void Dubug_Unloaded(object sender, RoutedEventArgs e)
{
- ThreadManage.GetInstance().StopTask("MorkT-状态刷新");
- ThreadManage.GetInstance().StopTask("MorkT-传感器监视");
+ TaskManage.GetInstance.StopTask("MorkT-状态刷新");
+ TaskManage.GetInstance.StopTask("MorkT-传感器监视");
}
}
diff --git a/BPASmartClient.Morkt.JAKA.JC/ViewModel/DebugViewModel.cs b/BPASmartClient.Morkt.JAKA.JC/ViewModel/DebugViewModel.cs
index d51b3c72..dd51bccf 100644
--- a/BPASmartClient.Morkt.JAKA.JC/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.Morkt.JAKA.JC/ViewModel/DebugViewModel.cs
@@ -196,7 +196,7 @@ namespace BPASmartClient.MorkTJAKAJC.ViewModel;
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
variableMonitors = Plugin.GetInstance()?.GetPlugin()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
diff --git a/BPASmartClient.Morkt.JAKA.JC/ViewModel/MonitorViewModel.cs b/BPASmartClient.Morkt.JAKA.JC/ViewModel/MonitorViewModel.cs
index 951ffd96..32e3de82 100644
--- a/BPASmartClient.Morkt.JAKA.JC/ViewModel/MonitorViewModel.cs
+++ b/BPASmartClient.Morkt.JAKA.JC/ViewModel/MonitorViewModel.cs
@@ -48,7 +48,7 @@ namespace BPASmartClient.MorkTJAKAJC.ViewModel
if (device.Name == "MorkT") DeviceId = device.DeviceId;
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
EventBus.GetInstance().Publish(new LebaiRobot_GetTCPInputEvent() { DeviceId = DeviceId, Pin = 1 },(res)=>
{
diff --git a/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj b/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj
index acd5e94b..77be7485 100644
--- a/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj
+++ b/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/BPASmartClient.Nfc/NFCHelper.cs b/BPASmartClient.Nfc/NFCHelper.cs
index 7d509c70..4effa6cf 100644
--- a/BPASmartClient.Nfc/NFCHelper.cs
+++ b/BPASmartClient.Nfc/NFCHelper.cs
@@ -178,7 +178,7 @@ namespace BPASmartClient.Nfc
public void Init()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
Read();
if (GetReadResult.ErrorInfo.Length > 0) MessageLog.GetInstance.Show(GetReadResult.ErrorInfo);
diff --git a/BPASmartClient.S7Net/BPASmartClient.S7Net.csproj b/BPASmartClient.S7Net/BPASmartClient.S7Net.csproj
index 642839d7..2aa9c3a4 100644
--- a/BPASmartClient.S7Net/BPASmartClient.S7Net.csproj
+++ b/BPASmartClient.S7Net/BPASmartClient.S7Net.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/BPASmartClient.SCChip/ICChipMachine.cs b/BPASmartClient.SCChip/ICChipMachine.cs
index b7939f2e..bfa6c4df 100644
--- a/BPASmartClient.SCChip/ICChipMachine.cs
+++ b/BPASmartClient.SCChip/ICChipMachine.cs
@@ -114,7 +114,7 @@ namespace BPASmartClient.SCChip
///
private void MainLoop()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
ResolveMsg();
}), "单片机解析线程");
diff --git a/BPASmartClient.ScreenLib/Helper/Main.cs b/BPASmartClient.ScreenLib/Helper/Main.cs
index f7d2ce58..e90104e9 100644
--- a/BPASmartClient.ScreenLib/Helper/Main.cs
+++ b/BPASmartClient.ScreenLib/Helper/Main.cs
@@ -106,7 +106,7 @@ namespace BPASmartClient.ScreenLib
///
public void ThreadServer()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
@@ -183,7 +183,7 @@ namespace BPASmartClient.ScreenLib
}
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1ViewModel.cs b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1ViewModel.cs
index 832ee997..19bcbd9b 100644
--- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1ViewModel.cs
+++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1ViewModel.cs
@@ -55,7 +55,7 @@ namespace BPASmartClient.ScreenLib
public ScreenSplitMealsControl1ViewModel()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2ViewModel.cs b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2ViewModel.cs
index 3737cc2e..b4b29b3d 100644
--- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2ViewModel.cs
+++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2ViewModel.cs
@@ -55,7 +55,7 @@ namespace BPASmartClient.ScreenLib
public ScreenSplitMealsControl2ViewModel()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs
index 8c57f70a..fac756b3 100644
--- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs
+++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs
@@ -55,7 +55,7 @@ namespace BPASmartClient.ScreenLib
public ScreenSplitMealsControl3ViewModel()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
diff --git a/BPASmartClient.ScreenLib/总监视大屏/ScreenALLControlViewModel.cs b/BPASmartClient.ScreenLib/总监视大屏/ScreenALLControlViewModel.cs
index 8b1a29b1..30dc6280 100644
--- a/BPASmartClient.ScreenLib/总监视大屏/ScreenALLControlViewModel.cs
+++ b/BPASmartClient.ScreenLib/总监视大屏/ScreenALLControlViewModel.cs
@@ -147,7 +147,7 @@ namespace BPASmartClient.ScreenLib
///
public void Init()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
diff --git a/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControlViewModel.cs b/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControlViewModel.cs
index 9e0e3760..3098a281 100644
--- a/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControlViewModel.cs
+++ b/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControlViewModel.cs
@@ -85,7 +85,7 @@ namespace BPASmartClient.ScreenLib
public ScreenMaxWokControlViewModel()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
diff --git a/BPASmartClient.ScreenLib/炒锅/ScreenMinWokControlViewModel.cs b/BPASmartClient.ScreenLib/炒锅/ScreenMinWokControlViewModel.cs
index a4429133..9e4e8d45 100644
--- a/BPASmartClient.ScreenLib/炒锅/ScreenMinWokControlViewModel.cs
+++ b/BPASmartClient.ScreenLib/炒锅/ScreenMinWokControlViewModel.cs
@@ -84,7 +84,7 @@ namespace BPASmartClient.ScreenLib
public ScreenMinWokControlViewModel()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
diff --git a/BPASmartClient.ScreenLib/煮面机/ScreenMorksControlViewModel.cs b/BPASmartClient.ScreenLib/煮面机/ScreenMorksControlViewModel.cs
index dd4c3d64..8b727055 100644
--- a/BPASmartClient.ScreenLib/煮面机/ScreenMorksControlViewModel.cs
+++ b/BPASmartClient.ScreenLib/煮面机/ScreenMorksControlViewModel.cs
@@ -71,7 +71,7 @@ namespace BPASmartClient.ScreenLib
public ScreenMorksControlViewModel()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
diff --git a/BPASmartClient.SerialPort/BPASmartClient.SerialPort.csproj b/BPASmartClient.SerialPort/BPASmartClient.SerialPort.csproj
index 8f58c3f6..2c99f76d 100644
--- a/BPASmartClient.SerialPort/BPASmartClient.SerialPort.csproj
+++ b/BPASmartClient.SerialPort/BPASmartClient.SerialPort.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/BPASmartClient.SerialPort/RobotGripperHelper.cs b/BPASmartClient.SerialPort/RobotGripperHelper.cs
index b2bdf875..4fd4769d 100644
--- a/BPASmartClient.SerialPort/RobotGripperHelper.cs
+++ b/BPASmartClient.SerialPort/RobotGripperHelper.cs
@@ -44,7 +44,7 @@ namespace BPASmartClient.SerialPort
MessageLog.GetInstance.ShowEx(ex.ToString());
}
}
- /* ThreadManage.GetInstance().StartLong(new Action(() =>
+ /* TaskManage.GetInstance.StartLong(new Action(() =>
{
Thread.Sleep(5000);
diff --git a/BPASmartClient.SmallBatchingSystem/App.xaml.cs b/BPASmartClient.SmallBatchingSystem/App.xaml.cs
index 309d54d9..2d8376bb 100644
--- a/BPASmartClient.SmallBatchingSystem/App.xaml.cs
+++ b/BPASmartClient.SmallBatchingSystem/App.xaml.cs
@@ -23,7 +23,7 @@ namespace BPASmartClient.SmallBatchingSystem
{
//1366*768
base.OnStartup(e);
- BPASmartClient.Helper.SystemHelper.GetInstance.CreateDesktopShortcut();
+ SystemHelper.GetInstance.CreateDesktopShortcut();
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Json.Read();
Json.Read();
diff --git a/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj b/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj
index eea7dbef..c436e43d 100644
--- a/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj
+++ b/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/BPASmartClient.SmallBatchingSystem/Services/Control.cs b/BPASmartClient.SmallBatchingSystem/Services/Control.cs
index 5a241054..9cb86a76 100644
--- a/BPASmartClient.SmallBatchingSystem/Services/Control.cs
+++ b/BPASmartClient.SmallBatchingSystem/Services/Control.cs
@@ -27,12 +27,12 @@ namespace BPASmartClient.SmallBatchingSystem
public void Init()
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
PlcServer.GetInstance.Connect();
}), "设备初始化");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
while (MakeOrderQueue.Count > 0)
{
@@ -417,7 +417,7 @@ namespace BPASmartClient.SmallBatchingSystem
public void DebugLog(string info)
{
- BPASmartClient.Message.MessageLog.GetInstance.DebugLog(info);
+ MessageLog.GetInstance.Show(info);
}
public void NotifyPrompt(string info)
diff --git a/BPASmartClient.SmallBatchingSystem/Services/PlcServer.cs b/BPASmartClient.SmallBatchingSystem/Services/PlcServer.cs
index 860e58dc..ca0e43b6 100644
--- a/BPASmartClient.SmallBatchingSystem/Services/PlcServer.cs
+++ b/BPASmartClient.SmallBatchingSystem/Services/PlcServer.cs
@@ -25,7 +25,7 @@ namespace BPASmartClient.SmallBatchingSystem
Communication.ConnectOk = new Action(() =>
{
MessageLog.GetInstance.Show("设备连接成功");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
//带称程序
var res = ReadData("M20.0", 1);//到达目标位置信号
diff --git a/BPASmartClient.TourismCollege/App.xaml.cs b/BPASmartClient.TourismCollege/App.xaml.cs
index ab955f06..66a0f914 100644
--- a/BPASmartClient.TourismCollege/App.xaml.cs
+++ b/BPASmartClient.TourismCollege/App.xaml.cs
@@ -65,7 +65,7 @@ namespace BPASmartClient.TourismCollege
{
base.OnExit(e);
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.LogSave();
- ThreadManage.GetInstance().Dispose();
+ TaskManage.GetInstance.Dispose();
}
private void MenuInit()
diff --git a/BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj b/BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj
index b08c2dcc..9a606950 100644
--- a/BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj
+++ b/BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/BPASmartClient.Update/BPASmartClient.Update.csproj b/BPASmartClient.Update/BPASmartClient.Update.csproj
index 4ca5cbe3..a3865ba7 100644
--- a/BPASmartClient.Update/BPASmartClient.Update.csproj
+++ b/BPASmartClient.Update/BPASmartClient.Update.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/BPASmartClient.ViewModel/OrderListDialogViewModel.cs b/BPASmartClient.ViewModel/OrderListDialogViewModel.cs
index d2eac418..6a7b4264 100644
--- a/BPASmartClient.ViewModel/OrderListDialogViewModel.cs
+++ b/BPASmartClient.ViewModel/OrderListDialogViewModel.cs
@@ -25,7 +25,7 @@ namespace BPASmartClient.ViewModel
if (Json.Data.orderLists.Count > 0)
{
MessageLog.GetInstance.Show($"ǰʣ{Json.Data.orderLists.Count}");
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
Thread.Sleep(10000);
if (!IsAutoClose) ActionManage.GetInstance.Send("Close", false);
diff --git a/BPASmartClient/App.xaml.cs b/BPASmartClient/App.xaml.cs
index 0229979c..468acbd2 100644
--- a/BPASmartClient/App.xaml.cs
+++ b/BPASmartClient/App.xaml.cs
@@ -113,7 +113,7 @@ namespace BPASmartClient
//IotReport.Close();
//SqlHelper.GetInstance.Save();
//MainConsole.Main.GetInstance.DataSave();
- ThreadManage.GetInstance().Dispose();
+ TaskManage.GetInstance.Dispose();
System.Environment.Exit(0);
}
diff --git a/BPASmartClient/MainWindow.xaml.cs b/BPASmartClient/MainWindow.xaml.cs
index 3b99fd48..0b18b63f 100644
--- a/BPASmartClient/MainWindow.xaml.cs
+++ b/BPASmartClient/MainWindow.xaml.cs
@@ -83,7 +83,7 @@ namespace BPASmartClient
};
MenuItem_Click(new MenuItem() { Tag = "LogView", Header = "日志监视" }, null);
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
GetDevices();
mainConsole = new MainConsole();
@@ -92,7 +92,7 @@ namespace BPASmartClient
ActionManage.GetInstance.Register(new Action(() =>
{
- ThreadManage.GetInstance().Start(new Action(() =>
+ TaskManage.GetInstance.Start(new Action(() =>
{
try
{
diff --git a/DosingSystem/App.xaml.cs b/DosingSystem/App.xaml.cs
index 8ab35e35..285f4b14 100644
--- a/DosingSystem/App.xaml.cs
+++ b/DosingSystem/App.xaml.cs
@@ -105,7 +105,7 @@ namespace BPASmartClient.DosingSystem
Json.Save();
Json.Save();
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.LogSave();
- ThreadManage.GetInstance().Dispose();
+ TaskManage.GetInstance.Dispose();
}
private void MenuInit()
diff --git a/DosingSystem/BPASmartClient.DosingSystem.csproj b/DosingSystem/BPASmartClient.DosingSystem.csproj
index 437e8b2e..41590e01 100644
--- a/DosingSystem/BPASmartClient.DosingSystem.csproj
+++ b/DosingSystem/BPASmartClient.DosingSystem.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/DosingSystem/Model/DeviceInquire.cs b/DosingSystem/Model/DeviceInquire.cs
index ecb4eeea..7d62a5c0 100644
--- a/DosingSystem/Model/DeviceInquire.cs
+++ b/DosingSystem/Model/DeviceInquire.cs
@@ -32,7 +32,7 @@ namespace BPASmartClient.DosingSystem
public ObservableCollection devices { get; set; } = new ObservableCollection();
private void DeviceDataInit()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < DeviceLists.Count; i++)
{
@@ -147,7 +147,7 @@ namespace BPASmartClient.DosingSystem
IpAddressLines();
SiemensDevice.GetInstance.Connect(Json.Data.BaseParModel.DeviceAddress);
DeviceDataInit();
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IPQueues.Count >= IPLists.Count)
IpAddressLines();
@@ -342,7 +342,7 @@ namespace BPASmartClient.DosingSystem
AlarmHelper.Init();
if (modbusTcp.Connected)
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
this.DeviceName = modbusTcp.GetString(DeviceAddress.DeviceName, 20)?.Trim()?.Replace(" ", "");
deviceStatus.RunStatus = (ushort)this.modbusTcp.ReadShort(DeviceAddress.RunStatus); //获取设备运行状态
@@ -376,7 +376,7 @@ namespace BPASmartClient.DosingSystem
public void Dispose()
{
- ThreadManage.GetInstance().StopTask($"{DeviceName} 开始监听");
+ TaskManage.GetInstance.StopTask($"{DeviceName} 开始监听");
}
public void Start(float Value)
diff --git a/DosingSystem/Service/SiemensDevice.cs b/DosingSystem/Service/SiemensDevice.cs
index 71ec3705..9c7873e0 100644
--- a/DosingSystem/Service/SiemensDevice.cs
+++ b/DosingSystem/Service/SiemensDevice.cs
@@ -23,7 +23,7 @@ namespace BPASmartClient.DosingSystem
public bool tempValue = false;
public void Connect(string ip)
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (IsConnect)
{
@@ -32,7 +32,7 @@ namespace BPASmartClient.DosingSystem
}
Thread.Sleep(200);
}), "设备心跳", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
diff --git a/DosingSystem/View/HardwareStatusView.xaml.cs b/DosingSystem/View/HardwareStatusView.xaml.cs
index 0cfd0041..551a9b18 100644
--- a/DosingSystem/View/HardwareStatusView.xaml.cs
+++ b/DosingSystem/View/HardwareStatusView.xaml.cs
@@ -24,7 +24,7 @@ namespace BPASmartClient.DosingSystem.View
public HardwareStatusView()
{
InitializeComponent();
- this.Unloaded += (o, e) => { ThreadManage.GetInstance().StopTask("输送带料仓状态监控"); };
+ this.Unloaded += (o, e) => { TaskManage.GetInstance.StopTask("输送带料仓状态监控"); };
}
}
}
diff --git a/DosingSystem/View/ManualControlView.xaml.cs b/DosingSystem/View/ManualControlView.xaml.cs
index 5f2f056f..49fc62bf 100644
--- a/DosingSystem/View/ManualControlView.xaml.cs
+++ b/DosingSystem/View/ManualControlView.xaml.cs
@@ -24,7 +24,7 @@ namespace BPASmartClient.DosingSystem.View
public ManualControlView()
{
InitializeComponent();
- this.Unloaded += (o, e) => { ThreadManage.GetInstance().StopTask("手动气缸状态监控"); };
+ this.Unloaded += (o, e) => { TaskManage.GetInstance.StopTask("手动气缸状态监控"); };
this.SizeChanged += ManualControlView_SizeChanged;
this.cy.Height = this.list1.ActualHeight + 40;
this.zd.Height = this.list2.ActualHeight + 40;
diff --git a/DosingSystem/ViewModel/HardwareStatusViewModel.cs b/DosingSystem/ViewModel/HardwareStatusViewModel.cs
index c1193712..f6e11a71 100644
--- a/DosingSystem/ViewModel/HardwareStatusViewModel.cs
+++ b/DosingSystem/ViewModel/HardwareStatusViewModel.cs
@@ -35,7 +35,7 @@ namespace BPASmartClient.DosingSystem.ViewModel
// }
// }
//});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < Json.Data.OutletInfoModels.Count; i++)
{
diff --git a/DosingSystem/ViewModel/ManualControlViewModel.cs b/DosingSystem/ViewModel/ManualControlViewModel.cs
index e9bbdbba..10663395 100644
--- a/DosingSystem/ViewModel/ManualControlViewModel.cs
+++ b/DosingSystem/ViewModel/ManualControlViewModel.cs
@@ -115,7 +115,7 @@ namespace BPASmartClient.DosingSystem.ViewModel
ModelSwitchText = res ? "自动" : "手动";
});
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < cylinderModels.Count; i++)
{
diff --git a/DosingSystem/ViewModel/RecipeControlViewModel.cs b/DosingSystem/ViewModel/RecipeControlViewModel.cs
index 86cefcf6..5f31dc8d 100644
--- a/DosingSystem/ViewModel/RecipeControlViewModel.cs
+++ b/DosingSystem/ViewModel/RecipeControlViewModel.cs
@@ -105,7 +105,7 @@ namespace BPASmartClient.DosingSystem.ViewModel
///
private void RecipeRun()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (RecipeNames.Count > 0)
{
@@ -286,7 +286,7 @@ namespace BPASmartClient.DosingSystem.ViewModel
///
private void RecipeStatusInquire()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < Recipes.Count; i++)
{
diff --git a/FryPot_DosingSystem/Control/DeviceOperate.cs b/FryPot_DosingSystem/Control/DeviceOperate.cs
index 1dfece24..6e4cc24c 100644
--- a/FryPot_DosingSystem/Control/DeviceOperate.cs
+++ b/FryPot_DosingSystem/Control/DeviceOperate.cs
@@ -241,7 +241,7 @@ namespace FryPot_DosingSystem.Control
{
if (IsConfig)
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
//滚筒线
try
@@ -284,7 +284,7 @@ namespace FryPot_DosingSystem.Control
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
@@ -324,7 +324,7 @@ namespace FryPot_DosingSystem.Control
}
Thread.Sleep(10);
}), $"炒锅1实时数据读取线程");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
@@ -361,7 +361,7 @@ namespace FryPot_DosingSystem.Control
}
Thread.Sleep(10);
}), $"炒锅2实时数据读取线程");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
//炒锅3
try
@@ -400,7 +400,7 @@ namespace FryPot_DosingSystem.Control
}
Thread.Sleep(10);
}), $"炒锅3实时数据读取线程");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
@@ -439,7 +439,7 @@ namespace FryPot_DosingSystem.Control
}
Thread.Sleep(10);
}), $"炒锅4实时数据读取线程");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{
diff --git a/FryPot_DosingSystem/Control/DosingLogicControl.cs b/FryPot_DosingSystem/Control/DosingLogicControl.cs
index 0d7db3f2..694aa6be 100644
--- a/FryPot_DosingSystem/Control/DosingLogicControl.cs
+++ b/FryPot_DosingSystem/Control/DosingLogicControl.cs
@@ -463,41 +463,41 @@ namespace FryPot_DosingSystem.Control
private void HeatBeatToPlc()
{
- ThreadManage.GetInstance().StartLong(new Action(() => {
+ TaskManage.GetInstance.StartLong(new Action(() => {
DeviceOperate.GetInstance.WritePlcData("D0001", 1);
Thread.Sleep(500);
DeviceOperate.GetInstance.WritePlcData("D0001", 0);
Thread.Sleep(500);
}), "上位机心跳下发滚筒线", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
DeviceOperate.GetInstance.WritePotOnePlcData("D0001", 1);
Thread.Sleep(500);
DeviceOperate.GetInstance.WritePotOnePlcData("D0001", 0);
Thread.Sleep(500);
}), "上位机心跳下发1号炒锅", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
DeviceOperate.GetInstance.WritePotTwoPlcData("D0001", 1);
Thread.Sleep(500);
DeviceOperate.GetInstance.WritePotTwoPlcData("D0001", 0);
Thread.Sleep(500);
}), "上位机心跳下发2号炒锅", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
DeviceOperate.GetInstance.WritePotThreePlcData("D0001", 1);
Thread.Sleep(500);
DeviceOperate.GetInstance.WritePotThreePlcData("D0001", 0);
Thread.Sleep(500);
}), "上位机心跳下发3号炒锅", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
DeviceOperate.GetInstance.WritePotFourPlcData("D0001", 1);
Thread.Sleep(500);
DeviceOperate.GetInstance.WritePotFourPlcData("D0001", 0);
Thread.Sleep(500);
}), "上位机心跳下发4号炒锅", true);
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
DeviceOperate.GetInstance.WritePotFivePlcData("D0001", 1);
Thread.Sleep(500);
@@ -1380,22 +1380,22 @@ namespace FryPot_DosingSystem.Control
///
private void ResetProgram()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
if (RTrig.GetInstance("ResetProgram").Start(globalVar.PlcInite == 1))//判断是否初始化 一初始化就重启主任务
{
MessageNotify.GetInstance.ShowUserLog("主任务正在重启");
- ThreadManage.GetInstance().StopTask("MainViewReadPlcData", new Action(() =>
+ TaskManage.GetInstance.StopTask("MainViewReadPlcData", new Action(() =>
{
//ActionManage.GetInstance.CancelRegister("RecipeSetDown");
//ActionManage.GetInstance.Register(new Action(RecipeDataParse), "RecipeSetDown");
// ActionManage.GetInstance.Send("ClearRecipes");
- ThreadManage.GetInstance().StopTask("滚筒线1任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线1任务线程", new Action(() =>
{
- ThreadManage.GetInstance().StopTask("滚筒线2任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线2任务线程", new Action(() =>
{
- ThreadManage.GetInstance().StopTask("滚筒线3任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线3任务线程", new Action(() =>
{
globalVar = null;
globalVar = new GlobalVariable();
@@ -1416,7 +1416,7 @@ namespace FryPot_DosingSystem.Control
public void LineOneTaskRestart()
{
- ThreadManage.GetInstance().StopTask("滚筒线1任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线1任务线程", new Action(() =>
{
WritePlcData("D1101", 0);//复位开始执行指令
ActionManage.GetInstance.Send("ClearOneRecipes");
@@ -1457,14 +1457,14 @@ namespace FryPot_DosingSystem.Control
globalVar.agvLineOneLoadCom = false;
ErrorRecipe = false;
- ThreadManage.GetInstance().StartLong(new Action(() => { LineOneProcessExecute(); Thread.Sleep(10); }), "滚筒线1任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineOneProcessExecute(); Thread.Sleep(10); }), "滚筒线1任务线程");
MessageNotify.GetInstance.ShowUserLog("滚筒线【1】任务重启成功");
}));
}
public void LineTwoTaskRestart()
{
- ThreadManage.GetInstance().StopTask("滚筒线2任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线2任务线程", new Action(() =>
{
WritePlcData("D1102", 0);//复位开始执行指令
ActionManage.GetInstance.Send("ClearTwoRecipes");
@@ -1505,13 +1505,13 @@ namespace FryPot_DosingSystem.Control
globalVar.agvLineTwoLoadCom = false;
LTwoErrorRecipe = false;
- ThreadManage.GetInstance().StartLong(new Action(() => { LineTwoProcessExecute(); Thread.Sleep(10); }), "滚筒线2任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineTwoProcessExecute(); Thread.Sleep(10); }), "滚筒线2任务线程");
MessageNotify.GetInstance.ShowUserLog("滚筒线【2】任务重启成功");
}));
}
public void LineThreeTaskRestart()
{
- ThreadManage.GetInstance().StopTask("滚筒线3任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线3任务线程", new Action(() =>
{
WritePlcData("D1103", 0);//复位开始执行指令
ActionManage.GetInstance.Send("ClearThreeRecipes");
@@ -1547,14 +1547,14 @@ namespace FryPot_DosingSystem.Control
globalVar.rollerLineThree.agvArriveLineFour = false;
globalVar.agvLineThreeLoadCom = false;
LThreeErrorRecipe = false;
- ThreadManage.GetInstance().StartLong(new Action(() => { LineThreeProcessExecute(); Thread.Sleep(10); }), "滚筒线3任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineThreeProcessExecute(); Thread.Sleep(10); }), "滚筒线3任务线程");
MessageNotify.GetInstance.ShowUserLog("滚筒线【3】任务重启成功");
}));
}
public void LineOneEmptyRollerCleanTaskRestart()
{
- ThreadManage.GetInstance().StopTask("滚筒线1空桶清洗任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线1空桶清洗任务线程", new Action(() =>
{
globalVar.rollerLineOne.StationEight = 0;
globalVar.ExitLineOneTask = false;
@@ -1568,7 +1568,7 @@ namespace FryPot_DosingSystem.Control
globalVar.rollerLineOne.agvArriveCleanUnLoad = false;
globalVar.agvArriveLineOneLoadEmptyRoller = false;
globalVar.agvArriveLineOneLoadCom = false;
- ThreadManage.GetInstance().StartLong(new Action(() => { LineOneToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线1空桶清洗任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineOneToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线1空桶清洗任务线程");
MessageNotify.GetInstance.ShowUserLog("滚筒线【1】空桶清洗任务重启成功");
}));
}
@@ -1576,7 +1576,7 @@ namespace FryPot_DosingSystem.Control
public void LineTwoEmptyRollerCleanTaskRestart()
{
- ThreadManage.GetInstance().StopTask("滚筒线2空桶清洗任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线2空桶清洗任务线程", new Action(() =>
{
globalVar.rollerLineTwo.StationEight = 0;
@@ -1593,14 +1593,14 @@ namespace FryPot_DosingSystem.Control
globalVar.rollerLineTwo.agvArriveCleanUnLoad = false;
globalVar.agvArriveLineTwoLoadEmptyRoller = false;
globalVar.agvArriveLineTwoLoadCom = false;
- ThreadManage.GetInstance().StartLong(new Action(() => { LineTwoToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线2空桶清洗任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineTwoToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线2空桶清洗任务线程");
MessageNotify.GetInstance.ShowUserLog("滚筒线【2】空桶清洗任务重启成功");
}));
}
public void LineThreeEmptyRollerCleanTaskRestart()
{
- ThreadManage.GetInstance().StopTask("滚筒线3空桶清洗任务线程", new Action(() =>
+ TaskManage.GetInstance.StopTask("滚筒线3空桶清洗任务线程", new Action(() =>
{
globalVar.rollerLineThree.StationEight = 0;
globalVar.ExitLineThreeTask = false;
@@ -1614,7 +1614,7 @@ namespace FryPot_DosingSystem.Control
globalVar.rollerLineThree.agvArriveCleanUnLoad = false;
globalVar.agvArriveLineThreeLoadEmptyRoller = false;
globalVar.agvArriveLineThreeLoadCom = false;
- ThreadManage.GetInstance().StartLong(new Action(() => { LineThreeToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线3空桶清洗任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineThreeToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线3空桶清洗任务线程");
MessageNotify.GetInstance.ShowUserLog("滚筒线【3】空桶清洗任务重启成功");
}));
}
@@ -1623,7 +1623,7 @@ namespace FryPot_DosingSystem.Control
///
public void ReadPlcData()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GetAddressData("D0000", new Action((data) =>
{
@@ -1667,7 +1667,7 @@ namespace FryPot_DosingSystem.Control
}));
Thread.Sleep(500);
}), "滚筒线心跳检测");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GetFryOneData("D0000", new Action((data) =>
{
@@ -1710,7 +1710,7 @@ namespace FryPot_DosingSystem.Control
Thread.Sleep(500);
}), "炒锅1心跳检测");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GetFryTwoData("D0000", new Action((data) =>
{
@@ -1752,7 +1752,7 @@ namespace FryPot_DosingSystem.Control
}));
Thread.Sleep(500);
}), "炒锅2心跳检测");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GetFryThreeData("D0000", new Action((data) =>
{
@@ -1794,7 +1794,7 @@ namespace FryPot_DosingSystem.Control
}));
Thread.Sleep(500);
}), "炒锅3心跳检测");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GetFryFourData("D0000", new Action((data) =>
{
@@ -1835,7 +1835,7 @@ namespace FryPot_DosingSystem.Control
}));
Thread.Sleep(500);
}), "炒锅4心跳检测");
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GetFryFiveData("D0000", new Action((data) =>
{
@@ -1878,7 +1878,7 @@ namespace FryPot_DosingSystem.Control
Thread.Sleep(500);
}), "炒锅5心跳检测");
//PLC数据读取
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
GetAddressData("D2001", new Action((data) =>
{
@@ -3392,14 +3392,14 @@ namespace FryPot_DosingSystem.Control
//LTwoFryPotOutputMaterial();
//LThreeFryPotOutputMaterial();
- ThreadManage.GetInstance().StartLong(new Action(() => { LineOneProcessExecute(); Thread.Sleep(10); }), "滚筒线1任务线程");
- ThreadManage.GetInstance().StartLong(new Action(() => { LineTwoProcessExecute(); Thread.Sleep(10); }), "滚筒线2任务线程");
- ThreadManage.GetInstance().StartLong(new Action(() => { LineThreeProcessExecute(); Thread.Sleep(10); }), "滚筒线3任务线程");
- ThreadManage.GetInstance().StartLong(new Action(() => { LineOneToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线1空桶清洗任务线程");
- ThreadManage.GetInstance().StartLong(new Action(() => { LineTwoToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线2空桶清洗任务线程");
- ThreadManage.GetInstance().StartLong(new Action(() => { LineThreeToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线3空桶清洗任务线程");
- ThreadManage.GetInstance().StartLong(new Action(() => { ToLineFourFromCleanPlate(); Thread.Sleep(10); }), "清洗台空桶回桶任务线程");
- ThreadManage.GetInstance().StartLong(new Action(() => { EmptyRollerToLinFourFromPot(); Thread.Sleep(10); }), "炒锅空桶回桶任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineOneProcessExecute(); Thread.Sleep(10); }), "滚筒线1任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineTwoProcessExecute(); Thread.Sleep(10); }), "滚筒线2任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineThreeProcessExecute(); Thread.Sleep(10); }), "滚筒线3任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineOneToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线1空桶清洗任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineTwoToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线2空桶清洗任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { LineThreeToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线3空桶清洗任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { ToLineFourFromCleanPlate(); Thread.Sleep(10); }), "清洗台空桶回桶任务线程");
+ TaskManage.GetInstance.StartLong(new Action(() => { EmptyRollerToLinFourFromPot(); Thread.Sleep(10); }), "炒锅空桶回桶任务线程");
}
diff --git a/WpfTest/MainWindow.xaml.cs b/WpfTest/MainWindow.xaml.cs
index 230b2892..588593ff 100644
--- a/WpfTest/MainWindow.xaml.cs
+++ b/WpfTest/MainWindow.xaml.cs
@@ -49,7 +49,7 @@ namespace WpfTest
}
public void ThreadServer()
{
- ThreadManage.GetInstance().StartLong(new Action(() =>
+ TaskManage.GetInstance.StartLong(new Action(() =>
{
try
{