Example #1
0
		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);
			}
		}
Example #2
0
 private void toolBox_ShowDesignEditorDialog(object sender, EventArgs e)
 {
     DesignEditorDialog dlg = new DesignEditorDialog(project);
 }
Example #3
0
 private void stylesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DesignEditorDialog de = new DesignEditorDialog(project);
     de.ShowDialog(this);
 }
Example #4
0
 private void toolSetController1_DesignEditorSelected(object sender, EventArgs e)
 {
     DesignEditorDialog dlg = new DesignEditorDialog(project);
     dlg.FormClosed += new FormClosedEventHandler(dlg_FormClosed);
     dlg.Show(this);
 }
Example #5
0
		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);
			}
		}
Example #6
0
		private void editDesignsAndStylesToolStripMenuItem_Click(object sender, EventArgs e) {
			DesignEditorDialog dlg = new DesignEditorDialog(project);
			dlg.Show(this);
		}
Example #7
0
		private void toolBoxAdapter_ShowDesignEditor(object sender, System.EventArgs e) {
			DesignEditorDialog dlg = new DesignEditorDialog(project);
			dlg.Show(this);
		}
Example #8
0
 private void toolSetController_DesignEditorSelected(object sender, EventArgs e)
 {
     DesignEditorDialog dlg = new DesignEditorDialog(project);
     dlg.Show(this);
 }