diff --git a/BPASmartClient.Business/Plugin/OrderProxy.cs b/BPASmartClient.Business/Plugin/OrderProxy.cs index 5dcc1e6c..00006f1a 100644 --- a/BPASmartClient.Business/Plugin/OrderProxy.cs +++ b/BPASmartClient.Business/Plugin/OrderProxy.cs @@ -45,11 +45,11 @@ namespace BPASmartClient.Business if (morkOrderPushes.TryDequeue(out MorkOrderPush mork)) { Thread.Sleep(3000); - new OrderStatusChangedEvent() { Status = ORDER_STATUS.COOKING, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); + new OrderStatusChangedEvent() { SortNum = mork.SortNum.ToString(), Status = ORDER_STATUS.COOKING, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); Thread.Sleep(5000); - new OrderStatusChangedEvent() { Status = ORDER_STATUS.COMPLETED_COOK, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); + new OrderStatusChangedEvent() { SortNum = mork.SortNum.ToString(), Status = ORDER_STATUS.COMPLETED_COOK, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); Thread.Sleep(5000); - new OrderStatusChangedEvent() { Status = ORDER_STATUS.COMPLETED_TAKE, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); + new OrderStatusChangedEvent() { SortNum = mork.SortNum.ToString(), Status = ORDER_STATUS.COMPLETED_TAKE, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); Thread.Sleep(2000); } } diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj index a0cc2d58..63cfb701 100644 --- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj +++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj @@ -167,6 +167,17 @@ + + + + + + + $(DefaultXamlRuntime) + MSBuild:Compile + + + diff --git a/BPASmartClient.CustomResource/Properties/App.xaml b/BPASmartClient.CustomResource/Properties/App.xaml new file mode 100644 index 00000000..5b068fc6 --- /dev/null +++ b/BPASmartClient.CustomResource/Properties/App.xaml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmartClient.CustomResource/Properties/App.xaml.cs b/BPASmartClient.CustomResource/Properties/App.xaml.cs new file mode 100644 index 00000000..b5919965 --- /dev/null +++ b/BPASmartClient.CustomResource/Properties/App.xaml.cs @@ -0,0 +1,132 @@ +using BPA.Message; +using BPA.Message.Enum; +using BPASmartClient.Helper; +using BPASmartClient.Message; +using BPASmartClient.Model; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Configuration; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Forms; + +namespace BPASmartClient +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : System.Windows.Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + SystemHelper.GetInstance.CreateDesktopShortcut(); + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; + DataRead(); + MainWindow mainView = new MainWindow(); + mainView.Show(); + SplitScreenDisplay(); + NoCompleteOrderInit(); + } + + /// + /// 分屏显示 + /// + private void SplitScreenDisplay() + { + if (Screen.AllScreens.Length == 3) + { + //left = new MORKD_Window_Left(); + //right = new MORKD_Window_Right(); + + //Screen[] screen = Screen.AllScreens; + //Rectangle[] rectangle = new Rectangle[screen.Length]; + //Window[] windows = new Window[screen.Length]; + //windows[0] = mainView; + //windows[1] = left; + //windows[2] = right; + //for (int i = 0; i < screen.Length; i++) + //{ + // rectangle[i] = screen[i].WorkingArea; + // windows[i].Height = rectangle[i].Height; + // windows[i].Width = rectangle[i].Width; + // windows[i].Top = rectangle[i].Top; + // windows[i].Left = rectangle[i].Left; + //} + + //left.Show(); + //right.Show(); + //windows[1].Owner = windows[0]; + //windows[2].Owner = windows[0]; + } + } + + /// + /// 未完成订单初始化 + /// + private void NoCompleteOrderInit() + { + if (Json.Data.orderLists.Count > 0) + { + OrderListDialogView listDialogView = new OrderListDialogView(); + listDialogView.ShowDialog(); + } + } + + private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + var ErroLog = e.ExceptionObject.ToString(); + MessageLog.GetInstance.Show(ErroLog); + TextHelper.GetInstance.WriteTextInfo(ErroLog, "ErroLog"); + DataSave(); + //SqlHelper.GetInstance.Save(); + //MainConsole.Main.GetInstance.DataSave(); + //IotReport.GetInstance.HttpAddLog(new BPA.Message.API请求.LogTable + //{ + // ClientId = InternetInfo.ClientId.ToString(), + // LogTime = DateTime.Now, + // LogType = "1", + // LogMessage = ErroLog, + // LogVla = "异常", + //}); + // Process.Start($"{AppDomain.CurrentDomain.BaseDirectory}{AppDomain.CurrentDomain.FriendlyName}.exe"); + } + + protected override void OnExit(ExitEventArgs e) + { + base.OnExit(e); + DataSave(); + //IotReport.Close(); + //SqlHelper.GetInstance.Save(); + //MainConsole.Main.GetInstance.DataSave(); + ThreadManage.GetInstance().Dispose(); + System.Environment.Exit(0); + + } + + /// + /// 输入保存 + /// + private void DataSave() + { + Json.Save(); + //Sqlite.GetInstance.Save(); + } + + /// + /// 输入读取 + /// + private void DataRead() + { + Json.Read(); + Task.Run(new Action(() => { Sqlite.GetInstance.GetData(); })); + } + + + + } +} diff --git a/BPASmartClient.CustomResource/RecDictionarys/RecButtonStyle.xaml b/BPASmartClient.CustomResource/RecDictionarys/RecButtonStyle.xaml new file mode 100644 index 00000000..66931049 --- /dev/null +++ b/BPASmartClient.CustomResource/RecDictionarys/RecButtonStyle.xaml @@ -0,0 +1,32 @@ + + + + + + \ No newline at end of file diff --git a/BPASmartClient.MorkS/View/Debug.xaml b/BPASmartClient.MorkS/View/Debug.xaml index b625652e..8ee7f171 100644 --- a/BPASmartClient.MorkS/View/Debug.xaml +++ b/BPASmartClient.MorkS/View/Debug.xaml @@ -16,10 +16,16 @@ -