From 861a640464c985ddbf383efcabf224b57d46f205 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: Tue, 18 Oct 2022 14:40:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=99=E4=BB=93=E8=AE=BE=E5=A4=87=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmart.VariableManager/ServiceCenter.cs | 2 +- .../RecDictionarys/RecToggleButton.xaml | 87 ++++++++++++ DosingSystem/Model/DeviceCurrentStatus.cs | 31 +++- DosingSystem/Model/StockStatusModel.cs | 1 - DosingSystem/View/StockControlView.xaml | 132 ++++++++++++++---- .../ViewModel/StockControViewModel.cs | 50 +++---- 6 files changed, 242 insertions(+), 61 deletions(-) diff --git a/BPASmart.VariableManager/ServiceCenter.cs b/BPASmart.VariableManager/ServiceCenter.cs index 03dd6763..a0288969 100644 --- a/BPASmart.VariableManager/ServiceCenter.cs +++ b/BPASmart.VariableManager/ServiceCenter.cs @@ -55,8 +55,8 @@ namespace BPASmart.VariableManager Thread.Sleep(100); }), "客户端管道消息控制"); pipeClient.PushCommand = new Action((s) => { if (pipeClient.IsConnected) msg.Enqueue(s); }); - pipeClient.StartPipeStream(); MessageLog.GetInstance.NotifyShow = new Action((o) => { if (pipeClient.IsConnected) pipeClient.SendCommand(o); }); + pipeClient.StartPipeStream(); } diff --git a/BPASmartClient.CustomResource/RecDictionarys/RecToggleButton.xaml b/BPASmartClient.CustomResource/RecDictionarys/RecToggleButton.xaml index 7ff090d8..9d3ef0a2 100644 --- a/BPASmartClient.CustomResource/RecDictionarys/RecToggleButton.xaml +++ b/BPASmartClient.CustomResource/RecDictionarys/RecToggleButton.xaml @@ -57,4 +57,91 @@ + + + + \ No newline at end of file diff --git a/DosingSystem/Model/DeviceCurrentStatus.cs b/DosingSystem/Model/DeviceCurrentStatus.cs index e1854196..62b56ca5 100644 --- a/DosingSystem/Model/DeviceCurrentStatus.cs +++ b/DosingSystem/Model/DeviceCurrentStatus.cs @@ -9,22 +9,47 @@ namespace BPASmartClient.DosingSystem { public class DeviceCurrentStatus : ObservableObject { - + /// + /// 当前料仓重量反馈 + /// public double Weight { get { return _mWeight; } set { _mWeight = value; OnPropertyChanged(); } } private double _mWeight; + /// + /// 是否正在下料 + /// + public bool IsLayOff { get { return _mIsLayOff; } set { _mIsLayOff = value; OnPropertyChanged(); } } + private bool _mIsLayOff; + /// + /// 设备是否在线 + /// public bool RunStatus { get { return _mRunStatus; } set { _mRunStatus = value; OnPropertyChanged(); } } private bool _mRunStatus; - + /// + /// 设备编号 + /// public int DeviceNum { get { return _mDeviceNum; } set { _mDeviceNum = value; OnPropertyChanged(); } } private int _mDeviceNum; + /// + /// 设备名称 + /// public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } } private string _mDeviceName; - + /// + /// 仓盖是否被打开 + /// + public string IsOpen { get { return _mIsOpen; } set { _mIsOpen = value; OnPropertyChanged(); } } + private string _mIsOpen; + + /// + /// 料仓时候有报警 + /// + public bool IsFault { get { return _mIsFault; } set { _mIsFault = value; OnPropertyChanged(); } } + private bool _mIsFault; } } diff --git a/DosingSystem/Model/StockStatusModel.cs b/DosingSystem/Model/StockStatusModel.cs index 2470c0c0..531882fe 100644 --- a/DosingSystem/Model/StockStatusModel.cs +++ b/DosingSystem/Model/StockStatusModel.cs @@ -36,7 +36,6 @@ namespace BPASmartClient.DosingSystem public bool IsOpen { get { return _mIsOpen; } set { _mIsOpen = value; OnPropertyChanged(); } } private bool _mIsOpen; - /// /// 是否故障报警 /// diff --git a/DosingSystem/View/StockControlView.xaml b/DosingSystem/View/StockControlView.xaml index 2431bb98..2d4dfa54 100644 --- a/DosingSystem/View/StockControlView.xaml +++ b/DosingSystem/View/StockControlView.xaml @@ -92,29 +92,66 @@ IsFaultState="{Binding IsFault}" IsLayOffState="{Binding IsLayOff}" IsOpenState="{Binding IsOpen}" - IsRunning="{Binding IsRunning}" /> + IsRunning="{Binding RunStatus}" /> -