public StaticListDropDownPropertyControl(PropertyControlInfo propInfo) : base(propInfo) { base.SuspendLayout(); this.header = new HeadingLabel(); this.header.Name = "header"; this.header.RightMargin = 0; this.header.Text = base.DisplayName; this.comboBox = new PdnDropDownList(); this.comboBox.Name = "comboBox"; this.comboBox.SelectedIndexChanged += new EventHandler(this.OnComboBoxSelectedIndexChanged); this.comboBox.BeginUpdate(); foreach (object obj2 in base.Property.ValueChoices) { string valueDisplayName = propInfo.GetValueDisplayName(obj2); this.comboBox.Items.Add(valueDisplayName); } this.comboBox.EndUpdate(); this.descriptionText = new PdnLabel(); this.descriptionText.Name = "descriptionText"; this.descriptionText.AutoSize = false; this.descriptionText.Text = base.Description; Control[] controls = new Control[] { this.header, this.comboBox, this.descriptionText }; base.Controls.AddRange(controls); base.ResumeLayout(false); base.PerformLayout(); }
public StaticListRadioButtonPropertyControl(PropertyControlInfo propInfo) : base(propInfo) { base.SuspendLayout(); this.header = new HeadingLabel(); this.header.Name = "header"; this.header.RightMargin = 0; this.header.Text = base.DisplayName; object[] valueChoices = base.Property.ValueChoices; this.radioButtons = new PdnRadioButton[valueChoices.Length]; for (int i = 0; i < this.radioButtons.Length; i++) { this.radioButtons[i] = new PdnRadioButton(); this.radioButtons[i].Name = "radioButton" + i.ToString(CultureInfo.InvariantCulture); this.radioButtons[i].IsCheckedChanged += new EventHandler(this.OnRadioButtonCheckedChanged); string valueDisplayName = propInfo.GetValueDisplayName(valueChoices[i]); this.radioButtons[i].Text = valueDisplayName; } this.descriptionText = new PdnLabel(); this.descriptionText.Name = "descriptionText"; this.descriptionText.AutoSize = false; this.descriptionText.Text = base.Description; base.Controls.Add(this.header); base.Controls.AddRange(this.radioButtons); base.Controls.Add(this.descriptionText); base.ResumeLayout(false); base.PerformLayout(); }
public StaticListDropDownPropertyControl(PropertyControlInfo propInfo) : base(propInfo) { SuspendLayout(); this.header = new HeaderLabel(); this.header.Name = "header"; this.header.RightMargin = 0; this.header.Text = this.DisplayName; this.comboBox = new ComboBox(); this.comboBox.Name = "comboBox"; this.comboBox.FlatStyle = FlatStyle.System; this.comboBox.SelectedIndexChanged += new EventHandler(ComboBox_SelectedIndexChanged); this.comboBox.DropDownStyle = ComboBoxStyle.DropDownList; foreach (object choice in Property.ValueChoices) { string valueText = propInfo.GetValueDisplayName(choice); this.comboBox.Items.Add(valueText); } this.descriptionText = new Label(); this.descriptionText.Name = "descriptionText"; this.descriptionText.AutoSize = false; this.descriptionText.Text = this.Description; this.Controls.AddRange( new Control[] { this.header, this.comboBox, this.descriptionText }); ResumeLayout(false); PerformLayout(); }
public StaticListRadioButtonPropertyControl(PropertyControlInfo propInfo) : base(propInfo) { SuspendLayout(); this.header = new HeaderLabel(); this.header.Name = "header"; this.header.RightMargin = 0; this.header.Text = this.DisplayName; object[] valueChoices = Property.ValueChoices; // cache this to avoid making N copies this.radioButtons = new RadioButton[valueChoices.Length]; for (int i = 0; i < this.radioButtons.Length; ++i) { this.radioButtons[i] = new RadioButton(); this.radioButtons[i].Name = "radioButton" + i.ToString(CultureInfo.InvariantCulture); this.radioButtons[i].FlatStyle = FlatStyle.System; this.radioButtons[i].CheckedChanged += new EventHandler(RadioButton_CheckedChanged); string valueText = propInfo.GetValueDisplayName(valueChoices[i]); this.radioButtons[i].Text = valueText; } this.descriptionText = new Label(); this.descriptionText.Name = "descriptionText"; this.descriptionText.AutoSize = false; this.descriptionText.Text = this.Description; this.Controls.Add(this.header); this.Controls.AddRange(this.radioButtons); this.Controls.Add(this.descriptionText); ResumeLayout(false); PerformLayout(); }