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 _subNodes = null; public List SubNodes { get { return _subNodes; } set { _subNodes = value; NotifyOfPropertyChange("SubNodes"); } } private List _items = null; public List 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"); } } /// /// current value from interface, ready only /// 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 } }