Пример #1
0
 public void ShowFormEditor(CustomBorderForm owningForm)
 {
     FormStyleEditorControl editor;
     if (editorForm == null || editorForm.IsDisposed)
     {
         editorForm = new Form();
         components.Add(editorForm);
         editorForm.Text = "Form Style Editor";
        // editorForm.FormBorderStyle = FormBorderStyle.SizableToolWindow;
         editorForm.Size = new System.Drawing.Size(600, 400);
         editor = new FormStyleEditorControl();
         editor.Dock = DockStyle.Fill;
         editorForm.Controls.Add(editor);
         editorForm.FormClosing += new FormClosingEventHandler(editorForm_FormClosing);
         editorForm.FormClosed += new FormClosedEventHandler(editorForm_FormClosed);
     }
     else
     {
         editor = (FormStyleEditorControl)editorForm.Controls[0];
     }
     editor.OwningForm = owningForm;
     editorForm.Show();
 }
 private TreeNode MapFormToTreeNode(CustomBorderForm form, string propertyName)
 {
     TreeNode node = new TreeNode(propertyName);
     node.Tag = form;
     return node;
 }