Exemplo 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.Clear();
            var row = new Dialogs.ParameterSubscriptionRowViewModel(this.Thing, this.Session, this, this.IsReadOnly);

            this.ValueSet.Add(row);
        }
        /// <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.ParameterSubscriptionRowViewModel(this.Thing, this.Session, this, this.IsReadOnly);

            this.ValueSet.Add(row);
        }