From 65ebe3abdd2045fd56f47d7daf1b9d4ecb30db51 Mon Sep 17 00:00:00 2001 From: applelon <380149513@qq.com> Date: Thu, 21 Apr 2022 10:20:14 +0800 Subject: [PATCH] === --- BPASmartClient.Business/Plugin/DeviceMgr.cs | 9 ++++++++- .../物料数据/MaterialDeliveryEvent.cs | 2 +- BPASmartClient.Model/物料数据/RecipeBomEvent.cs | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/BPASmartClient.Business/Plugin/DeviceMgr.cs b/BPASmartClient.Business/Plugin/DeviceMgr.cs index b4f6475f..533e73a2 100644 --- a/BPASmartClient.Business/Plugin/DeviceMgr.cs +++ b/BPASmartClient.Business/Plugin/DeviceMgr.cs @@ -1,5 +1,7 @@ using BPASmartClient.Device; +using BPASmartClient.EventBus; using BPASmartClient.Helper; +using BPASmartClient.Model; using BPASmartClient.Peripheral; using System; using System.Collections.Generic; @@ -63,7 +65,12 @@ namespace BPASmartClient.Business public void StartService() { - this.devices.ForEach(device => device.StartMain()); + this.devices.ForEach(device => + { + device.StartMain(); + //todo请求数据 + new RecipeBomEvent() { Id = device.DeviceId}.Publish(); + }); } public void StopService() diff --git a/BPASmartClient.Model/物料数据/MaterialDeliveryEvent.cs b/BPASmartClient.Model/物料数据/MaterialDeliveryEvent.cs index 39139f02..df679282 100644 --- a/BPASmartClient.Model/物料数据/MaterialDeliveryEvent.cs +++ b/BPASmartClient.Model/物料数据/MaterialDeliveryEvent.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace BPASmartClient.Model.物料数据 +namespace BPASmartClient.Model { public class MaterialDeliveryEvent : BaseEvent { diff --git a/BPASmartClient.Model/物料数据/RecipeBomEvent.cs b/BPASmartClient.Model/物料数据/RecipeBomEvent.cs index 9c9ad4c4..3acd03a9 100644 --- a/BPASmartClient.Model/物料数据/RecipeBomEvent.cs +++ b/BPASmartClient.Model/物料数据/RecipeBomEvent.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace BPASmartClient.Model.物料数据 +namespace BPASmartClient.Model { public class RecipeBomEvent : BaseEvent {