using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using Newtonsoft.Json;
using HBLConsole.Service;
namespace HBLConsole.Model
{
///
/// 变量信息
///
[Table(nameof(VariableInfo))]
public class VariableInfo : ObservableObject
{
[Key]
public int ID { get { return _mID; } set { _mID = value; OnPropertyChanged(); } }
private int _mID;
///
/// 变量名
///
public string VarName
{
get { return _mVarName; }
set
{
_mVarName = value;
OnPropertyChanged();
ActionManage.GetInstance.Send("VarNameChanged", _mID);
}
}
private string _mVarName;
///
/// 地址
///
public string Address { get { return _mAddress; } set { _mAddress = value; OnPropertyChanged(); } }
private string _mAddress;
///
/// 数据类型
///
public string DataType { get { return _mDataType; } set { _mDataType = value; OnPropertyChanged(); } }
private string _mDataType;
///
/// 是否启用报警
///
public bool IsEnableAlarm { get { return _mIsEnableAlarm; } set { _mIsEnableAlarm = value; OnPropertyChanged(); } }
private bool _mIsEnableAlarm;
///
/// 当前值
///
public string CurrentValue { get { return _mCurrentValue; } set { _mCurrentValue = value; OnPropertyChanged(); } }
private string _mCurrentValue;
///
/// 报警设置信息
///
public AlarmSet AlarmSetProp { get { return _mAlarmSetProp; } set { _mAlarmSetProp = value; OnPropertyChanged(); } }
private AlarmSet _mAlarmSetProp = new AlarmSet();
}
}