using BPASmartClient.Helper;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using Microsoft.Toolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BPASmartClient.ViewModel
{
///
/// 告警/日志查询界面
///
public class LogOrAlarmViewModel : ObservableObject
{
#region 单一变量
private volatile static LogOrAlarmViewModel _Instance;
public static LogOrAlarmViewModel GetInstance() => _Instance ?? (_Instance = new LogOrAlarmViewModel());
private LogOrAlarmViewModel()
{
Init();
}
#endregion
#region 变量
///
/// 选中变量
///
private bool _selectCombox = true;
public bool SelectCombox
{
get
{
return _selectCombox;
}
set
{
if (_selectCombox == value)
return;
_selectCombox = value;
OnPropertyChanged("SelectCombox");
}
}
#endregion
#region Command
public RelayCommand QueryCommand { get; set; }
public RelayCommand OpenCommand { get; set; }
#endregion
#region 函数
public void Init()
{
QueryCommand = new RelayCommand(() =>
{
});
OpenCommand = new RelayCommand(() =>
{
System.Diagnostics.Process.Start("Explorer", "/select," + logHelper.GetLogConfigInstance().directRollfileAppender.File);
//logHelper.GetLogConfigInstance().OpenFile(logHelper.GetLogConfigInstance().directRollfileAppender.File);
});
}
#endregion
}
}