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