public BoundedInnerType(BoundedInnerType <T> other, ConfigurationVariable father) : base(other, father) { _lowest_value = other._lowest_value; _highest_value = other._highest_value; minValue = other.minValue; maxValue = other.maxValue; _is_low_bound = other._is_low_bound; _is_high_bound = other._is_high_bound; }
public virtual void AddVariable(ConfigurationVariable configurationVariable) { Variables.Add(configurationVariable); RaisePropertyChanged("Variables"); RaisePropertyChanged("TextRepresentation"); RaisePropertyChanged("LabelName"); Dirty = true; configurationVariable.Father = this; }
public BoundedInnerType(ConfigurationVariable father, T value, T lower_bound, T higher_bound, bool is_low_bound, bool is_high_bound, bool is_explicit = false) : base(father, value, is_explicit) { _lowest_value = lower_bound; _highest_value = higher_bound; maxValue = (T)(typeof(T).GetField("MaxValue", BindingFlags.Public | BindingFlags.Static)).GetValue(null); minValue = (T)(typeof(T).GetField("MinValue", BindingFlags.Public | BindingFlags.Static)).GetValue(null); _is_high_bound = is_low_bound; _is_low_bound = is_high_bound; }
protected override void DeleteVariable(ConfigurationVariable configurationVariable) { int index = Variables.IndexOf(configurationVariable); for (int i = index + 1; i < Variables.Count; i++) { Variables[i].ConfigurationName = "Element " + i.ToString(); } base.DeleteVariable(configurationVariable); }
public ConfigurationComposite(JObject array, Changable father = null, string name = "", bool is_explicit = false, string description = "", string notes = "") : base(father, ConfigurationComposite.brush, name, is_explicit, description, notes) { foreach (KeyValuePair <String, JToken> value in array) { ConfigurationVariable cv = ConfigurationVariable.ConvertJsonToConfiguration(value.Key, value.Value, this); if (cv != null) { Variables.Add(ConfigurationVariable.ConvertJsonToConfiguration(value.Key, value.Value, this)); } } IsComposite = true; }
protected ConfigurationVariable(ConfigurationVariable other, Changable father = null) { if (father == null) { Father = new EmptyFather(); } else { Father = father; } UpdateBy(other); }
public ConfigurationList(JArray array, Changable father = null, string name = "", bool is_explicit = false, string description = "", string notes = "") : base(father, ConfigurationList.brush, name, is_explicit, description, notes) { int index = 1; foreach (JToken value in array) { ConfigurationVariable cv = ConfigurationVariable.ConvertJsonToConfiguration("Element " + index.ToString(), value, this); if (cv != null) { Variables.Add(ConfigurationVariable.ConvertJsonToConfiguration("Element " + index.ToString(), value, this)); index++; } } IsComposite = true; }
public virtual void UpdateBy(ConfigurationVariable other) { IsExplicit = other.IsExplicit; IsComposite = other.IsComposite; //PropertyChanged = other.PropertyChanged; FontColor = other.FontColor; ConfigurationName = other.ConfigurationName; Dirty = other.Dirty; Variables = new ObservableCollection <ConfigurationVariable>(other.Variables.Select(x => x.Clone(this)).ToList()); _is_name_visible = other._is_name_visible; _notes = other._notes; _description = other._description; IsExplicitnessChangeable = other.IsExplicitnessChangeable; if (Dirty) { RaisePropertyChanged("Variables"); RaisePropertyChanged("ConfigurationName"); RaisePropertyChanged("Description"); RaisePropertyChanged("Notes"); RaisePropertyChanged("TextRepresentation"); RaisePropertyChanged("IsValid"); } }
public FloatType(FloatType other, ConfigurationVariable father = null) : base(other, father) { }
public override InnerType <int> Clone(ConfigurationVariable father = null) { return(new IntegerType(this, father)); }
public IntegerType(IntegerType other, ConfigurationVariable father = null) : base(other, father) { }
public InnerType(ConfigurationVariable father, T value, bool is_explicit = false) { Father = father; Value = value; Dirty = false; }
protected virtual void DeleteVariable(ConfigurationVariable configurationVariable) { Variables.Remove(configurationVariable); RaisePropertyChanged("Variables"); Dirty = true; }
public EnumType(EnumType other, ConfigurationVariable father = null) : base(other, father) { _is_global_enum = other._is_global_enum; _enum_name = other._enum_name; EnumValues = new ObservableCollection <string>(other.EnumValues); }
public override InnerType <bool> Clone(ConfigurationVariable father = null) { return(new BoolType(this, father)); }
public override InnerType <float> Clone(ConfigurationVariable father = null) { return(new FloatType(this, father)); }
public override void AddVariable(ConfigurationVariable configurationVariable) { configurationVariable.ConfigurationName = "Element " + (Variables.Count + 1).ToString(); base.AddVariable(configurationVariable); }
public StringType(StringType other, ConfigurationVariable father = null) : base(other, father) { }
public abstract InnerType <T> Clone(ConfigurationVariable father = null);
public InnerType(InnerType <T> other, ConfigurationVariable father) { Father = father; Value = other.Value; Dirty = other.Dirty; }
public override InnerType <string> Clone(ConfigurationVariable father = null) { return(new EnumType(this, father)); }
public BoolType(BoolType other, ConfigurationVariable father = null) : base(other, father) { }