diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs index e2d6bde9..a1a4ddf9 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs @@ -20,6 +20,40 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public MainViewModel() { NavChangedCommand = new RelayCommand(DoNavChanged); + BPASmartClient.Message. MessageLog.GetInstance.InfoNotify = new Action((o) => + { + Application.Current?.Dispatcher?.Invoke(() => + { + //ff20aefe + var temp = new MessageModel() + { + LogInfo = o, + Forground = new SolidColorBrush(Color.FromArgb(255, 32, 174, 254)) + }; + if (DebugLogViewModel.MessageModels.Count > 0) + DebugLogViewModel.MessageModels.Insert(0, temp); + else + DebugLogViewModel.MessageModels.Add(temp); + }); + }); + + BPASmartClient.Message.MessageLog.GetInstance.ExInfoNotify = new Action((o) => + { + Application.Current?.Dispatcher?.Invoke(() => + { + //FFF53F62 + var temp = new MessageModel() + { + LogInfo = o, + Forground = new SolidColorBrush(Color.FromArgb(255, 245, 63, 98)) + }; + if (DebugLogViewModel.MessageModels.Count > 0) + DebugLogViewModel.MessageModels.Insert(0, temp); + else + DebugLogViewModel.MessageModels.Add(temp); + }); + }); + BPA.Helper.MessageLog.GetInstance.NotifyShow = new Action((o) => { Application.Current?.Dispatcher?.Invoke(() => diff --git a/BPASmartClient.JXJFoodSmallStation/App.xaml.cs b/BPASmartClient.JXJFoodSmallStation/App.xaml.cs index e5787289..c658c57b 100644 --- a/BPASmartClient.JXJFoodSmallStation/App.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/App.xaml.cs @@ -29,8 +29,8 @@ namespace BPASmartClient.JXJFoodSmallStation MenuInit(); DataInit(); //DeviceInquire.GetInstance.Init();//配料机设备上线监听,设备列表初始化 - ProcessControl.GetInstance.Init(); MainView mv = new MainView(); + ProcessControl.GetInstance.Init(); LoginView lv = new LoginView(); var res = lv.ShowDialog(); if (res != null && res == true)