Sfoglia il codice sorgente

分支调整合并

JXJAgvReake
pry 1 anno fa
parent
commit
e16afc9d10
100 ha cambiato i file con 347 aggiunte e 312 eliminazioni
  1. +1
    -1
      BPASmartClient.Business/BPASmartClient.Business.csproj
  2. +1
    -1
      BPASmartClient.Business/Plugin/MQTTMgr.cs
  3. +2
    -2
      BPASmartClient.Business/Plugin/OrderProxy.cs
  4. +2
    -2
      BPASmartClient.Business/Plugin/StatusMgr.cs
  5. +1
    -1
      BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
  6. +1
    -1
      BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs
  7. +1
    -1
      BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs
  8. +1
    -1
      BPASmartClient.CustomResource/Pages/Model/VoiceAPI.cs
  9. +2
    -2
      BPASmartClient.DRCoffee/CoffeeMachine.cs
  10. +9
    -9
      BPASmartClient.Device/BaseDevice.cs
  11. +2
    -2
      BPASmartClient.DosingSystemSingle/App.xaml.cs
  12. +1
    -1
      BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj
  13. +4
    -4
      BPASmartClient.DosingSystemSingle/Model/DeviceInquire.cs
  14. +2
    -2
      BPASmartClient.DosingSystemSingle/Service/SiemensDevice.cs
  15. +1
    -1
      BPASmartClient.DosingSystemSingle/View/HardwareStatusView.xaml.cs
  16. +1
    -1
      BPASmartClient.DosingSystemSingle/View/ManualControlView.xaml.cs
  17. +1
    -1
      BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs
  18. +1
    -1
      BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs
  19. +2
    -2
      BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs
  20. +1
    -1
      BPASmartClient.FoodStationTest/App.xaml.cs
  21. +1
    -1
      BPASmartClient.FoodStationTest/BPASmartClient.FoodStationTest.csproj
  22. +1
    -1
      BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs
  23. +5
    -5
      BPASmartClient.FoodStationTest/Model/ProcessControl.cs
  24. +5
    -5
      BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs
  25. +1
    -1
      BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs
  26. +1
    -1
      BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs
  27. +2
    -2
      BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs
  28. +2
    -2
      BPASmartClient.GSIceCream/IceCreamMachine.cs
  29. +1
    -1
      BPASmartClient.IceMaker/IceMakerMachine.cs
  30. +2
    -2
      BPASmartClient.IoT/DataVClient.cs
  31. +1
    -1
      BPASmartClient.IoT/Model/FileUpload.cs
  32. +1
    -1
      BPASmartClient.JAKA/JakaMachine.cs
  33. +1
    -1
      BPASmartClient.JXJFoodBigStation/App.xaml.cs
  34. +1
    -1
      BPASmartClient.JXJFoodBigStation/BPASmartClient.JXJFoodBigStation.csproj
  35. +1
    -1
      BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
  36. +3
    -3
      BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
  37. +1
    -1
      BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs
  38. +1
    -1
      BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs
  39. +1
    -1
      BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs
  40. +1
    -1
      BPASmartClient.JXJFoodSmallStation/App.xaml.cs
  41. +1
    -1
      BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs
  42. +5
    -5
      BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
  43. +5
    -5
      BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs
  44. +1
    -1
      BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs
  45. +1
    -1
      BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
  46. +1
    -1
      BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs
  47. +1
    -1
      BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs
  48. +2
    -2
      BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs
  49. +1
    -1
      BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs
  50. +1
    -1
      BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj
  51. +2
    -2
      BPASmartClient.JakaRobot/JaKaHelper.cs
  52. +1
    -1
      BPASmartClient.Juicer/JuicerMachine.cs
  53. +2
    -2
      BPASmartClient.KHKJ/KHKJMachine.cs
  54. +2
    -2
      BPASmartClient.KLMCoffee/CoffeeMachine.cs
  55. +2
    -2
      BPASmartClient.Lebai/LebaiRobot.cs
  56. +1
    -1
      BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs
  57. +1
    -1
      BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs
  58. +1
    -2
      BPASmartClient.MilkWithTea/App.xaml.cs
  59. +2
    -2
      BPASmartClient.MilkWithTea/MainWindow.xaml.cs
  60. +13
    -13
      BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs
  61. +46
    -22
      BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs
  62. +48
    -40
      BPASmartClient.MilkWithTea/ViewModel/PatrameterSettiongViewModel.cs
  63. +17
    -16
      BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs
  64. +1
    -1
      BPASmartClient.Modbus/BPASmartClient.Modbus.csproj
  65. +1
    -1
      BPASmartClient.Model/BPASmartClient.Model.csproj
  66. +3
    -3
      BPASmartClient.MorkBF/Control_MorkBF.cs
  67. +44
    -44
      BPASmartClient.MorkF/Control_MorkF.cs
  68. +1
    -1
      BPASmartClient.MorkF/ViewModel/DebugViewModel.cs
  69. +2
    -2
      BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs
  70. +10
    -10
      BPASmartClient.MorkMOC/Control_MorkMOC.cs
  71. +23
    -20
      BPASmartClient.MorkMOC/Model/LocalMaterail.cs
  72. +1
    -1
      BPASmartClient.MorkMV1/Control_MorkMV1.cs
  73. +1
    -1
      BPASmartClient.MorkMV1/DataServer.cs
  74. +1
    -1
      BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs
  75. +1
    -1
      BPASmartClient.MorkMW/Control_MorkMW.cs
  76. +1
    -1
      BPASmartClient.MorkS/Control_Morks.cs
  77. +1
    -1
      BPASmartClient.MorkS/DataServer.cs
  78. +1
    -1
      BPASmartClient.MorkS/ViewModel/DebugViewModel.cs
  79. +1
    -1
      BPASmartClient.MorkS/VoiceAPI.cs
  80. +1
    -1
      BPASmartClient.MorkS3/Control_Morks.cs
  81. +1
    -1
      BPASmartClient.MorkS3/DataServer.cs
  82. +1
    -1
      BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs
  83. +1
    -1
      BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs
  84. +1
    -1
      BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs
  85. +1
    -1
      BPASmartClient.MorkSUpgradedVer/DataServer.cs
  86. +1
    -1
      BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs
  87. +2
    -2
      BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs
  88. +1
    -1
      BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs
  89. +1
    -1
      BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs
  90. +2
    -2
      BPASmartClient.MorkT/View/DebugView.xaml.cs
  91. +1
    -1
      BPASmartClient.MorkT/ViewModel/DebugViewModel.cs
  92. +1
    -1
      BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs
  93. +2
    -2
      BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs
  94. +2
    -2
      BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs
  95. +1
    -1
      BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs
  96. +2
    -2
      BPASmartClient.MorkT_Container/View/DebugView.xaml.cs
  97. +1
    -1
      BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs
  98. +2
    -2
      BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs
  99. +1
    -1
      BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs
  100. +1
    -1
      BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs

+ 1
- 1
BPASmartClient.Business/BPASmartClient.Business.csproj Vedi File

@@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="BPA.ApolloClient" Version="1.0.12" />
<PackageReference Include="BPA.Communication" Version="1.0.106" />
<PackageReference Include="BPA.Communication" Version="1.0.107" />
<PackageReference Include="BPA.Message" Version="1.0.86" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />


+ 1
- 1
BPASmartClient.Business/Plugin/MQTTMgr.cs Vedi File

@@ -67,7 +67,7 @@ namespace BPASmartClient.Business
ClientId = $"ClientId-[{clientId}]-DeviceId-[{deviceId}]-{Guid.NewGuid()}"
});

ThreadManage.GetInstance().Start(() =>
TaskManage.GetInstance.Start(() =>
{
while (running)
{


+ 2
- 2
BPASmartClient.Business/Plugin/OrderProxy.cs Vedi File

@@ -44,7 +44,7 @@ namespace BPASmartClient.Business
deviceMgr = Plugin.GetInstance().GetPlugin<DeviceMgr>();
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)


+ 2
- 2
BPASmartClient.Business/Plugin/StatusMgr.cs Vedi File

@@ -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<BPA.Models.BatchingInfo>();

ThreadManage.GetInstance().Start(() =>
TaskManage.GetInstance.Start(() =>
{
while (running)
{


+ 1
- 1
BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj Vedi File

@@ -459,7 +459,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.Helper" Version="1.0.66" />
<PackageReference Include="BPA.Helper" Version="1.0.67" />
<PackageReference Include="BPA.Message" Version="1.0.86" />
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" />
</ItemGroup>


+ 1
- 1
BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs Vedi File

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


+ 1
- 1
BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs Vedi File

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


+ 1
- 1
BPASmartClient.CustomResource/Pages/Model/VoiceAPI.cs Vedi File

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


+ 2
- 2
BPASmartClient.DRCoffee/CoffeeMachine.cs Vedi File

@@ -87,7 +87,7 @@ namespace BPASmartClient.DRCoffee
/// </summary>
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<byte> temp = new List<byte>();
//一系列解包


+ 9
- 9
BPASmartClient.Device/BaseDevice.cs Vedi File

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


+ 2
- 2
BPASmartClient.DosingSystemSingle/App.xaml.cs Vedi File

@@ -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<LocaPar>.Save();
Json<DevicePar>.Save();
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.LogSave();
ThreadManage.GetInstance().Dispose();
TaskManage.GetInstance.Dispose();
}

private void MenuInit()


+ 1
- 1
BPASmartClient.DosingSystemSingle/BPASmartClient.DosingSystemSingle.csproj Vedi File

@@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.Helper" Version="1.0.66" />
<PackageReference Include="BPA.Helper" Version="1.0.67" />
<PackageReference Include="BPA.Message" Version="1.0.86" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>


+ 4
- 4
BPASmartClient.DosingSystemSingle/Model/DeviceInquire.cs Vedi File

@@ -32,7 +32,7 @@ namespace BPASmartClient.DosingSystemSingle
public ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>();
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<DevicePar>.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<AlarmInfo>.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)


+ 2
- 2
BPASmartClient.DosingSystemSingle/Service/SiemensDevice.cs Vedi File

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


+ 1
- 1
BPASmartClient.DosingSystemSingle/View/HardwareStatusView.xaml.cs Vedi File

@@ -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("输送带料仓状态监控"); };
}
}
}

+ 1
- 1
BPASmartClient.DosingSystemSingle/View/ManualControlView.xaml.cs Vedi File

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


+ 1
- 1
BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs Vedi File

@@ -35,7 +35,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel
// }
// }
//});
ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < Json<DevicePar>.Data.OutletInfoModels.Count; i++)
{


+ 1
- 1
BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs Vedi File

@@ -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++)
{


+ 2
- 2
BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs Vedi File

@@ -97,7 +97,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel
/// </summary>
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
/// </summary>
private void RecipeStatusInquire()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{
for (int i = 0; i < Recipes.Count; i++)
{


+ 1
- 1
BPASmartClient.FoodStationTest/App.xaml.cs Vedi File

@@ -66,7 +66,7 @@ namespace BPASmartClient.FoodStationTest
Json<LocalRecipeDataColl>.Save();
Json<RemoteRecipeDataColl>.Save();
MessageNotify.GetInstance.LogSave();
ThreadManage.GetInstance().Dispose();
TaskManage.GetInstance.Dispose();
}

private void MenuInit()


+ 1
- 1
BPASmartClient.FoodStationTest/BPASmartClient.FoodStationTest.csproj Vedi File

@@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.Communication" Version="1.0.106" />
<PackageReference Include="BPA.Communication" Version="1.0.107" />
</ItemGroup>

<ItemGroup>


+ 1
- 1
BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs Vedi File

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


+ 5
- 5
BPASmartClient.FoodStationTest/Model/ProcessControl.cs Vedi File

@@ -68,7 +68,7 @@ namespace BPASmartClient.FoodStationTest.Model
RegisterInit();
DeviceConnect();
//Json<RemoteRecipeDataColl>.Data.Recipes = TestData.GetInstance.Recipes;//添加测试数据
ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{
GVL_SmallStation.GetInstance.DisEnableStockAlarm = Json<DevicePar>.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
{


+ 5
- 5
BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs Vedi File

@@ -33,7 +33,7 @@ namespace BPASmartClient.FoodStationTest.Model
public ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>();
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<AlarmInfo>.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} 开始监听");
}

/// <summary>


+ 1
- 1
BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs Vedi File

@@ -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 ? "手动" : "自动";


+ 1
- 1
BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs Vedi File

@@ -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();


+ 2
- 2
BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs Vedi File

@@ -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++)
{


+ 2
- 2
BPASmartClient.GSIceCream/IceCreamMachine.cs Vedi File

@@ -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();
}), "冰淇淋解析线程");


+ 1
- 1
BPASmartClient.IceMaker/IceMakerMachine.cs Vedi File

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


+ 2
- 2
BPASmartClient.IoT/DataVClient.cs Vedi File

@@ -192,7 +192,7 @@ namespace BPASmartClient.IoT
/// </summary>
public void Dispose()
{
ThreadManage.GetInstance().StopTask("DataV数据上报");
TaskManage.GetInstance.StopTask("DataV数据上报");
}

/// <summary>
@@ -250,7 +250,7 @@ namespace BPASmartClient.IoT
/// </summary>
public void Start()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{
if (DeviceDataV != null && DeviceDataV.GetIsConnected() && DeviceDataV.deviceTable != null)
{


+ 1
- 1
BPASmartClient.IoT/Model/FileUpload.cs Vedi File

@@ -33,7 +33,7 @@ namespace BPASmartClient.IoT.Model
/// </summary>
public static void FileRequest(DataVReport dataV)
{
ThreadManage.GetInstance().Start(new Action(() =>
TaskManage.GetInstance.Start(new Action(() =>
{
try
{


+ 1
- 1
BPASmartClient.JAKA/JakaMachine.cs Vedi File

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


+ 1
- 1
BPASmartClient.JXJFoodBigStation/App.xaml.cs Vedi File

@@ -61,7 +61,7 @@ namespace BPASmartClient.JXJFoodBigStation
Json<BomMaterial>.Save();
base.OnExit(e);
MessageNotify.GetInstance.LogSave();
ThreadManage.GetInstance().Dispose();
TaskManage.GetInstance.Dispose();
}

private void MenuInit()


+ 1
- 1
BPASmartClient.JXJFoodBigStation/BPASmartClient.JXJFoodBigStation.csproj Vedi File

@@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.Communication" Version="1.0.106" />
<PackageReference Include="BPA.Communication" Version="1.0.107" />
</ItemGroup>

<ItemGroup>


+ 1
- 1
BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs Vedi File

@@ -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<StockBinName>(97);//料仓里原料的编码
if (res != null && res is StockBinName data9)


+ 3
- 3
BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs Vedi File

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


+ 1
- 1
BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs Vedi File

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


+ 1
- 1
BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs Vedi File

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


+ 1
- 1
BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs Vedi File

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


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/App.xaml.cs Vedi File

@@ -72,7 +72,7 @@ namespace BPASmartClient.JXJFoodSmallStation
Json<LocalRecipeDataColl>.Save();
Json<RemoteRecipeDataColl>.Save();
MessageNotify.GetInstance.LogSave();
ThreadManage.GetInstance().Dispose();
TaskManage.GetInstance.Dispose();
}

private void MenuInit()


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs Vedi File

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


+ 5
- 5
BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs Vedi File

@@ -83,7 +83,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
RegisterInit();
DeviceConnect();
//Json<RemoteRecipeDataColl>.Data.Recipes = TestData.GetInstance.Recipes;//添加测试数据
ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{
GVL_SmallStation.GetInstance.DisEnableStockAlarm = Json<DevicePar>.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<DevicePar>.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
{


+ 5
- 5
BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs Vedi File

@@ -34,7 +34,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
public ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>();
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<AlarmInfo>.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} 开始监听");
}




+ 1
- 1
BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs Vedi File

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


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs Vedi File

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


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs Vedi File

@@ -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 ? "手动" : "自动";


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs Vedi File

@@ -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();


+ 2
- 2
BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs Vedi File

@@ -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++)
{


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs Vedi File

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


+ 1
- 1
BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj Vedi File

@@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BPA.Helper" Version="1.0.66" />
<PackageReference Include="BPA.Helper" Version="1.0.67" />
</ItemGroup>

</Project>

+ 2
- 2
BPASmartClient.JakaRobot/JaKaHelper.cs Vedi File

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


+ 1
- 1
BPASmartClient.Juicer/JuicerMachine.cs Vedi File

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


+ 2
- 2
BPASmartClient.KHKJ/KHKJMachine.cs Vedi File

@@ -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解析线程");


+ 2
- 2
BPASmartClient.KLMCoffee/CoffeeMachine.cs Vedi File

@@ -87,7 +87,7 @@ namespace BPASmartClient.KLMCoffee
/// </summary>
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();
}), "咖啡机解析线程");


+ 2
- 2
BPASmartClient.Lebai/LebaiRobot.cs Vedi File

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


+ 1
- 1
BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs Vedi File

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


+ 1
- 1
BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs Vedi File

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


+ 1
- 2
BPASmartClient.MilkWithTea/App.xaml.cs Vedi File

@@ -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();
}
}
}

+ 2
- 2
BPASmartClient.MilkWithTea/MainWindow.xaml.cs Vedi File

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


+ 13
- 13
BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs Vedi File

@@ -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
/// 本地奶茶配方列表
/// </summary>
public ObservableCollection<LocalRecipe> localMaterialRecipes { get; set; } = Json<JsonLocalRecipes>.Data.localRecipes;

/// <summary>
/// 删除配方奶茶
/// </summary>
[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<JsonLocalRecipes>.Save();
}
}
}

@@ -48,11 +48,11 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// 物料位置名称集合
/// </summary>
public ObservableCollection<LocalMaterail> localMaterails { get; set; } = Json<JsonLocalRecipes>.Data.localMaterails;
/// <summary>
/// 更新物料位置
/// </summary>
[BPARelayCommand]
//[BPARelayCommand]
private void UpdateMaterialPosion()
{
Json<JsonLocalRecipes>.Save();
@@ -61,12 +61,12 @@ namespace BPASmartClient.MilkWithTea.ViewModel

public LocalConfigureViewModel()
{
}

}
}

+ 46
- 22
BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs Vedi File

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

/// <summary>
@@ -21,27 +21,48 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// <summary>
/// 订单状态列表
/// </summary>
public ObservableCollection<MorkOrder> orderStatusLists { get; set; } = new ObservableCollection<MorkOrder>();
public ObservableCollection<MorkOrder> orderStatusLists { get; set; } = new ObservableCollection<MorkOrder>();

/// <summary>
/// 等待取餐列表
/// </summary>
public ObservableCollection<MorkOrder> WaitTakeMeal { get; set; } = new ObservableCollection<MorkOrder>();
public ObservableCollection<MorkOrder> WaitTakeMeal { get; set; } = new ObservableCollection<MorkOrder>();

/// <summary>
/// 当前正在制作的奶茶
/// </summary>
[ObservableProperty]
public string CurrentGood { get { return _currentGood; } set { _currentGood = value; OnPropertyChanged(); } }
private string _currentGood = "茉莉花茶";

/// <summary>
/// 奶茶制作百分比
/// </summary>
[ObservableProperty]
public string MakePercent { get { return _makePercent; } set { _makePercent = value; OnPropertyChanged(); } }
private string _makePercent = "0";

[ObservableProperty]
/// <summary>
/// 奶茶制作百分比
/// </summary>
public LocalRecipe SelectedRecipe { get { return _selectedRecipe; } set { _selectedRecipe = value; OnPropertyChanged(); } }
private LocalRecipe _selectedRecipe;


///// <summary>
///// 当前正在制作的奶茶
///// </summary>
//[ObservableProperty]
//private string _currentGood = "茉莉花茶";


///// <summary>
///// 奶茶制作百分比
///// </summary>
//[ObservableProperty]
//private string _makePercent = "0";

//[ObservableProperty]
//private LocalRecipe _selectedRecipe;

/// <summary>
/// 当前正在制作的奶茶
/// </summary>
@@ -50,14 +71,14 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// <summary>
/// 本地奶茶制作
/// </summary>
[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<JsonLocalRecipes>.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

}


/// <summary>
/// MQTT 大屏取餐通知委托
/// </summary>
public void Init()
public void Init()
{
//清除订单数据
//ActionManage.GetInstance.Register(new Action(() =>
@@ -178,7 +202,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel

EventBus.GetInstance().Subscribe<OrderStatusChangedEvent>(0, OrderStatusChangedHandle);

ActionManage.GetInstance.Register(new Action<object[]>((o)=>
ActionManage.GetInstance.Register(new Action<object[]>((o) =>
{
if (o is object[] obj)
{
@@ -190,7 +214,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
}
}), "奶茶制作进度");


}

@@ -203,7 +227,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
case ORDER_STATUS.COOKING:
if (index >= 0 && index < orderStatusLists.Count)
orderStatusLists.ElementAt(index).OrderStatus = orderStatusChange.Status;
break;
case ORDER_STATUS.COMPLETED_COOK:
if (index >= 0 && index < orderStatusLists.Count)


+ 48
- 40
BPASmartClient.MilkWithTea/ViewModel/PatrameterSettiongViewModel.cs Vedi File

@@ -1,7 +1,7 @@
using BPA.Helper;
using BPASmartClient.Model;
using CommunityToolkit.Mvvm.Input;
//using CommunityToolkit.Mvvm.Input;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -13,7 +13,7 @@ using System.Threading.Tasks;

namespace BPASmartClient.MilkWithTea.ViewModel
{
partial class PatrameterSettiongViewModel: NotifyBase
partial class PatrameterSettiongViewModel : NotifyBase
{
string FileName => GLobal.deviceConfig.Count > 0 ? GLobal.deviceConfig[0].ShopName : string.Empty;

@@ -22,41 +22,45 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// </summary>
public ObservableCollection<int> materialPosions { get; set; } = new ObservableCollection<int>();

[ObservableProperty]

public int MaterialID { get { return _materialID; } set { _materialID = value; OnPropertyChanged(); } }
private int _materialID = 0;

/// <summary>
/// 出料重量
/// </summary>
[ObservableProperty]
private int _outMaterilWeight;
public int OutMaterilWeight { get { return _outMaterilWeight; } set { _outMaterilWeight = value; OnPropertyChanged(); } }
private int _outMaterilWeight = 0;

/// <summary>
/// 矫正的通道号
/// </summary>
[ObservableProperty]
public int CorrectPassway { get { return _CorrectPassway; } set { _CorrectPassway = value; OnPropertyChanged(); } }
private int _CorrectPassway = 0;

/// <summary>
/// 通道是否开启
/// </summary>
[ObservableProperty]
private bool _passwayIsOpen ;
public bool PasswayIsOpen { get { return _passwayIsOpen; } set { _passwayIsOpen = value; OnPropertyChanged(); } }
private bool _passwayIsOpen;

/// <summary>
/// 矫正重量
/// </summary>
[ObservableProperty]
private int _correctMatetailWeight = 0;
public int CorrectMatetailWeight { get { return _correctMatetailWeight; } set { _correctMatetailWeight = value; OnPropertyChanged(); } }
private int _correctMatetailWeight;

/// <summary>
/// 矫正时间
/// 矫正重量
/// </summary>
[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(); } }
/// <summary>
/// 出料动作
/// </summary>
[BPARelayCommand]
//[BPARelayCommand]
private void OutMaterial()
{
ActionManage.GetInstance.Send("通道口出料", new object[] { MaterialID, OutMaterilWeight });
@@ -64,7 +68,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// <summary>
/// 开始矫正
/// </summary>
[BPARelayCommand]
//[BPARelayCommand]
private void CheckPassway()
{

@@ -72,7 +76,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// <summary>
/// 开启通道
/// </summary>
[BPARelayCommand]
//[BPARelayCommand]
private void OpenPassway()
{

@@ -80,7 +84,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// <summary>
/// 确认重量
/// </summary>
[BPARelayCommand]
//[BPARelayCommand]
private void CheckMaterailWeight()
{

@@ -90,48 +94,52 @@ namespace BPASmartClient.MilkWithTea.ViewModel
/// <summary>
/// 店铺名称
/// </summary>
[ObservableProperty]
private string? _shopName = string.Empty;
public string ShopName { get { return _shopName; } set { _shopName = value; OnPropertyChanged(); } }
private string _shopName;

/// <summary>
/// 店铺ID
/// </summary>
[ObservableProperty]
private string? _shopID = string.Empty;
public string ShopID { get { return _shopID; } set { _shopID = value; OnPropertyChanged(); } }
private string _shopID;

/// <summary>
/// 设备ID
/// </summary>
[ObservableProperty]
private string? _deviceID = string.Empty;
public string DeviceID { get { return _deviceID; } set { _deviceID = value; OnPropertyChanged(); } }
private string _deviceID;

/// <summary>
/// PLC地址
/// </summary>
[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

}

}
}

+ 17
- 16
BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs Vedi File

@@ -7,44 +7,45 @@ using System.Windows.Controls;

namespace BPASmartClient.MilkWithTea.ViewModel
{
partial class RecipeConfigeViewModel:NotifyBase
partial class RecipeConfigeViewModel : NotifyBase
{
public static ObservableCollection<LocalMaterail> Materails { get; set; } = new ObservableCollection<LocalMaterail>();

public Dictionary<string,string> materialNames { get; set; } = new Dictionary<string,string>();
public Dictionary<string, string> materialNames { get; set; } = new Dictionary<string, string>();

[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<JsonLocalRecipes>.Data.localRecipes.FirstOrDefault(p=>p.RecipeName == Name)!= null)
if (Json<JsonLocalRecipes>.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<JsonLocalRecipes>.Data.localRecipes.Add(new LocalRecipe
{
@@ -59,11 +60,11 @@ namespace BPASmartClient.MilkWithTea.ViewModel

public RecipeConfigeViewModel()
{
if(Json<JsonLocalRecipes>.Data.localMaterails.Count > 0)
if (Json<JsonLocalRecipes>.Data.localMaterails.Count > 0)
{
foreach(var item in Json<JsonLocalRecipes>.Data.localMaterails)
foreach (var item in Json<JsonLocalRecipes>.Data.localMaterails)
{
if(item.MaterialID!=null&&item.MaterialName!=null)
if (item.MaterialID != null && item.MaterialName != null)
{
materialNames.Add(item.MaterialID, item.MaterialName);
}


+ 1
- 1
BPASmartClient.Modbus/BPASmartClient.Modbus.csproj Vedi File

@@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BPA.Helper" Version="1.0.66" />
<PackageReference Include="BPA.Helper" Version="1.0.67" />
<PackageReference Include="NModbus" Version="3.0.72" />
<PackageReference Include="System.IO.Ports" Version="6.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />


+ 1
- 1
BPASmartClient.Model/BPASmartClient.Model.csproj Vedi File

@@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.Helper" Version="1.0.66" />
<PackageReference Include="BPA.Helper" Version="1.0.67" />
<PackageReference Include="BPA.Message" Version="1.0.86" />
<PackageReference Include="log4net" Version="2.0.15" />
</ItemGroup>


+ 3
- 3
BPASmartClient.MorkBF/Control_MorkBF.cs Vedi File

@@ -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<StatsModel> statsModels = new List<StatsModel>();
statsModels.Add(new StatsModel() { Name = "帝王蟹", Count = 666 });


+ 44
- 44
BPASmartClient.MorkF/Control_MorkF.cs Vedi File

@@ -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<object>((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<object>((list) =>
{
ThreadManage.GetInstance().Start(new Action(() =>
TaskManage.GetInstance.Start(new Action(() =>
{
if (list is List<int> list_int)
{
@@ -549,7 +549,7 @@ namespace BPASmartClient.MorkF
}), "ArmRunRight");
ActionManage.GetInstance.Register(new Action<object>((list) =>
{
ThreadManage.GetInstance().Start(new Action(() =>
TaskManage.GetInstance.Start(new Action(() =>
{
if (list is List<int> list_int)
{
@@ -562,7 +562,7 @@ namespace BPASmartClient.MorkF
}), "SetNowPosition");
ActionManage.GetInstance.Register(new Action<object>((list) =>
{
ThreadManage.GetInstance().Start(new Action(() =>
TaskManage.GetInstance.Start(new Action(() =>
{
if (list is List<object> list_object)
{
@@ -586,7 +586,7 @@ namespace BPASmartClient.MorkF
#region 配料控制
ActionManage.GetInstance.Register(new Action<object>((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<object>((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<object>((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<object>((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
/// <param name="isGet"></param>
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
/// </summary>
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
/// </summary>
private void UpdateMaterialSurplus()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{

List<MaterialInfo> 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


+ 1
- 1
BPASmartClient.MorkF/ViewModel/DebugViewModel.cs Vedi File

@@ -318,7 +318,7 @@ namespace BPASmartClient.MorkF.ViewModel
;
});

ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{
//variableMonitors = Plugin.GetInstance()?.GetPlugin<DeviceMgr>()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;



+ 2
- 2
BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs Vedi File

@@ -1029,7 +1029,7 @@ namespace BPASmartClient.MorkF.ViewModel
PhysicalMaterialCoordinate();
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
ThreadManage.GetInstance().Start(new Action(() =>
TaskManage.GetInstance.Start(new Action(() =>
{
if(o is List<string> nums)
{
@@ -1039,7 +1039,7 @@ namespace BPASmartClient.MorkF.ViewModel
}), "CalibrationCallBack");
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
ThreadManage.GetInstance().Start(new Action(() =>
TaskManage.GetInstance.Start(new Action(() =>
{
if (o is List<string> nums)
{


+ 10
- 10
BPASmartClient.MorkMOC/Control_MorkMOC.cs Vedi File

@@ -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
/// 设定出料重量
/// </summary>
/// <param name="goodPushes"></param>
private void SetMaterialsWeight(Dictionary<int,int> goodPushes)
private void SetMaterialsWeight(Dictionary<int, int> 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<object>((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<object>((o) =>
{
if (o == null) return;
if(o is LocalRecipe recipe)
if (o is LocalRecipe recipe)
{
Dictionary<int, int> OrderPushes = new Dictionary<int, int>();
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()


+ 23
- 20
BPASmartClient.MorkMOC/Model/LocalMaterail.cs Vedi File

@@ -8,45 +8,48 @@ using System.Threading.Tasks;

namespace BPASmartClient.MorkMOC
{
public partial class LocalMaterail:NotifyBase
public partial class LocalMaterail : NotifyBase
{
/// <summary>
/// 物料ID
/// </summary>
[ObservableProperty]
private string? _materialID;
/// <summary>
/// 物料本地名称
/// </summary>
[ObservableProperty]
private string? _materialName;
public string MaterialID { get { return _materialID; } set { _materialID = value; OnPropertyChanged(); } }
private string _materialID;

/// <summary>
/// 物料本地名称
/// </summary>
public string MaterialName { get { return _materialName; } set { _materialName = value; OnPropertyChanged(); } }
private string _materialName;

/// <summary>
/// 物料位置
/// </summary>
[ObservableProperty]
private int? _materialPosition;
public int MaterialPosition { get { return _materialPosition; } set { _materialPosition = value; OnPropertyChanged(); } }
private int _materialPosition;

/// <summary>
/// 物料重量
/// </summary>
[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
{
/// <summary>
/// 配方ID
/// 物料重量
/// </summary>
[ObservableProperty]
private string? _recipeID;
public string RecipeID { get { return _recipeID; } set { _recipeID = value; OnPropertyChanged(); } }
private string _recipeID;

/// <summary>
/// 配方名称
/// </summary>
[ObservableProperty]
private string? _recipeName;
public string RecipeName { get { return _recipeName; } set { _recipeName = value; OnPropertyChanged(); } }
private string _recipeName;

/// <summary>
/// 原料集合
/// </summary>


+ 1
- 1
BPASmartClient.MorkMV1/Control_MorkMV1.cs Vedi File

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


+ 1
- 1
BPASmartClient.MorkMV1/DataServer.cs Vedi File

@@ -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<OrderStatistics>.Data.Count;
SendScreenDataModel sendScreenDataModel = new SendScreenDataModel();


+ 1
- 1
BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs Vedi File

@@ -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(() =>


+ 1
- 1
BPASmartClient.MorkMW/Control_MorkMW.cs Vedi File

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


+ 1
- 1
BPASmartClient.MorkS/Control_Morks.cs Vedi File

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


+ 1
- 1
BPASmartClient.MorkS/DataServer.cs Vedi File

@@ -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<OrderStatistics>.Data.Count;
SendScreenDataModel sendScreenDataModel = new SendScreenDataModel();


+ 1
- 1
BPASmartClient.MorkS/ViewModel/DebugViewModel.cs Vedi File

@@ -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(() =>


+ 1
- 1
BPASmartClient.MorkS/VoiceAPI.cs Vedi File

@@ -14,7 +14,7 @@
// {
// public VoiceAPI()
// {
// BPA.Helper.ThreadManage.GetInstance().StartLong(new Action(() =>
// BPA.Helper.TaskManage.GetInstance.StartLong(new Action(() =>
// {
// while (msg.Count > 0)
// {


+ 1
- 1
BPASmartClient.MorkS3/Control_Morks.cs Vedi File

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


+ 1
- 1
BPASmartClient.MorkS3/DataServer.cs Vedi File

@@ -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<OrderStatistics>.Data.Count;
SendScreenDataModel sendScreenDataModel = new SendScreenDataModel();


+ 1
- 1
BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs Vedi File

@@ -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(() =>


+ 1
- 1
BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs Vedi File

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


+ 1
- 1
BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs Vedi File

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


+ 1
- 1
BPASmartClient.MorkSUpgradedVer/DataServer.cs Vedi File

@@ -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<OrderStatistics>.Data.Count;
SendScreenDataModel sendScreenDataModel = new SendScreenDataModel();


+ 1
- 1
BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs Vedi File

@@ -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(() =>


+ 2
- 2
BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs Vedi File

@@ -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-传感器监视");

}
}


+ 1
- 1
BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs Vedi File

@@ -233,7 +233,7 @@ namespace BPASmartClient.MorkTLebaiJC.ViewModel;


ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{

variableMonitors = Plugin.GetInstance()?.GetPlugin<DeviceMgr>()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;


+ 1
- 1
BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs Vedi File

@@ -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)=>
{


+ 2
- 2
BPASmartClient.MorkT/View/DebugView.xaml.cs Vedi File

@@ -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-传感器监视");

}
}


+ 1
- 1
BPASmartClient.MorkT/ViewModel/DebugViewModel.cs Vedi File

@@ -233,7 +233,7 @@ namespace BPASmartClient.MorkT.ViewModel;


ThreadManage.GetInstance().StartLong(new Action(() =>
TaskManage.GetInstance.StartLong(new Action(() =>
{

variableMonitors = Plugin.GetInstance()?.GetPlugin<DeviceMgr>()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;


+ 1
- 1
BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs Vedi File

@@ -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)=>
{


+ 2
- 2
BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs Vedi File

@@ -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-传感器监视");

}
}


+ 2
- 2
BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs Vedi File

@@ -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-传感器监视");

}
}


+ 1
- 1
BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs Vedi File

@@ -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<DeviceMgr>()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
if (variableMonitors != null && variableMonitors.Count > 0)


+ 2
- 2
BPASmartClient.MorkT_Container/View/DebugView.xaml.cs Vedi File

@@ -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-传感器监视");*/

}
}


+ 1
- 1
BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs Vedi File

@@ -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<DeviceMgr>()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;
if (variableMonitors != null && variableMonitors.Count > 0)


+ 2
- 2
BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs Vedi File

@@ -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-传感器监视");
}
}
}

+ 1
- 1
BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs Vedi File

@@ -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<DeviceMgr>()?.GetDevices()?.FirstOrDefault(p => p.DeviceId == DeviceId)?.variableMonitors;


+ 1
- 1
BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs Vedi File

@@ -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)=>
{


Dato che sono stati cambiati molti file in questo diff, alcuni di essi non verranno mostrati

Caricamento…
Annulla
Salva