From d842615991d909a389fba9b682e496828131f49a Mon Sep 17 00:00:00 2001 From: taoye Date: Sat, 17 Sep 2022 11:32:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=99=E4=BB=93=E7=95=8C=E9=9D=A2=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.JXJFoodBigStation/App.xaml.cs | 7 + .../Model/DeviceInfo.cs | 18 ++ .../View/ChangeDeviceNameView.xaml | 117 ++++++++++ .../View/ChangeDeviceNameView.xaml.cs | 31 +++ .../View/DeviceManageView.xaml | 133 ++++++++++++ .../View/DeviceManageView.xaml.cs | 28 +++ .../View/HardwareStatusView.xaml | 200 ++++++++++++++++-- .../View/HardwareStatusView.xaml.cs | 2 + .../ViewModel/ChangeDeviceNameViewModel.cs | 48 +++++ .../ViewModel/DeviceManageViewModel.cs | 36 ++++ .../ViewModel/HardwareStatusViewModel.cs | 11 +- 11 files changed, 617 insertions(+), 14 deletions(-) create mode 100644 BPASmartClient.JXJFoodBigStation/Model/DeviceInfo.cs create mode 100644 BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml create mode 100644 BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml.cs create mode 100644 BPASmartClient.JXJFoodBigStation/View/DeviceManageView.xaml create mode 100644 BPASmartClient.JXJFoodBigStation/View/DeviceManageView.xaml.cs create mode 100644 BPASmartClient.JXJFoodBigStation/ViewModel/ChangeDeviceNameViewModel.cs create mode 100644 BPASmartClient.JXJFoodBigStation/ViewModel/DeviceManageViewModel.cs diff --git a/BPASmartClient.JXJFoodBigStation/App.xaml.cs b/BPASmartClient.JXJFoodBigStation/App.xaml.cs index e88687c0..82d33a71 100644 --- a/BPASmartClient.JXJFoodBigStation/App.xaml.cs +++ b/BPASmartClient.JXJFoodBigStation/App.xaml.cs @@ -123,6 +123,13 @@ namespace BPASmartClient.JXJFoodBigStation #region 硬件设备监控 ObservableCollection DeviceMonitor = new ObservableCollection(); DeviceMonitor.Add(new SubMenumodel() + { + SubMenuName = "料仓管理", + SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, + AssemblyName = "BPASmartClient.JXJFoodBigStation", + ToggleWindowPath = "View.DeviceManageView" + }); + DeviceMonitor.Add(new SubMenumodel() { SubMenuName = "设备状态", SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, diff --git a/BPASmartClient.JXJFoodBigStation/Model/DeviceInfo.cs b/BPASmartClient.JXJFoodBigStation/Model/DeviceInfo.cs new file mode 100644 index 00000000..5c037145 --- /dev/null +++ b/BPASmartClient.JXJFoodBigStation/Model/DeviceInfo.cs @@ -0,0 +1,18 @@ +using Microsoft.Toolkit.Mvvm.ComponentModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.JXJFoodBigStation.Model +{ + internal class DeviceInfo:ObservableObject + { + public string IpAddress { get { return _mIpAddress; } set { _mIpAddress = value; OnPropertyChanged(); } } + private string _mIpAddress; + + public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } } + private string _mDeviceName; + } +} diff --git a/BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml b/BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml new file mode 100644 index 00000000..edddb8a8 --- /dev/null +++ b/BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +