private void ExecuteSelection() { if (SelectedItem is OpenDesignerItem) { if (styleSetProvider is Project) { // Try to find the main window (the application's first opened window) Form parentForm = (Application.OpenForms.Count > 0) ? Application.OpenForms[0] : null; // Show dialog with parent form or otherwise it will show in background DesignEditorDialog dlg = new DesignEditorDialog((Project)styleSetProvider, styleCategory); if (parentForm == null) dlg.Show(); else dlg.Show(parentForm); } SelectedItem = preselectedStyle; } if (editorService != null) editorService.CloseDropDown(); else { // Notify ToolCache about changed styles only if no EditorService is set. // Otherwise the ToolCache re-creates the associated brush, pen, etc // each time the user selects a style for a shape in the property grid. if (SelectedStyle is CapStyle || SelectedStyle is LineStyle) ToolCache.NotifyStyleChanged(SelectedStyle); } }
private void toolBox_ShowDesignEditorDialog(object sender, EventArgs e) { DesignEditorDialog dlg = new DesignEditorDialog(project); }
private void stylesToolStripMenuItem_Click(object sender, EventArgs e) { DesignEditorDialog de = new DesignEditorDialog(project); de.ShowDialog(this); }
private void toolSetController1_DesignEditorSelected(object sender, EventArgs e) { DesignEditorDialog dlg = new DesignEditorDialog(project); dlg.FormClosed += new FormClosedEventHandler(dlg_FormClosed); dlg.Show(this); }
private void ExecuteSelection() { if (SelectedItem is OpenDesignerItem) { if (styleSetProvider is Project) { // Try to find the main window (the application's first opened window) Form parentForm = (Application.OpenForms.Count > 0) ? Application.OpenForms[0] : null; // Show dialog with parent form or otherwise it will show in background DesignEditorDialog dlg = new DesignEditorDialog((Project) styleSetProvider, styleCategory); if (parentForm == null) dlg.Show(); else dlg.Show(parentForm); } SelectedItem = preselectedStyle; } if (editorService != null) editorService.CloseDropDown(); else { // Notify ToolCache about changed styles only if no EditorService is set. // Otherwise the ToolCache re-creates the associated brush, pen, etc // each time the user selects a style for a shape in the property grid. if (SelectedStyle is CapStyle || SelectedStyle is LineStyle) ToolCache.NotifyStyleChanged(SelectedStyle); } }
private void editDesignsAndStylesToolStripMenuItem_Click(object sender, EventArgs e) { DesignEditorDialog dlg = new DesignEditorDialog(project); dlg.Show(this); }
private void toolBoxAdapter_ShowDesignEditor(object sender, System.EventArgs e) { DesignEditorDialog dlg = new DesignEditorDialog(project); dlg.Show(this); }
private void toolSetController_DesignEditorSelected(object sender, EventArgs e) { DesignEditorDialog dlg = new DesignEditorDialog(project); dlg.Show(this); }