终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

62 lines
1.9 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Runtime.CompilerServices;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using Microsoft.Toolkit.Mvvm.ComponentModel;
  9. using BPA.Helper;
  10. using System.Collections.ObjectModel;
  11. using System.Windows.Media;
  12. namespace BPASmartClient.CustomResource.Pages.ViewModel
  13. {
  14. public class DebugLogViewModel : ObservableObject
  15. {
  16. public DebugLogViewModel()
  17. {
  18. //MessageLog.GetInstance.NotifyShow = new Action<string>((o) => { });
  19. //MessageLog.GetInstance.DebugLog = new Action<string>((o) =>
  20. // {
  21. // Message = MessageLog.GetInstance.DebugLogInfo;
  22. // });
  23. }
  24. public static ObservableCollection<MessageModel> MessageModels { get; set; } = new ObservableCollection<MessageModel>();
  25. //public static string Message { get { return _mMessage; } set { _mMessage = value; OnStaticPropertyChanged(); } }
  26. //private static string _mMessage = string.Empty;
  27. //public static event EventHandler<PropertyChangedEventArgs> StaticPropertyChanged;
  28. //private static void OnStaticPropertyChanged([CallerMemberName] string PropName = "")
  29. //{
  30. // StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName));
  31. //}
  32. }
  33. public class MessageModel : ObservableObject
  34. {
  35. private DateTime _logTime;
  36. /// <summary>
  37. /// 记录打印时间。
  38. /// </summary>
  39. public DateTime LogTime
  40. {
  41. get { return _logTime; }
  42. set { _logTime = value; }
  43. }
  44. public string LogInfo { get { return _mLogInfo; } set { _mLogInfo = value; OnPropertyChanged(); } }
  45. private string _mLogInfo;
  46. public Brush Forground { get { return _mForground; } set { _mForground = value; OnPropertyChanged(); } }
  47. private Brush _mForground;
  48. }
  49. }