Пример #1
0
 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;
 }
Пример #2
0
 public virtual void AddVariable(ConfigurationVariable configurationVariable)
 {
     Variables.Add(configurationVariable);
     RaisePropertyChanged("Variables");
     RaisePropertyChanged("TextRepresentation");
     RaisePropertyChanged("LabelName");
     Dirty = true;
     configurationVariable.Father = this;
 }
Пример #3
0
 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;
 }
Пример #6
0
 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;
        }
Пример #8
0
 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)
 {
 }
Пример #10
0
 public override InnerType <int> Clone(ConfigurationVariable father = null)
 {
     return(new IntegerType(this, father));
 }
Пример #11
0
 public IntegerType(IntegerType other, ConfigurationVariable father = null) : base(other, father)
 {
 }
Пример #12
0
 public InnerType(ConfigurationVariable father, T value, bool is_explicit = false)
 {
     Father = father;
     Value  = value;
     Dirty  = false;
 }
Пример #13
0
 protected virtual void DeleteVariable(ConfigurationVariable configurationVariable)
 {
     Variables.Remove(configurationVariable);
     RaisePropertyChanged("Variables");
     Dirty = true;
 }
Пример #14
0
 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);
 }
Пример #18
0
 public StringType(StringType other, ConfigurationVariable father = null) : base(other, father)
 {
 }
Пример #19
0
 public abstract InnerType <T> Clone(ConfigurationVariable father = null);
Пример #20
0
 public InnerType(InnerType <T> other, ConfigurationVariable father)
 {
     Father = father;
     Value  = other.Value;
     Dirty  = other.Dirty;
 }
Пример #21
0
 public override InnerType <string> Clone(ConfigurationVariable father = null)
 {
     return(new EnumType(this, father));
 }
 public BoolType(BoolType other, ConfigurationVariable father = null) : base(other, father)
 {
 }