终端一体化运控平台
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

75 satır
1.8 KiB

  1. using BPASmartClient.Helper;
  2. using Microsoft.Toolkit.Mvvm.ComponentModel;
  3. using Microsoft.Toolkit.Mvvm.Input;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace BPASmartClient.ViewModel
  10. {
  11. /// <summary>
  12. /// 告警/日志查询界面
  13. /// </summary>
  14. public class LogOrAlarmViewModel : ObservableObject
  15. {
  16. #region 单一变量
  17. private volatile static LogOrAlarmViewModel _Instance;
  18. public static LogOrAlarmViewModel GetInstance() => _Instance ?? (_Instance = new LogOrAlarmViewModel());
  19. private LogOrAlarmViewModel()
  20. {
  21. Init();
  22. }
  23. #endregion
  24. #region 变量
  25. /// <summary>
  26. /// 选中变量
  27. /// </summary>
  28. private bool _selectCombox = true;
  29. public bool SelectCombox
  30. {
  31. get
  32. {
  33. return _selectCombox;
  34. }
  35. set
  36. {
  37. if (_selectCombox == value)
  38. return;
  39. _selectCombox = value;
  40. OnPropertyChanged("SelectCombox");
  41. }
  42. }
  43. #endregion
  44. #region Command
  45. public RelayCommand QueryCommand { get; set; }
  46. public RelayCommand OpenCommand { get; set; }
  47. #endregion
  48. #region 函数
  49. public void Init()
  50. {
  51. QueryCommand = new RelayCommand(() =>
  52. {
  53. });
  54. OpenCommand = new RelayCommand(() =>
  55. {
  56. System.Diagnostics.Process.Start("Explorer", "/select," + logHelper.GetLogConfigInstance().directRollfileAppender.File);
  57. //logHelper.GetLogConfigInstance().OpenFile(logHelper.GetLogConfigInstance().directRollfileAppender.File);
  58. });
  59. }
  60. #endregion
  61. }
  62. }