123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- using System.Collections.Generic;
- using Caliburn.Micro.Core;
- namespace VirgoUI.Client.Models.Utility.SystemConfig
- {
- public enum DataType
- {
- Unknown,
- Int,
- Enum,
- Double,
- Bool,
- String
- };
- public class ConfigNode : PropertyChangedBase
- {
- private string name = string.Empty;
- public string Name
- {
- get { return name; }
- set { name = value; NotifyOfPropertyChange("Name"); }
- }
- private string nameView = string.Empty;
- public string NameView
- {
- get { return nameView; }
- set { nameView = value; NotifyOfPropertyChange("NameView"); }
- }
- private string path = string.Empty;
- public string Path
- {
- get { return path; }
- set { path = value; NotifyOfPropertyChange("Path"); }
- }
- private List<ConfigNode> _subNodes = null;
- public List<ConfigNode> SubNodes
- {
- get { return _subNodes; }
- set { _subNodes = value; NotifyOfPropertyChange("SubNodes"); }
- }
- private List<ConfigItem> _items = null;
- public List<ConfigItem> Items
- {
- get { return _items; }
- set { _items = value; NotifyOfPropertyChange("Items"); }
- }
- }
- public class ConfigItem : PropertyChangedBase
- {
- private string name = string.Empty;
- public string Name
- {
- get { return name; }
- set { name = value; NotifyOfPropertyChange("Name"); }
- }
- private string nameView = string.Empty;
- public string NameView
- {
- get { return nameView; }
- set { nameView = value; NotifyOfPropertyChange("NameView"); }
- }
- private string description = string.Empty;
- public string Description
- {
- get { return description; }
- set { description = value; NotifyOfPropertyChange("Description"); }
- }
- private DataType type = DataType.Unknown;
- public DataType Type
- {
- get { return type; }
- set { type = value; NotifyOfPropertyChange("Type"); }
- }
- private string defaultValue = string.Empty;
- public string DefaultValue
- {
- get { return defaultValue; }
- set { defaultValue = value; NotifyOfPropertyChange("DefaultValue"); }
- }
- private double max = double.NaN;
- public double Max
- {
- get { return max; }
- set { max = value; NotifyOfPropertyChange("Max"); }
- }
- private double min = double.NaN;
- public double Min
- {
- get { return min; }
- set { min = value; NotifyOfPropertyChange("Min"); }
- }
- private string parameter = string.Empty;
- public string Parameter
- {
- get { return parameter; }
- set { parameter = value; NotifyOfPropertyChange("Parameter"); }
- }
- private string tag = string.Empty;
- public string Tag
- {
- get { return tag; }
- set { tag = value; NotifyOfPropertyChange("Tag"); }
- }
- private string unit = string.Empty;
- public string Unit
- {
- get { return unit; }
- set { unit = value; NotifyOfPropertyChange("Unit"); }
- }
- private bool visible = true;
- public bool Visible
- {
- get { return visible; }
- set { visible = value; NotifyOfPropertyChange("Visible"); }
- }
- /// <summary>
- /// current value from interface, ready only
- /// </summary>
- private string cvalue = string.Empty;
- public string CurrentValue
- {
- get { return cvalue; }
- set { cvalue = value; NotifyOfPropertyChange("CurrentValue"); }
- }
- #region setpoint value
- private bool _bvalue = false;
- public bool BoolValue
- {
- get { return _bvalue; }
- set { _bvalue = value; NotifyOfPropertyChange("BoolValue"); }
- }
- private string _sValue = string.Empty;
- public string StringValue
- {
- get { return _sValue; }
- set { _sValue = value; NotifyOfPropertyChange("StringValue"); }
- }
- private bool _textSaved = true;
- public bool TextSaved
- {
- get { return _textSaved; }
- set { _textSaved = value; NotifyOfPropertyChange("TextSaved"); }
- }
- #endregion
- }
- }
|