Beispiel #1
0
        public void Update(ExpressionArgument source, DistributionSettings settings)
        {
            Clear();

            var properties = settings.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public)
                             .Where(x => x.CanWrite && x.CanRead);

            foreach (var property in properties)
            {
                Add(new DistributionSettingsBinding(source, settings, property));
            }
        }
        private void OnSettingsSet(DistributionSettings distributionSettings)
        {
            var properties = distributionSettings.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public).Where(x => x.CanRead && x.CanWrite).ToArray();


            if (properties.Length > _labels.Length)
            {
                throw new ArgumentOutOfRangeException(nameof(properties));
            }

            for (int i = 0; i < properties.Length; i++)
            {
                PropertyInfo property = properties[i];

                _members.Add(new SettingsMembers(_labels[i], _textBoxes[i], distributionSettings, property));
            }
        }
Beispiel #3
0
 public DistributionFunctionArgument(string arg, DistributionSettings settings)
 {
     Argument             = arg;
     _settingType         = settings.GetType();
     DistributionSettings = settings;
 }
 public ExpressionArgument(string arg, DistributionSettings settings)
     : this(arg, settings.GetType())
 {
     DistributionSettings = settings;
 }