public ConcreteCollectionForm(CollectionEditor editor) : base(editor) { this.editor = editor; this.labelMember = new System.Windows.Forms.Label(); this.labelProperty = new System.Windows.Forms.Label(); this.itemsList = new UpdateableListbox(); this.itemDisplay = new System.Windows.Forms.PropertyGrid(); this.doClose = new System.Windows.Forms.Button(); this.moveUp = new System.Windows.Forms.Button(); this.moveDown = new System.Windows.Forms.Button(); this.doAdd = new System.Windows.Forms.Button(); this.doRemove = new System.Windows.Forms.Button(); this.doCancel = new System.Windows.Forms.Button(); this.addType = new System.Windows.Forms.ComboBox(); this.SuspendLayout(); // // labelMember // this.labelMember.Location = new System.Drawing.Point(12, 9); this.labelMember.Size = new System.Drawing.Size(55, 13); this.labelMember.Text = "Members:"; // // labelProperty // this.labelProperty.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.labelProperty.Location = new System.Drawing.Point(172, 9); this.labelProperty.Size = new System.Drawing.Size(347, 13); this.labelProperty.Text = "Properties:"; // // itemsList // this.itemsList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.itemsList.HorizontalScrollbar = true; this.itemsList.Location = new System.Drawing.Point(12, 25); this.itemsList.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.itemsList.Size = new System.Drawing.Size(120, 290); this.itemsList.TabIndex = 0; this.itemsList.SelectedIndexChanged += new System.EventHandler(this.itemsList_SelectedIndexChanged); // // itemDisplay // this.itemDisplay.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.itemDisplay.HelpVisible = false; this.itemDisplay.Location = new System.Drawing.Point(175, 25); this.itemDisplay.Size = new System.Drawing.Size(344, 314); this.itemDisplay.TabIndex = 6; this.itemDisplay.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.itemDisplay_PropertyValueChanged); // // doClose // this.doClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.doClose.Location = new System.Drawing.Point(341, 345); this.doClose.Size = new System.Drawing.Size(86, 26); this.doClose.TabIndex = 7; this.doClose.Text = "OK"; this.doClose.Click += new System.EventHandler(this.doClose_Click); // // moveUp // this.moveUp.Location = new System.Drawing.Point(138, 25); this.moveUp.Size = new System.Drawing.Size(31, 28); this.moveUp.TabIndex = 4; this.moveUp.Enabled = false; this.moveUp.Text = "Up"; this.moveUp.Click += new System.EventHandler(this.moveUp_Click); // // moveDown // this.moveDown.Location = new System.Drawing.Point(138, 59); this.moveDown.Size = new System.Drawing.Size(31, 28); this.moveDown.TabIndex = 5; this.moveDown.Enabled = false; this.moveDown.Text = "Dn"; this.moveDown.Click += new System.EventHandler(this.moveDown_Click); // // doAdd // this.doAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.doAdd.Location = new System.Drawing.Point(12, 346); this.doAdd.Size = new System.Drawing.Size(59, 25); this.doAdd.TabIndex = 1; this.doAdd.Text = "Add"; this.doAdd.Click += new System.EventHandler(this.doAdd_Click); // // doRemove // this.doRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.doRemove.Location = new System.Drawing.Point(77, 346); this.doRemove.Size = new System.Drawing.Size(55, 25); this.doRemove.TabIndex = 2; this.doRemove.Text = "Remove"; this.doRemove.Click += new System.EventHandler(this.doRemove_Click); // // doCancel // this.doCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.doCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.doCancel.Location = new System.Drawing.Point(433, 345); this.doCancel.Size = new System.Drawing.Size(86, 26); this.doCancel.TabIndex = 8; this.doCancel.Text = "Cancel"; this.doCancel.Click += new System.EventHandler(this.doCancel_Click); // // addType // this.addType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.addType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.addType.Location = new System.Drawing.Point(12, 319); this.addType.Size = new System.Drawing.Size(120, 21); this.addType.TabIndex = 3; // // DesignerForm // this.AcceptButton = this.doClose; this.CancelButton = this.doCancel; this.ClientSize = new System.Drawing.Size(531, 381); this.ControlBox = false; this.Controls.Add(this.addType); this.Controls.Add(this.doCancel); this.Controls.Add(this.doRemove); this.Controls.Add(this.doAdd); this.Controls.Add(this.moveDown); this.Controls.Add(this.moveUp); this.Controls.Add(this.doClose); this.Controls.Add(this.itemDisplay); this.Controls.Add(this.itemsList); this.Controls.Add(this.labelProperty); this.Controls.Add(this.labelMember); this.HelpButton = true; this.MaximizeBox = false; this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(400, 300); this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.ResumeLayout(false); if (editor.CollectionType.IsGenericType) { this.Text = editor.CollectionItemType.Name + " Collection Editor"; } else { this.Text = editor.CollectionType.Name + " Collection Editor"; } foreach (Type type in editor.NewItemTypes) { addType.Items.Add(type.Name); } if (addType.Items.Count > 0) { addType.SelectedIndex = 0; } }
public ConcreteCollectionForm (CollectionEditor editor) : base (editor) { this.editor = editor; this.labelMember = new System.Windows.Forms.Label (); this.labelProperty = new System.Windows.Forms.Label (); this.itemsList = new UpdateableListbox (); this.itemDisplay = new System.Windows.Forms.PropertyGrid (); this.doClose = new System.Windows.Forms.Button (); this.moveUp = new System.Windows.Forms.Button (); this.moveDown = new System.Windows.Forms.Button (); this.doAdd = new System.Windows.Forms.Button (); this.doRemove = new System.Windows.Forms.Button (); this.doCancel = new System.Windows.Forms.Button (); this.addType = new System.Windows.Forms.ComboBox (); this.SuspendLayout (); // // labelMember // this.labelMember.Location = new System.Drawing.Point (12, 9); this.labelMember.Size = new System.Drawing.Size (55, 13); this.labelMember.Text = "Members:"; // // labelProperty // this.labelProperty.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.labelProperty.Location = new System.Drawing.Point (172, 9); this.labelProperty.Size = new System.Drawing.Size (347, 13); this.labelProperty.Text = "Properties:"; // // itemsList // this.itemsList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.itemsList.HorizontalScrollbar = true; this.itemsList.Location = new System.Drawing.Point (12, 25); this.itemsList.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.itemsList.Size = new System.Drawing.Size (120, 290); this.itemsList.TabIndex = 0; this.itemsList.SelectedIndexChanged += new System.EventHandler (this.itemsList_SelectedIndexChanged); // // itemDisplay // this.itemDisplay.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.itemDisplay.HelpVisible = false; this.itemDisplay.Location = new System.Drawing.Point (175, 25); this.itemDisplay.Size = new System.Drawing.Size (344, 314); this.itemDisplay.TabIndex = 6; this.itemDisplay.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler (this.itemDisplay_PropertyValueChanged); // // doClose // this.doClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.doClose.Location = new System.Drawing.Point (341, 345); this.doClose.Size = new System.Drawing.Size (86, 26); this.doClose.TabIndex = 7; this.doClose.Text = "OK"; this.doClose.Click += new System.EventHandler (this.doClose_Click); // // moveUp // this.moveUp.Location = new System.Drawing.Point (138, 25); this.moveUp.Size = new System.Drawing.Size (31, 28); this.moveUp.TabIndex = 4; this.moveUp.Enabled = false; this.moveUp.Text = "Up"; this.moveUp.Click += new System.EventHandler (this.moveUp_Click); // // moveDown // this.moveDown.Location = new System.Drawing.Point (138, 59); this.moveDown.Size = new System.Drawing.Size (31, 28); this.moveDown.TabIndex = 5; this.moveDown.Enabled = false; this.moveDown.Text = "Dn"; this.moveDown.Click += new System.EventHandler (this.moveDown_Click); // // doAdd // this.doAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.doAdd.Location = new System.Drawing.Point (12, 346); this.doAdd.Size = new System.Drawing.Size (59, 25); this.doAdd.TabIndex = 1; this.doAdd.Text = "Add"; this.doAdd.Click += new System.EventHandler (this.doAdd_Click); // // doRemove // this.doRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.doRemove.Location = new System.Drawing.Point (77, 346); this.doRemove.Size = new System.Drawing.Size (55, 25); this.doRemove.TabIndex = 2; this.doRemove.Text = "Remove"; this.doRemove.Click += new System.EventHandler (this.doRemove_Click); // // doCancel // this.doCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.doCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.doCancel.Location = new System.Drawing.Point (433, 345); this.doCancel.Size = new System.Drawing.Size (86, 26); this.doCancel.TabIndex = 8; this.doCancel.Text = "Cancel"; this.doCancel.Click += new System.EventHandler (this.doCancel_Click); // // addType // this.addType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.addType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.addType.Location = new System.Drawing.Point (12, 319); this.addType.Size = new System.Drawing.Size (120, 21); this.addType.TabIndex = 3; // // DesignerForm // this.AcceptButton = this.doClose; this.CancelButton = this.doCancel; this.ClientSize = new System.Drawing.Size (531, 381); this.ControlBox = false; this.Controls.Add (this.addType); this.Controls.Add (this.doCancel); this.Controls.Add (this.doRemove); this.Controls.Add (this.doAdd); this.Controls.Add (this.moveDown); this.Controls.Add (this.moveUp); this.Controls.Add (this.doClose); this.Controls.Add (this.itemDisplay); this.Controls.Add (this.itemsList); this.Controls.Add (this.labelProperty); this.Controls.Add (this.labelMember); this.HelpButton = true; this.MaximizeBox = false; this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size (400, 300); this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.ResumeLayout (false); if (editor.CollectionType.IsGenericType) this.Text = editor.CollectionItemType.Name + " Collection Editor"; else this.Text = editor.CollectionType.Name + " Collection Editor"; foreach (Type type in editor.NewItemTypes) addType.Items.Add (type.Name); if (addType.Items.Count > 0) addType.SelectedIndex = 0; }