public DataFieldItem(Structure parent, PDataField dataField) { this.Opacity = 1; this.Parent = parent; this.DataField = dataField; this.SetComponentModel(dataField); this.InputThumb = base.ParameterThumbs[0]; }
private void EnsureAddField(PDataField field) { var item = this.Items.FirstOrDefault(t => t.DataField == field); if (item != null) { return; } this.Items.SafeAdd(item = new DataFieldItem(this, field)); }
private void EnsureRemoveField(PDataField field) { var item = this.Items.FirstOrDefault(t => t.DataField == field); if (item == null) { return; } if (this.Items.SafeRemove(item)) { item.Model.ReleaseAll(); } }