diff --git a/BPASmartClient.Business/Plugin/ConfigMgr.cs b/BPASmartClient.Business/Plugin/ConfigMgr.cs index 83be6035..c0d68ab5 100644 --- a/BPASmartClient.Business/Plugin/ConfigMgr.cs +++ b/BPASmartClient.Business/Plugin/ConfigMgr.cs @@ -1,8 +1,11 @@ using BPA.ApolloClient; using BPA.Message; +using BPASmartClient.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using Microsoft.Extensions.Configuration; +using Newtonsoft.Json; +using System.Collections.ObjectModel; using System.Xml.Linq; using System.Xml.XPath; @@ -58,6 +61,40 @@ namespace BPASmartClient.Business /// private void InitDeviceModel() { + //var text = TextHelper.GetInstance.ReadTextInfo("StartShop", "DeviceConfig"); + //string path = $"{LocaPath.GetInstance().GetDeviceConfigPath}{text}.json"; + //deviceConfigs = new List(); + //if (File.Exists(path)) + //{ + // string JsonString = File.ReadAllText(path); + // var result = JsonConvert.DeserializeObject>(JsonString); + // if (result != null) + // { + // foreach (var shop in result) + // { + // foreach (var device in shop.deviceModels) + // { + + // DeviceConfig deviceConfig = new DeviceConfig(); + // deviceConfig.Name = device.DeviceName; + // deviceConfig.Module = device.DeviceNamespace; + // deviceConfig.DeviceId = int.Parse(device.DeviceId); + + // foreach (var comms in device.communicationDevcies) + // { + // BPASmartClient.Model.Peripheral peripheral = new BPASmartClient.Model.Peripheral(); + // peripheral.Module = comms.CommunicationNamespace; + // } + // deviceConfigs.Add(deviceConfig); + // } + // } + // } + //} + + + + + deviceConfigs = new List(); var devicePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DeviceInfo.xml"); var xdoc = XDocument.Load(devicePath); diff --git a/BPASmartClient.Business/Plugin/DeviceMgr.cs b/BPASmartClient.Business/Plugin/DeviceMgr.cs index ec21017d..3cd27e88 100644 --- a/BPASmartClient.Business/Plugin/DeviceMgr.cs +++ b/BPASmartClient.Business/Plugin/DeviceMgr.cs @@ -74,8 +74,6 @@ namespace BPASmartClient.Business } } - - public void StartService() { this.devices.ForEach(device => @@ -129,8 +127,6 @@ namespace BPASmartClient.Business }); } - - public void StopService() { this.devices.ForEach(device => device.Stop()); diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj index 822d0320..f2117223 100644 --- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj +++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj @@ -16,6 +16,8 @@ + + @@ -167,6 +169,8 @@ + + diff --git a/BPASmartClient.CustomResource/Image/ComboBoxPopSelect.png b/BPASmartClient.CustomResource/Image/ComboBoxPopSelect.png new file mode 100644 index 00000000..f5aff2e0 Binary files /dev/null and b/BPASmartClient.CustomResource/Image/ComboBoxPopSelect.png differ diff --git a/BPASmartClient.CustomResource/Image/ComboBoxSelect.png b/BPASmartClient.CustomResource/Image/ComboBoxSelect.png new file mode 100644 index 00000000..a0a49ad1 Binary files /dev/null and b/BPASmartClient.CustomResource/Image/ComboBoxSelect.png differ diff --git a/BPASmartClient.CustomResource/RecDictionarys/DatePickeerDictionary.xaml b/BPASmartClient.CustomResource/RecDictionarys/DatePickeerDictionary.xaml new file mode 100644 index 00000000..355b5f66 --- /dev/null +++ b/BPASmartClient.CustomResource/RecDictionarys/DatePickeerDictionary.xaml @@ -0,0 +1,599 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 14 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #FFE8EDF9 + #FFC5CBF9 + #FF7381F9 + + #FFE8EDF9 + #FFC5CBF9 + #FF888888 + + #FFC5CBF9 + #FFDDDDDD + + White + #FF7381F9 + #FF211AA9 + + #FF3843C4 + #FF211AA9 + + + #FF444444 + sc#1, 0.004391443, 0.002428215, 0.242281124 + + + + #FFCCCCCC + #FF888888 + #FF444444 + + #FF888888 + #FF444444 + + #FFAAAAAA + #FF888888 + + Black + + + + #FFC5CBF9 + Black + #FFC5CBF9 + + #FF3843C4 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BPASmartClient.CustomResource/Themes/GenricStyle.xaml b/BPASmartClient.CustomResource/Themes/GenricStyle.xaml index e15e3c81..1ca4af46 100644 --- a/BPASmartClient.CustomResource/Themes/GenricStyle.xaml +++ b/BPASmartClient.CustomResource/Themes/GenricStyle.xaml @@ -1192,6 +1192,8 @@ + + @@ -1218,8 +1220,9 @@ BorderBrush="#FFBD2A2A" /> @@ -1233,7 +1236,7 @@ - + @@ -1270,6 +1273,7 @@ + @@ -1341,8 +1345,8 @@ - + - + - + - - + - + - + - - - + + + - + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmartClient/Control/AlarmView.xaml.cs b/BPASmartClient/Control/AlarmView.xaml.cs new file mode 100644 index 00000000..c812b5c3 --- /dev/null +++ b/BPASmartClient/Control/AlarmView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace BPASmartClient.Control +{ + /// + /// AlarmView.xaml 的交互逻辑 + /// + public partial class AlarmView : UserControl + { + public AlarmView() + { + InitializeComponent(); + } + } +} diff --git a/BPASmartClient/Control/OrderStatusView.xaml b/BPASmartClient/Control/OrderStatusView.xaml index 1c6aee37..56e250c4 100644 --- a/BPASmartClient/Control/OrderStatusView.xaml +++ b/BPASmartClient/Control/OrderStatusView.xaml @@ -36,7 +36,7 @@ - + @@ -118,8 +118,8 @@ + HorizontalScrollBarVisibility="Hidden" + VerticalScrollBarVisibility="Hidden"> @@ -206,7 +206,7 @@ - + - + diff --git a/BPASmartClient/Control/ShopDeviceConfigView.xaml b/BPASmartClient/Control/ShopDeviceConfigView.xaml index b114f896..f78305c1 100644 --- a/BPASmartClient/Control/ShopDeviceConfigView.xaml +++ b/BPASmartClient/Control/ShopDeviceConfigView.xaml @@ -7,7 +7,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource" xmlns:vm="clr-namespace:BPASmartClient.ViewModel;assembly=BPASmartClient.ViewModel" - xmlns:vmm="clr-namespace:BPASmartClient.ViewModel.Model;assembly=BPASmartClient.ViewModel" + xmlns:vmm="clr-namespace:BPASmartClient.Model;assembly=BPASmartClient.Model" d:DesignHeight="900" d:DesignWidth="1200" mc:Ignorable="d"> diff --git a/BPASmartClient/Control/ShopDeviceConfigView.xaml.cs b/BPASmartClient/Control/ShopDeviceConfigView.xaml.cs index a608cd93..cebbda96 100644 --- a/BPASmartClient/Control/ShopDeviceConfigView.xaml.cs +++ b/BPASmartClient/Control/ShopDeviceConfigView.xaml.cs @@ -16,8 +16,8 @@ using System.Windows.Navigation; using System.Windows.Shapes; using BPASmartClient.DialogWindow; using BPASmartClient.Helper; +using BPASmartClient.Model; using BPASmartClient.ViewModel; -using BPASmartClient.ViewModel.Model; using Newtonsoft.Json; namespace BPASmartClient.Control @@ -140,7 +140,7 @@ namespace BPASmartClient.Control if (file != null && File.Exists(file.FullName)) { string JsonString = File.ReadAllText(file.FullName); - var result = JsonConvert.DeserializeObject>(JsonString); + var result = JsonConvert.DeserializeObject>(JsonString); if (result != null) { ShopDeviceConfigViewModel.deviceConfig.Clear(); diff --git a/BPASmartClient/Control/SystemSetView.xaml b/BPASmartClient/Control/SystemSetView.xaml index 6cf92742..7d977a72 100644 --- a/BPASmartClient/Control/SystemSetView.xaml +++ b/BPASmartClient/Control/SystemSetView.xaml @@ -1,12 +1,144 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmartClient/DeviceInfo.xml b/BPASmartClient/DeviceInfo.xml index 4fb9fd66..f59cf981 100644 --- a/BPASmartClient/DeviceInfo.xml +++ b/BPASmartClient/DeviceInfo.xml @@ -1,6 +1,6 @@  - - - - - - 192.168.6.1 - 502 - M,M0.1,1;M,M1.0,8;M,M2.0,9;M,M8.0,4;M,M13.5,1;M,M16.0,7; - - - - + + + + - + + + + + + 127.0.0.1 + 502 + M,M230.0,24;M,M0.3,3;M,M100.0,16;M,M235.0,1;M,M102.0,7;M,M103.0,6;VW,VW372,1 diff --git a/BPASmartClient/MainWindow.xaml b/BPASmartClient/MainWindow.xaml index 9776b21e..bbaa780d 100644 --- a/BPASmartClient/MainWindow.xaml +++ b/BPASmartClient/MainWindow.xaml @@ -26,7 +26,6 @@ - @@ -50,7 +49,7 @@ Margin="20,0,0,0" VerticalAlignment="Center" Style="{DynamicResource imagetop_Title}" /> - + + + + + -