V1版本
This commit is contained in:
@@ -1,20 +1,84 @@
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CapMachine.Model;
|
||||
using CapMachine.Wpf.Dtos;
|
||||
using Prism.Mvvm;
|
||||
|
||||
namespace CapMachine.Wpf.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置服务中心
|
||||
/// 状态中心
|
||||
/// </summary>
|
||||
public class ConfigService:BindableBase
|
||||
public class ConfigService : BindableBase
|
||||
{
|
||||
public ConfigService()
|
||||
{
|
||||
|
||||
CurUserDto = new UserDto();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Csv文件锁
|
||||
/// 防止同时读取数据
|
||||
/// </summary>
|
||||
public static readonly object CsvFileLock = new object();
|
||||
|
||||
/// <summary>
|
||||
/// 记录周期
|
||||
/// </summary>
|
||||
public short RecordCycle { get; set; } = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// 是否开始记录数据
|
||||
/// </summary>
|
||||
public bool IsRecord { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// SCV保存的根路径
|
||||
/// </summary>
|
||||
public string SaveCsvRootPath { get; set; } = "D:\\TestData";
|
||||
|
||||
/// <summary>
|
||||
/// 实时曲线数据缓存的时间(秒)
|
||||
/// </summary>
|
||||
public int ChartRtDataCacheTimeSec { get; set; } = 3600_8;
|
||||
|
||||
private HistoryExp _CurExpInfo;
|
||||
/// <summary>
|
||||
/// 当前的试验信息
|
||||
/// </summary>
|
||||
public HistoryExp CurExpInfo
|
||||
{
|
||||
get { return _CurExpInfo; }
|
||||
set
|
||||
{
|
||||
_CurExpInfo = value;
|
||||
if (value != null)
|
||||
{
|
||||
IsExpInfoOk = true;
|
||||
}
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 试验信息是否OK
|
||||
/// </summary>
|
||||
public bool IsExpInfoOk { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 当前的试验信息
|
||||
///// </summary>
|
||||
//public HistoryExp CurExpInfo { get; set; }
|
||||
|
||||
|
||||
private UserDto _CurUserDto;
|
||||
/// <summary>
|
||||
/// 当前的用户信息
|
||||
/// </summary>
|
||||
public UserDto CurUserDto
|
||||
{
|
||||
get { return _CurUserDto; }
|
||||
set { _CurUserDto = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user