Esempio n. 1
0
        /// <summary>
        /// Populates the <see cref="ValueSet"/> property with the content of the actual thing and the content of the transaction
        /// </summary>
        protected void PopulateValueSet()
        {
            this.ValueSet.ClearAndDispose();
            var row = new Dialogs.ParameterOverrideRowViewModel(this.Thing, this.Session, this, this.IsReadOnly);

            this.ValueSet.Add(row);
        }
Esempio n. 2
0
        /// <summary>
        /// Populates the <see cref="ValueSet" /> property with the content of the actual thing and the content of the transaction
        /// </summary>
        protected void PopulateValueSet()
        {
            this.ValueSet.ClearAndDispose();

            this.AvailableValueSets.Clear();

            if (this.IsSampledFunctionParameter)
            {
                this.ValueSetGridViewModels.Clear();

                foreach (var parameterValueSet in this.Thing.ValueSet)
                {
                    var newGridVm = new SampledFunctionParameterTypeValueSetGridViewModel(parameterValueSet, (SampledFunctionParameterType)this.Thing.ParameterType, !this.IsReadOnly);
                    newGridVm.PopulateSampledFunctionParameterTypeValueGrid();

                    this.ValueSetGridViewModels.Add(newGridVm);
                    this.AvailableValueSets.Add(new ValueSetRowViewModel(parameterValueSet));
                }

                this.DisplayedValueSet = this.AvailableValueSets.FirstOrDefault();

                return;
            }

            var row = new Dialogs.ParameterOverrideRowViewModel(this.Thing, this.Session, this, this.IsReadOnly);

            this.ValueSet.Add(row);
        }