Browse Source

消息日志修改

样式分支
pry 2 years ago
parent
commit
1c5abf3484
2 changed files with 35 additions and 1 deletions
  1. +34
    -0
      BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs
  2. +1
    -1
      BPASmartClient.JXJFoodSmallStation/App.xaml.cs

+ 34
- 0
BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs View File

@@ -20,6 +20,40 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel
public MainViewModel()
{
NavChangedCommand = new RelayCommand<object>(DoNavChanged);
BPASmartClient.Message. MessageLog.GetInstance.InfoNotify = new Action<string>((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<string>((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<string>((o) =>
{
Application.Current?.Dispatcher?.Invoke(() =>


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/App.xaml.cs View File

@@ -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)


Loading…
Cancel
Save