using AutomaticApp.Common;
using AutomaticApp.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace AutomaticApp.ViewModels
{
///
/// 系统日志数据记录
///
internal class LogViewModel : NotifyBase
{
string Save_Path = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + @"数据记录\";
public static ErrorMessageModel ErrorMessageModel { get; set; } = new ErrorMessageModel();
private DateTime selectedDate;
public DateTime SelectedDate
{
get { return selectedDate; }
set { selectedDate = value; this.DoNotify(); }
}
int pageNum = 0;
List logs = new List();
private int totalPage;
public int TotalPage
{
get { return totalPage; }
set { totalPage = value; this.DoNotify(); }
}
private string logMsg;
public string LogMsg
{
get { return logMsg; }
set { logMsg = value; this.DoNotify(); }
}
public CommandBase ReadTxtLogCommand { get; set; }//读取日志信息
public CommandBase ForwordLogCommand { get; set; }//读取日志信息
public CommandBase NextLogCommand { get; set; }//读取日志信息
public LogViewModel()
{
SelectedDate = DateTime.Now;
ReadTxtLog(null);
this.ReadTxtLogCommand = new CommandBase();
this.ReadTxtLogCommand.DoExcute = new Action