From 37492166410c085e0e32777fcd9142f4ffa6b607 Mon Sep 17 00:00:00 2001 From: trevorde Date: Fri, 27 Dec 2019 13:05:26 +0000 Subject: [PATCH] - add specific language to support State Transition Diagrams --- .../ClassDiagram/DiagramDynamicMenu.cs | 9 +- src/GUI/GUI.csproj | 4 + src/GUI/MainForm.Designer.cs | 195 ++++++++++-------- src/GUI/MainForm.cs | 14 ++ src/GUI/ModelExplorer/DiagramNode.cs | 5 + src/GUI/ModelExplorer/ModelView.Designer.cs | 27 +-- src/GUI/ModelExplorer/ModelView.resx | 111 +++++----- src/GUI/ModelExplorer/ProjectNode.cs | 14 +- .../Properties/AssemblyInfo.cs | 36 ++++ .../StateTransitionDiagram.csproj | 55 +++++ src/StateTransitionDiagram/StdClass.cs | 98 +++++++++ src/StateTransitionDiagram/StdLanguage.cs | 72 +++++++ src/Translations/Strings.Designer.cs | 11 +- src/Translations/Strings.resx | 5 +- src/nERD.sln | 14 ++ 15 files changed, 512 insertions(+), 158 deletions(-) create mode 100644 src/StateTransitionDiagram/Properties/AssemblyInfo.cs create mode 100644 src/StateTransitionDiagram/StateTransitionDiagram.csproj create mode 100644 src/StateTransitionDiagram/StdClass.cs create mode 100644 src/StateTransitionDiagram/StdLanguage.cs diff --git a/src/DiagramEditor/ClassDiagram/DiagramDynamicMenu.cs b/src/DiagramEditor/ClassDiagram/DiagramDynamicMenu.cs index 4fa5171..36b7718 100644 --- a/src/DiagramEditor/ClassDiagram/DiagramDynamicMenu.cs +++ b/src/DiagramEditor/ClassDiagram/DiagramDynamicMenu.cs @@ -66,18 +66,17 @@ public override void SetReference(IDocument document) mnuNewStructure.Visible = toolNewStructure.Visible = _diagram.Language.SupportsStructures; mnuNewDelegate.Visible = toolNewDelegate.Visible = _diagram.Language.SupportsDelegates; mnuNewEnum.Visible = toolNewEnum.Visible = _diagram.Language.SupportsEnums; - mnuNewState.Visible = toolNewState.Visible = _diagram.Language.SupportsStates; + mnuNewState.Visible = toolNewState.Visible = + mnuNewTransitionRelationship.Visible = toolNewTransitionRelationship.Visible = _diagram.Language.SupportsStates; - var isERDdiagram = _diagram.Language is EntityRelationshipDiagram.ErdLanguage; mnuNewAssociation.Visible = toolNewAssociation.Visible = mnuNewComposition.Visible = toolNewComposition.Visible = mnuNewAggregation.Visible = toolNewAggregation.Visible = mnuNewGeneralization.Visible = toolNewGeneralization.Visible = mnuNewRealization.Visible = toolNewRealization.Visible = mnuNewDependency.Visible = toolNewDependency.Visible = - mnuNewNesting.Visible = toolNewNesting.Visible = - mnuNewTransitionRelationship.Visible = toolNewTransitionRelationship.Visible = !isERDdiagram; - mnuNewEntityRelationship.Visible = toolNewEntityRelationship.Visible = isERDdiagram; + mnuNewNesting.Visible = toolNewNesting.Visible = _diagram.Language is CSharp.CSharpLanguage; + mnuNewEntityRelationship.Visible = toolNewEntityRelationship.Visible = _diagram.Language is EntityRelationshipDiagram.ErdLanguage; toolDelete.Enabled = _diagram.HasSelectedElement; } diff --git a/src/GUI/GUI.csproj b/src/GUI/GUI.csproj index 3e1cba3..3faf6b1 100644 --- a/src/GUI/GUI.csproj +++ b/src/GUI/GUI.csproj @@ -192,6 +192,10 @@ {722F4F78-E7CA-41C5-908A-707C0226486B} EntityRelationshipDiagram + + {484172f2-cef2-42f2-b397-1ec73db90bbe} + StateTransitionDiagram + {B3B7D798-3D52-47F0-B1A7-A91BC5FE184F} Translations diff --git a/src/GUI/MainForm.Designer.cs b/src/GUI/MainForm.Designer.cs index f5342c9..8c3a0c1 100644 --- a/src/GUI/MainForm.Designer.cs +++ b/src/GUI/MainForm.Designer.cs @@ -48,6 +48,7 @@ private void InitializeComponent() this.mnuSepProject = new System.Windows.Forms.ToolStripSeparator(); this.mnuNewCSharpDiagram = new System.Windows.Forms.ToolStripMenuItem(); this.mnuNewErdDiagram = new System.Windows.Forms.ToolStripMenuItem(); + this.mnuNewStdDiagram = new System.Windows.Forms.ToolStripMenuItem(); this.mnuOpen = new System.Windows.Forms.ToolStripMenuItem(); this.mnuOpenFile = new System.Windows.Forms.ToolStripMenuItem(); this.sepOpenFile = new System.Windows.Forms.ToolStripSeparator(); @@ -108,6 +109,7 @@ private void InitializeComponent() this.toolSepProject = new System.Windows.Forms.ToolStripSeparator(); this.toolNewCSharpDiagram = new System.Windows.Forms.ToolStripMenuItem(); this.toolNewErdDiagram = new System.Windows.Forms.ToolStripMenuItem(); + this.toolNewStdDiagram = new System.Windows.Forms.ToolStripMenuItem(); this.toolOpen = new System.Windows.Forms.ToolStripSplitButton(); this.toolRecentFile1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolRecentFile2 = new System.Windows.Forms.ToolStripMenuItem(); @@ -134,9 +136,11 @@ private void InitializeComponent() this.toolStripContainer.TopToolStripPanel.SuspendLayout(); this.toolStripContainer.SuspendLayout(); this.statusStrip.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.windowClient)).BeginInit(); this.windowClient.Panel1.SuspendLayout(); this.windowClient.Panel2.SuspendLayout(); this.windowClient.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.toolsPanel)).BeginInit(); this.toolsPanel.Panel1.SuspendLayout(); this.toolsPanel.Panel2.SuspendLayout(); this.toolsPanel.SuspendLayout(); @@ -156,11 +160,11 @@ private void InitializeComponent() this.toolStripContainer.ContentPanel.BackColor = System.Drawing.SystemColors.ControlDark; this.toolStripContainer.ContentPanel.Controls.Add(this.windowClient); this.toolStripContainer.ContentPanel.ForeColor = System.Drawing.SystemColors.ControlText; - this.toolStripContainer.ContentPanel.Size = new System.Drawing.Size(892, 595); + this.toolStripContainer.ContentPanel.Size = new System.Drawing.Size(892, 576); this.toolStripContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.toolStripContainer.Location = new System.Drawing.Point(0, 0); this.toolStripContainer.Name = "toolStripContainer"; - this.toolStripContainer.Size = new System.Drawing.Size(892, 666); + this.toolStripContainer.Size = new System.Drawing.Size(892, 647); this.toolStripContainer.TabIndex = 0; this.toolStripContainer.Text = "toolStripContainer1"; // @@ -183,7 +187,7 @@ private void InitializeComponent() // lblStatus // this.lblStatus.Name = "lblStatus"; - this.lblStatus.Size = new System.Drawing.Size(823, 17); + this.lblStatus.Size = new System.Drawing.Size(818, 17); this.lblStatus.Spring = true; this.lblStatus.Text = "Status"; this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -192,7 +196,7 @@ private void InitializeComponent() // this.lblLanguage.ForeColor = System.Drawing.SystemColors.GrayText; this.lblLanguage.Name = "lblLanguage"; - this.lblLanguage.Size = new System.Drawing.Size(54, 17); + this.lblLanguage.Size = new System.Drawing.Size(59, 17); this.lblLanguage.Text = "Language"; this.lblLanguage.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // @@ -216,7 +220,7 @@ private void InitializeComponent() this.windowClient.Panel2.BackColor = System.Drawing.SystemColors.Control; this.windowClient.Panel2.Controls.Add(this.toolsPanel); this.windowClient.Panel2MinSize = 100; - this.windowClient.Size = new System.Drawing.Size(892, 595); + this.windowClient.Size = new System.Drawing.Size(892, 576); this.windowClient.SplitterDistance = 650; this.windowClient.TabIndex = 0; // @@ -227,7 +231,7 @@ private void InitializeComponent() this.tabbedWindow.DocumentManager = null; this.tabbedWindow.Location = new System.Drawing.Point(1, 1); this.tabbedWindow.Name = "tabbedWindow"; - this.tabbedWindow.Size = new System.Drawing.Size(648, 593); + this.tabbedWindow.Size = new System.Drawing.Size(648, 574); this.tabbedWindow.TabIndex = 0; // // toolsPanel @@ -251,8 +255,8 @@ private void InitializeComponent() this.toolsPanel.Panel2.Controls.Add(this.diagramNavigator); this.toolsPanel.Panel2.Padding = new System.Windows.Forms.Padding(1); this.toolsPanel.Panel2MinSize = 100; - this.toolsPanel.Size = new System.Drawing.Size(238, 595); - this.toolsPanel.SplitterDistance = 405; + this.toolsPanel.Size = new System.Drawing.Size(238, 576); + this.toolsPanel.SplitterDistance = 386; this.toolsPanel.TabIndex = 0; // // modelExplorer @@ -268,7 +272,7 @@ private void InitializeComponent() this.modelExplorer.Name = "modelExplorer"; this.modelExplorer.SelectedImageIndex = 0; this.modelExplorer.ShowRootLines = false; - this.modelExplorer.Size = new System.Drawing.Size(236, 403); + this.modelExplorer.Size = new System.Drawing.Size(236, 384); this.modelExplorer.TabIndex = 0; this.modelExplorer.Workspace = null; this.modelExplorer.DocumentOpening += new NClass.DiagramEditor.DocumentEventHandler(this.ModelExplorer_DocumentOpening); @@ -316,7 +320,7 @@ private void InitializeComponent() this.mnuSepClose, this.mnuExit}); this.mnuFile.Name = "mnuFile"; - this.mnuFile.Size = new System.Drawing.Size(35, 20); + this.mnuFile.Size = new System.Drawing.Size(37, 20); this.mnuFile.Text = "&File"; this.mnuFile.DropDownOpening += new System.EventHandler(this.mnuFile_DropDownOpening); // @@ -326,10 +330,11 @@ private void InitializeComponent() this.mnuNewProject, this.mnuSepProject, this.mnuNewCSharpDiagram, - this.mnuNewErdDiagram}); + this.mnuNewErdDiagram, + this.mnuNewStdDiagram}); this.mnuNew.Image = global::NClass.GUI.Properties.Resources.NewDocument; this.mnuNew.Name = "mnuNew"; - this.mnuNew.Size = new System.Drawing.Size(167, 22); + this.mnuNew.Size = new System.Drawing.Size(165, 22); this.mnuNew.Text = "&New"; this.mnuNew.DropDownOpening += new System.EventHandler(this.mnuNew_DropDownOpening); // @@ -337,29 +342,36 @@ private void InitializeComponent() // this.mnuNewProject.Image = global::NClass.GUI.Properties.Resources.Project; this.mnuNewProject.Name = "mnuNewProject"; - this.mnuNewProject.Size = new System.Drawing.Size(149, 22); + this.mnuNewProject.Size = new System.Drawing.Size(219, 22); this.mnuNewProject.Text = "Project"; this.mnuNewProject.Click += new System.EventHandler(this.mnuNewProject_Click); // // mnuSepProject // this.mnuSepProject.Name = "mnuSepProject"; - this.mnuSepProject.Size = new System.Drawing.Size(146, 6); + this.mnuSepProject.Size = new System.Drawing.Size(216, 6); // // mnuNewCSharpDiagram // this.mnuNewCSharpDiagram.Name = "mnuNewCSharpDiagram"; - this.mnuNewCSharpDiagram.Size = new System.Drawing.Size(149, 22); + this.mnuNewCSharpDiagram.Size = new System.Drawing.Size(219, 22); this.mnuNewCSharpDiagram.Text = "&C# diagram"; this.mnuNewCSharpDiagram.Click += new System.EventHandler(this.mnuNewCSharpDiagram_Click); // // mnuNewErdDiagram // this.mnuNewErdDiagram.Name = "mnuNewErdDiagram"; - this.mnuNewErdDiagram.Size = new System.Drawing.Size(149, 22); + this.mnuNewErdDiagram.Size = new System.Drawing.Size(219, 22); this.mnuNewErdDiagram.Text = "&Entity Relationship diagram"; this.mnuNewErdDiagram.Click += new System.EventHandler(this.mnuNewErdDiagram_Click); // + // mnuNewStdDiagram + // + this.mnuNewStdDiagram.Name = "mnuNewStdDiagram"; + this.mnuNewStdDiagram.Size = new System.Drawing.Size(219, 22); + this.mnuNewStdDiagram.Text = "&Entity Relationship diagram"; + this.mnuNewStdDiagram.Click += new System.EventHandler(this.mnuNewStdDiagram_Click); + // // mnuOpen // this.mnuOpen.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -372,7 +384,7 @@ private void InitializeComponent() this.mnuRecentFile5}); this.mnuOpen.Image = global::NClass.GUI.Properties.Resources.Open; this.mnuOpen.Name = "mnuOpen"; - this.mnuOpen.Size = new System.Drawing.Size(167, 22); + this.mnuOpen.Size = new System.Drawing.Size(165, 22); this.mnuOpen.Text = "&Open"; this.mnuOpen.DropDownOpening += new System.EventHandler(this.mnuOpen_DropDownOpening); // @@ -380,19 +392,19 @@ private void InitializeComponent() // this.mnuOpenFile.Name = "mnuOpenFile"; this.mnuOpenFile.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.mnuOpenFile.Size = new System.Drawing.Size(153, 22); + this.mnuOpenFile.Size = new System.Drawing.Size(144, 22); this.mnuOpenFile.Text = "&File..."; this.mnuOpenFile.Click += new System.EventHandler(this.mnuOpenFile_Click); // // sepOpenFile // this.sepOpenFile.Name = "sepOpenFile"; - this.sepOpenFile.Size = new System.Drawing.Size(150, 6); + this.sepOpenFile.Size = new System.Drawing.Size(141, 6); // // mnuRecentFile1 // this.mnuRecentFile1.Name = "mnuRecentFile1"; - this.mnuRecentFile1.Size = new System.Drawing.Size(153, 22); + this.mnuRecentFile1.Size = new System.Drawing.Size(144, 22); this.mnuRecentFile1.Tag = 0; this.mnuRecentFile1.Text = "Recent File 1"; this.mnuRecentFile1.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -400,7 +412,7 @@ private void InitializeComponent() // mnuRecentFile2 // this.mnuRecentFile2.Name = "mnuRecentFile2"; - this.mnuRecentFile2.Size = new System.Drawing.Size(153, 22); + this.mnuRecentFile2.Size = new System.Drawing.Size(144, 22); this.mnuRecentFile2.Tag = 1; this.mnuRecentFile2.Text = "Recent File 2"; this.mnuRecentFile2.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -408,7 +420,7 @@ private void InitializeComponent() // mnuRecentFile3 // this.mnuRecentFile3.Name = "mnuRecentFile3"; - this.mnuRecentFile3.Size = new System.Drawing.Size(153, 22); + this.mnuRecentFile3.Size = new System.Drawing.Size(144, 22); this.mnuRecentFile3.Tag = 2; this.mnuRecentFile3.Text = "Recent File 3"; this.mnuRecentFile3.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -416,7 +428,7 @@ private void InitializeComponent() // mnuRecentFile4 // this.mnuRecentFile4.Name = "mnuRecentFile4"; - this.mnuRecentFile4.Size = new System.Drawing.Size(153, 22); + this.mnuRecentFile4.Size = new System.Drawing.Size(144, 22); this.mnuRecentFile4.Tag = 3; this.mnuRecentFile4.Text = "Recent File 4"; this.mnuRecentFile4.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -424,7 +436,7 @@ private void InitializeComponent() // mnuRecentFile5 // this.mnuRecentFile5.Name = "mnuRecentFile5"; - this.mnuRecentFile5.Size = new System.Drawing.Size(153, 22); + this.mnuRecentFile5.Size = new System.Drawing.Size(144, 22); this.mnuRecentFile5.Tag = 4; this.mnuRecentFile5.Text = "Recent File 5"; this.mnuRecentFile5.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -432,21 +444,21 @@ private void InitializeComponent() // mnuSepOpen // this.mnuSepOpen.Name = "mnuSepOpen"; - this.mnuSepOpen.Size = new System.Drawing.Size(164, 6); + this.mnuSepOpen.Size = new System.Drawing.Size(162, 6); // // mnuSave // this.mnuSave.Image = global::NClass.GUI.Properties.Resources.Save; this.mnuSave.Name = "mnuSave"; this.mnuSave.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.mnuSave.Size = new System.Drawing.Size(167, 22); + this.mnuSave.Size = new System.Drawing.Size(165, 22); this.mnuSave.Text = "&Save"; this.mnuSave.Click += new System.EventHandler(this.mnuSave_Click); // // mnuSaveAs // this.mnuSaveAs.Name = "mnuSaveAs"; - this.mnuSaveAs.Size = new System.Drawing.Size(167, 22); + this.mnuSaveAs.Size = new System.Drawing.Size(165, 22); this.mnuSaveAs.Text = "Save &As..."; this.mnuSaveAs.Click += new System.EventHandler(this.mnuSaveAs_Click); // @@ -454,52 +466,52 @@ private void InitializeComponent() // this.mnuSaveAll.Image = global::NClass.GUI.Properties.Resources.SaveAll; this.mnuSaveAll.Name = "mnuSaveAll"; - this.mnuSaveAll.Size = new System.Drawing.Size(167, 22); + this.mnuSaveAll.Size = new System.Drawing.Size(165, 22); this.mnuSaveAll.Text = "Save A&ll Projects"; this.mnuSaveAll.Click += new System.EventHandler(this.mnuSaveAll_Click); // // mnuSepSaveAll // this.mnuSepSaveAll.Name = "mnuSepSaveAll"; - this.mnuSepSaveAll.Size = new System.Drawing.Size(164, 6); + this.mnuSepSaveAll.Size = new System.Drawing.Size(162, 6); // // mnuPrint // this.mnuPrint.Image = global::NClass.GUI.Properties.Resources.Print; this.mnuPrint.Name = "mnuPrint"; this.mnuPrint.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P))); - this.mnuPrint.Size = new System.Drawing.Size(167, 22); + this.mnuPrint.Size = new System.Drawing.Size(165, 22); this.mnuPrint.Text = "&Print..."; this.mnuPrint.Click += new System.EventHandler(this.mnuPrint_Click); // // mnuSepExport // this.mnuSepExport.Name = "mnuSepExport"; - this.mnuSepExport.Size = new System.Drawing.Size(164, 6); + this.mnuSepExport.Size = new System.Drawing.Size(162, 6); // // mnuCloseProject // this.mnuCloseProject.Name = "mnuCloseProject"; - this.mnuCloseProject.Size = new System.Drawing.Size(167, 22); + this.mnuCloseProject.Size = new System.Drawing.Size(165, 22); this.mnuCloseProject.Text = "Close Project"; this.mnuCloseProject.Click += new System.EventHandler(this.mnuCloseProject_Click); // // mnuCloseAllProjects // this.mnuCloseAllProjects.Name = "mnuCloseAllProjects"; - this.mnuCloseAllProjects.Size = new System.Drawing.Size(167, 22); + this.mnuCloseAllProjects.Size = new System.Drawing.Size(165, 22); this.mnuCloseAllProjects.Text = "Close All Projects"; this.mnuCloseAllProjects.Click += new System.EventHandler(this.mnuCloseAllProjects_Click); // // mnuSepClose // this.mnuSepClose.Name = "mnuSepClose"; - this.mnuSepClose.Size = new System.Drawing.Size(164, 6); + this.mnuSepClose.Size = new System.Drawing.Size(162, 6); // // mnuExit // this.mnuExit.Name = "mnuExit"; - this.mnuExit.Size = new System.Drawing.Size(167, 22); + this.mnuExit.Size = new System.Drawing.Size(165, 22); this.mnuExit.Text = "E&xit"; this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click); // @@ -516,19 +528,18 @@ private void InitializeComponent() this.mnuSepDelete, this.mnuSelectAll}); this.mnuEdit.Name = "mnuEdit"; - this.mnuEdit.Size = new System.Drawing.Size(37, 20); + this.mnuEdit.Size = new System.Drawing.Size(39, 20); this.mnuEdit.Text = "&Edit"; - this.mnuEdit.DropDownOpening += new System.EventHandler(this.mnuEdit_DropDownOpening); this.mnuEdit.DropDownClosed += new System.EventHandler(this.mnuEdit_DropDownClosed); + this.mnuEdit.DropDownOpening += new System.EventHandler(this.mnuEdit_DropDownOpening); // // mnuUndo // this.mnuUndo.Image = global::NClass.GUI.Properties.Resources.Undo; this.mnuUndo.Name = "mnuUndo"; this.mnuUndo.ShortcutKeyDisplayString = "Ctrl+Z"; - this.mnuUndo.Size = new System.Drawing.Size(167, 22); + this.mnuUndo.Size = new System.Drawing.Size(164, 22); this.mnuUndo.Text = "&Undo"; - this.mnuUndo.Visible = true; this.mnuUndo.Click += new System.EventHandler(this.mnuUndo_Click); // // mnuRedo @@ -536,7 +547,7 @@ private void InitializeComponent() this.mnuRedo.Image = global::NClass.GUI.Properties.Resources.Redo; this.mnuRedo.Name = "mnuRedo"; this.mnuRedo.ShortcutKeyDisplayString = "Ctrl+Y"; - this.mnuRedo.Size = new System.Drawing.Size(167, 22); + this.mnuRedo.Size = new System.Drawing.Size(164, 22); this.mnuRedo.Text = "&Redo"; this.mnuRedo.Visible = false; this.mnuRedo.Click += new System.EventHandler(this.mnuRedo_Click); @@ -544,7 +555,7 @@ private void InitializeComponent() // mnuSepReso // this.mnuSepReso.Name = "mnuSepReso"; - this.mnuSepReso.Size = new System.Drawing.Size(164, 6); + this.mnuSepReso.Size = new System.Drawing.Size(161, 6); this.mnuSepReso.Visible = false; // // mnuCut @@ -552,7 +563,7 @@ private void InitializeComponent() this.mnuCut.Image = global::NClass.GUI.Properties.Resources.Cut; this.mnuCut.Name = "mnuCut"; this.mnuCut.ShortcutKeyDisplayString = "Ctrl+X"; - this.mnuCut.Size = new System.Drawing.Size(167, 22); + this.mnuCut.Size = new System.Drawing.Size(164, 22); this.mnuCut.Text = "Cu&t"; this.mnuCut.Click += new System.EventHandler(this.mnuCut_Click); // @@ -561,7 +572,7 @@ private void InitializeComponent() this.mnuCopy.Image = global::NClass.GUI.Properties.Resources.Copy; this.mnuCopy.Name = "mnuCopy"; this.mnuCopy.ShortcutKeyDisplayString = "Ctrl+C"; - this.mnuCopy.Size = new System.Drawing.Size(167, 22); + this.mnuCopy.Size = new System.Drawing.Size(164, 22); this.mnuCopy.Text = "&Copy"; this.mnuCopy.Click += new System.EventHandler(this.mnuCopy_Click); // @@ -570,7 +581,7 @@ private void InitializeComponent() this.mnuPaste.Image = global::NClass.GUI.Properties.Resources.Paste; this.mnuPaste.Name = "mnuPaste"; this.mnuPaste.ShortcutKeyDisplayString = "Ctrl+V"; - this.mnuPaste.Size = new System.Drawing.Size(167, 22); + this.mnuPaste.Size = new System.Drawing.Size(164, 22); this.mnuPaste.Text = "&Paste"; this.mnuPaste.Click += new System.EventHandler(this.mnuPaste_Click); // @@ -579,21 +590,21 @@ private void InitializeComponent() this.mnuDelete.Image = global::NClass.GUI.Properties.Resources.Delete; this.mnuDelete.Name = "mnuDelete"; this.mnuDelete.ShortcutKeyDisplayString = "Del"; - this.mnuDelete.Size = new System.Drawing.Size(167, 22); + this.mnuDelete.Size = new System.Drawing.Size(164, 22); this.mnuDelete.Text = "&Delete"; this.mnuDelete.Click += new System.EventHandler(this.mnuDelete_Click); // // mnuSepDelete // this.mnuSepDelete.Name = "mnuSepDelete"; - this.mnuSepDelete.Size = new System.Drawing.Size(164, 6); + this.mnuSepDelete.Size = new System.Drawing.Size(161, 6); // // mnuSelectAll // this.mnuSelectAll.Name = "mnuSelectAll"; this.mnuSelectAll.ShortcutKeyDisplayString = ""; this.mnuSelectAll.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); - this.mnuSelectAll.Size = new System.Drawing.Size(167, 22); + this.mnuSelectAll.Size = new System.Drawing.Size(164, 22); this.mnuSelectAll.Text = "Select &All"; this.mnuSelectAll.Click += new System.EventHandler(this.mnuSelectAll_Click); // @@ -610,7 +621,7 @@ private void InitializeComponent() this.toolStripSeparator3, this.mnuOptions}); this.mnuView.Name = "mnuView"; - this.mnuView.Size = new System.Drawing.Size(41, 20); + this.mnuView.Size = new System.Drawing.Size(44, 20); this.mnuView.Text = "&View"; this.mnuView.DropDownOpening += new System.EventHandler(this.mnuView_DropDownOpening); // @@ -628,66 +639,66 @@ private void InitializeComponent() this.mnuZoom400}); this.mnuZoom.Image = global::NClass.GUI.Properties.Resources.Zoom; this.mnuZoom.Name = "mnuZoom"; - this.mnuZoom.Size = new System.Drawing.Size(177, 22); + this.mnuZoom.Size = new System.Drawing.Size(180, 22); this.mnuZoom.Text = "&Zoom"; // // mnuZoom10 // this.mnuZoom10.Name = "mnuZoom10"; - this.mnuZoom10.Size = new System.Drawing.Size(114, 22); + this.mnuZoom10.Size = new System.Drawing.Size(102, 22); this.mnuZoom10.Text = "10%"; this.mnuZoom10.Click += new System.EventHandler(this.mnuZoom10_Click); // // mnuZoom25 // this.mnuZoom25.Name = "mnuZoom25"; - this.mnuZoom25.Size = new System.Drawing.Size(114, 22); + this.mnuZoom25.Size = new System.Drawing.Size(102, 22); this.mnuZoom25.Text = "25%"; this.mnuZoom25.Click += new System.EventHandler(this.mnuZoom25_Click); // // mnuZoom50 // this.mnuZoom50.Name = "mnuZoom50"; - this.mnuZoom50.Size = new System.Drawing.Size(114, 22); + this.mnuZoom50.Size = new System.Drawing.Size(102, 22); this.mnuZoom50.Text = "50%"; this.mnuZoom50.Click += new System.EventHandler(this.mnuZoom50_Click); // // mnuSep50 // this.mnuSep50.Name = "mnuSep50"; - this.mnuSep50.Size = new System.Drawing.Size(111, 6); + this.mnuSep50.Size = new System.Drawing.Size(99, 6); // // mnuZoom100 // this.mnuZoom100.Image = global::NClass.GUI.Properties.Resources.ActualSize; this.mnuZoom100.Name = "mnuZoom100"; - this.mnuZoom100.Size = new System.Drawing.Size(114, 22); + this.mnuZoom100.Size = new System.Drawing.Size(102, 22); this.mnuZoom100.Text = "100%"; this.mnuZoom100.Click += new System.EventHandler(this.mnuZoom100_Click); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(111, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(99, 6); // // mnuZoom150 // this.mnuZoom150.Name = "mnuZoom150"; - this.mnuZoom150.Size = new System.Drawing.Size(114, 22); + this.mnuZoom150.Size = new System.Drawing.Size(102, 22); this.mnuZoom150.Text = "150%"; this.mnuZoom150.Click += new System.EventHandler(this.mnuZoom150_Click); // // mnuZoom200 // this.mnuZoom200.Name = "mnuZoom200"; - this.mnuZoom200.Size = new System.Drawing.Size(114, 22); + this.mnuZoom200.Size = new System.Drawing.Size(102, 22); this.mnuZoom200.Text = "200%"; this.mnuZoom200.Click += new System.EventHandler(this.mnuZoom200_Click); // // mnuZoom400 // this.mnuZoom400.Name = "mnuZoom400"; - this.mnuZoom400.Size = new System.Drawing.Size(114, 22); + this.mnuZoom400.Size = new System.Drawing.Size(102, 22); this.mnuZoom400.Text = "400%"; this.mnuZoom400.Click += new System.EventHandler(this.mnuZoom400_Click); // @@ -695,14 +706,14 @@ private void InitializeComponent() // this.mnuAutoZoom.Image = global::NClass.GUI.Properties.Resources.AutoZoom; this.mnuAutoZoom.Name = "mnuAutoZoom"; - this.mnuAutoZoom.Size = new System.Drawing.Size(177, 22); + this.mnuAutoZoom.Size = new System.Drawing.Size(180, 22); this.mnuAutoZoom.Text = "&Auto Zoom"; this.mnuAutoZoom.Click += new System.EventHandler(this.mnuAutoZoom_Click); // // mnuSepAutoZoom // this.mnuSepAutoZoom.Name = "mnuSepAutoZoom"; - this.mnuSepAutoZoom.Size = new System.Drawing.Size(174, 6); + this.mnuSepAutoZoom.Size = new System.Drawing.Size(177, 6); // // mnuModelExplorer // @@ -710,7 +721,7 @@ private void InitializeComponent() this.mnuModelExplorer.CheckOnClick = true; this.mnuModelExplorer.CheckState = System.Windows.Forms.CheckState.Checked; this.mnuModelExplorer.Name = "mnuModelExplorer"; - this.mnuModelExplorer.Size = new System.Drawing.Size(177, 22); + this.mnuModelExplorer.Size = new System.Drawing.Size(180, 22); this.mnuModelExplorer.Text = "Model &Explorer"; this.mnuModelExplorer.Click += new System.EventHandler(this.mnuModelExplorer_Click); // @@ -720,39 +731,39 @@ private void InitializeComponent() this.mnuDiagramNavigator.CheckOnClick = true; this.mnuDiagramNavigator.CheckState = System.Windows.Forms.CheckState.Checked; this.mnuDiagramNavigator.Name = "mnuDiagramNavigator"; - this.mnuDiagramNavigator.Size = new System.Drawing.Size(177, 22); + this.mnuDiagramNavigator.Size = new System.Drawing.Size(180, 22); this.mnuDiagramNavigator.Text = "Diagram &Navigator"; this.mnuDiagramNavigator.Click += new System.EventHandler(this.mnuDiagramNavigator_Click); // // mnuSepDiagramNavigator // this.mnuSepDiagramNavigator.Name = "mnuSepDiagramNavigator"; - this.mnuSepDiagramNavigator.Size = new System.Drawing.Size(174, 6); + this.mnuSepDiagramNavigator.Size = new System.Drawing.Size(177, 6); // // mnuCloseAllDocuments // this.mnuCloseAllDocuments.Name = "mnuCloseAllDocuments"; - this.mnuCloseAllDocuments.Size = new System.Drawing.Size(177, 22); + this.mnuCloseAllDocuments.Size = new System.Drawing.Size(180, 22); this.mnuCloseAllDocuments.Text = "&Close All Documens"; this.mnuCloseAllDocuments.Click += new System.EventHandler(this.mnuCloseAllDocuments_Click); // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(174, 6); + this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6); // // mnuOptions // this.mnuOptions.Image = global::NClass.GUI.Properties.Resources.Options; this.mnuOptions.Name = "mnuOptions"; - this.mnuOptions.Size = new System.Drawing.Size(177, 22); + this.mnuOptions.Size = new System.Drawing.Size(180, 22); this.mnuOptions.Text = "&Options..."; this.mnuOptions.Click += new System.EventHandler(this.mnuOptions_Click); // // mnuPlugins // this.mnuPlugins.Name = "mnuPlugins"; - this.mnuPlugins.Size = new System.Drawing.Size(52, 20); + this.mnuPlugins.Size = new System.Drawing.Size(58, 20); this.mnuPlugins.Text = "&Plugins"; this.mnuPlugins.Visible = false; this.mnuPlugins.DropDownOpening += new System.EventHandler(this.mnuPlugins_DropDownOpening); @@ -765,7 +776,7 @@ private void InitializeComponent() this.mnuSepUpdates, this.mnuAbout}); this.mnuHelp.Name = "mnuHelp"; - this.mnuHelp.Size = new System.Drawing.Size(40, 20); + this.mnuHelp.Size = new System.Drawing.Size(44, 20); this.mnuHelp.Text = "&Help"; // // mnuContents @@ -773,7 +784,7 @@ private void InitializeComponent() this.mnuContents.Image = global::NClass.GUI.Properties.Resources.Help; this.mnuContents.Name = "mnuContents"; this.mnuContents.ShortcutKeys = System.Windows.Forms.Keys.F1; - this.mnuContents.Size = new System.Drawing.Size(174, 22); + this.mnuContents.Size = new System.Drawing.Size(171, 22); this.mnuContents.Text = "&Contents"; this.mnuContents.Visible = false; this.mnuContents.Click += new System.EventHandler(this.mnuContents_Click); @@ -782,19 +793,19 @@ private void InitializeComponent() // this.mnuCheckForUpdates.Image = global::NClass.GUI.Properties.Resources.SearchWeb; this.mnuCheckForUpdates.Name = "mnuCheckForUpdates"; - this.mnuCheckForUpdates.Size = new System.Drawing.Size(174, 22); + this.mnuCheckForUpdates.Size = new System.Drawing.Size(171, 22); this.mnuCheckForUpdates.Text = "Check for &Updates"; this.mnuCheckForUpdates.Click += new System.EventHandler(this.mnuCheckForUpdates_Click); // // mnuSepUpdates // this.mnuSepUpdates.Name = "mnuSepUpdates"; - this.mnuSepUpdates.Size = new System.Drawing.Size(171, 6); + this.mnuSepUpdates.Size = new System.Drawing.Size(168, 6); // // mnuAbout // this.mnuAbout.Name = "mnuAbout"; - this.mnuAbout.Size = new System.Drawing.Size(174, 22); + this.mnuAbout.Size = new System.Drawing.Size(171, 22); this.mnuAbout.Text = "&About nERD..."; this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click); // @@ -822,7 +833,7 @@ private void InitializeComponent() this.toolAutoZoom}); this.standardToolStrip.Location = new System.Drawing.Point(3, 24); this.standardToolStrip.Name = "standardToolStrip"; - this.standardToolStrip.Size = new System.Drawing.Size(396, 25); + this.standardToolStrip.Size = new System.Drawing.Size(419, 25); this.standardToolStrip.TabIndex = 1; // // toolNew @@ -832,7 +843,8 @@ private void InitializeComponent() this.toolNewProject, this.toolSepProject, this.toolNewCSharpDiagram, - this.toolNewErdDiagram}); + this.toolNewErdDiagram, + this.toolNewStdDiagram}); this.toolNew.Image = global::NClass.GUI.Properties.Resources.NewDocument; this.toolNew.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolNew.Name = "toolNew"; @@ -843,20 +855,20 @@ private void InitializeComponent() // this.toolNewProject.Image = global::NClass.GUI.Properties.Resources.Project; this.toolNewProject.Name = "toolNewProject"; - this.toolNewProject.Size = new System.Drawing.Size(149, 22); + this.toolNewProject.Size = new System.Drawing.Size(219, 22); this.toolNewProject.Text = "Project"; this.toolNewProject.Click += new System.EventHandler(this.mnuNewProject_Click); // // toolSepProject // this.toolSepProject.Name = "toolSepProject"; - this.toolSepProject.Size = new System.Drawing.Size(146, 6); + this.toolSepProject.Size = new System.Drawing.Size(216, 6); // // toolNewCSharpDiagram // this.toolNewCSharpDiagram.Enabled = false; this.toolNewCSharpDiagram.Name = "toolNewCSharpDiagram"; - this.toolNewCSharpDiagram.Size = new System.Drawing.Size(149, 22); + this.toolNewCSharpDiagram.Size = new System.Drawing.Size(219, 22); this.toolNewCSharpDiagram.Text = "C# diagram"; this.toolNewCSharpDiagram.Click += new System.EventHandler(this.mnuNewCSharpDiagram_Click); // @@ -864,10 +876,18 @@ private void InitializeComponent() // this.toolNewErdDiagram.Enabled = false; this.toolNewErdDiagram.Name = "toolNewErdDiagram"; - this.toolNewErdDiagram.Size = new System.Drawing.Size(149, 22); + this.toolNewErdDiagram.Size = new System.Drawing.Size(219, 22); this.toolNewErdDiagram.Text = "Entity Relationship diagram"; this.toolNewErdDiagram.Click += new System.EventHandler(this.mnuNewErdDiagram_Click); // + // toolNewStdDiagram + // + this.toolNewStdDiagram.Enabled = false; + this.toolNewStdDiagram.Name = "toolNewStdDiagram"; + this.toolNewStdDiagram.Size = new System.Drawing.Size(219, 22); + this.toolNewStdDiagram.Text = "State Transition diagram"; + this.toolNewStdDiagram.Click += new System.EventHandler(this.mnuNewStdDiagram_Click); + // // toolOpen // this.toolOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -887,7 +907,7 @@ private void InitializeComponent() // toolRecentFile1 // this.toolRecentFile1.Name = "toolRecentFile1"; - this.toolRecentFile1.Size = new System.Drawing.Size(145, 22); + this.toolRecentFile1.Size = new System.Drawing.Size(138, 22); this.toolRecentFile1.Tag = 0; this.toolRecentFile1.Text = "Recent file 1"; this.toolRecentFile1.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -895,7 +915,7 @@ private void InitializeComponent() // toolRecentFile2 // this.toolRecentFile2.Name = "toolRecentFile2"; - this.toolRecentFile2.Size = new System.Drawing.Size(145, 22); + this.toolRecentFile2.Size = new System.Drawing.Size(138, 22); this.toolRecentFile2.Tag = 1; this.toolRecentFile2.Text = "Recent file 2"; this.toolRecentFile2.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -903,7 +923,7 @@ private void InitializeComponent() // toolRecentFile3 // this.toolRecentFile3.Name = "toolRecentFile3"; - this.toolRecentFile3.Size = new System.Drawing.Size(145, 22); + this.toolRecentFile3.Size = new System.Drawing.Size(138, 22); this.toolRecentFile3.Tag = 2; this.toolRecentFile3.Text = "Recent file 3"; this.toolRecentFile3.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -911,7 +931,7 @@ private void InitializeComponent() // toolRecentFile4 // this.toolRecentFile4.Name = "toolRecentFile4"; - this.toolRecentFile4.Size = new System.Drawing.Size(145, 22); + this.toolRecentFile4.Size = new System.Drawing.Size(138, 22); this.toolRecentFile4.Tag = 3; this.toolRecentFile4.Text = "Recent file 4"; this.toolRecentFile4.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -919,7 +939,7 @@ private void InitializeComponent() // toolRecentFile5 // this.toolRecentFile5.Name = "toolRecentFile5"; - this.toolRecentFile5.Size = new System.Drawing.Size(145, 22); + this.toolRecentFile5.Size = new System.Drawing.Size(138, 22); this.toolRecentFile5.Tag = 4; this.toolRecentFile5.Text = "Recent file 5"; this.toolRecentFile5.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -992,7 +1012,6 @@ private void InitializeComponent() this.toolUndo.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolUndo.Name = "toolUndo"; this.toolUndo.Size = new System.Drawing.Size(23, 22); - this.toolUndo.Visible = true; this.toolUndo.Click += new System.EventHandler(this.toolUndo_Click); // // toolRedo @@ -1062,7 +1081,7 @@ private void InitializeComponent() this.AllowDrop = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(892, 666); + this.ClientSize = new System.Drawing.Size(892, 647); this.Controls.Add(this.toolStripContainer); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.KeyPreview = true; @@ -1074,8 +1093,8 @@ private void InitializeComponent() this.Load += new System.EventHandler(this.MainForm_Load); this.DragDrop += new System.Windows.Forms.DragEventHandler(this.MainForm_DragDrop); this.DragEnter += new System.Windows.Forms.DragEventHandler(this.MainForm_DragEnter); - this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyUp); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown); + this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyUp); this.toolStripContainer.BottomToolStripPanel.ResumeLayout(false); this.toolStripContainer.BottomToolStripPanel.PerformLayout(); this.toolStripContainer.ContentPanel.ResumeLayout(false); @@ -1087,9 +1106,11 @@ private void InitializeComponent() this.statusStrip.PerformLayout(); this.windowClient.Panel1.ResumeLayout(false); this.windowClient.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.windowClient)).EndInit(); this.windowClient.ResumeLayout(false); this.toolsPanel.Panel1.ResumeLayout(false); this.toolsPanel.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.toolsPanel)).EndInit(); this.toolsPanel.ResumeLayout(false); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); @@ -1109,6 +1130,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem mnuNew; private System.Windows.Forms.ToolStripMenuItem mnuNewCSharpDiagram; private System.Windows.Forms.ToolStripMenuItem mnuNewErdDiagram; + private System.Windows.Forms.ToolStripMenuItem mnuNewStdDiagram; private System.Windows.Forms.ToolStripMenuItem mnuOpen; private System.Windows.Forms.ToolStripMenuItem mnuOpenFile; private System.Windows.Forms.ToolStripSeparator sepOpenFile; @@ -1180,6 +1202,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripSeparator toolSepProject; private System.Windows.Forms.ToolStripMenuItem toolNewCSharpDiagram; private System.Windows.Forms.ToolStripMenuItem toolNewErdDiagram; + private System.Windows.Forms.ToolStripMenuItem toolNewStdDiagram; private System.Windows.Forms.ToolStripSeparator mnuSepClose; private System.Windows.Forms.ToolStripMenuItem mnuCloseProject; private System.Windows.Forms.ToolStripMenuItem mnuCloseAllProjects; diff --git a/src/GUI/MainForm.cs b/src/GUI/MainForm.cs index bd39716..4c566c1 100644 --- a/src/GUI/MainForm.cs +++ b/src/GUI/MainForm.cs @@ -19,6 +19,7 @@ using NClass.DiagramEditor.ClassDiagram; using NClass.EntityRelationshipDiagram; using NClass.GUI.Dialogs; +using NClass.StateTransitionDiagram; using NClass.Translations; using System; using System.Collections.Generic; @@ -239,6 +240,7 @@ private void UpdateTexts() mnuNewProject.Text = Strings.MenuProject; mnuNewCSharpDiagram.Text = Strings.MenuCSharpDiagram; mnuNewErdDiagram.Text = Strings.MenuErdDiagram; + mnuNewStdDiagram.Text = Strings.MenuStdDiagram; mnuOpen.Text = Strings.MenuOpen; mnuOpenFile.Text = Strings.MenuOpenFile; mnuSave.Text = Strings.MenuSave; @@ -280,6 +282,7 @@ private void UpdateTexts() // Toolbar toolNewCSharpDiagram.Text = Strings.MenuCSharpDiagram; toolNewErdDiagram.Text = Strings.MenuErdDiagram; + toolNewStdDiagram.Text = Strings.MenuStdDiagram; toolSave.Text = Strings.Save; toolPrint.Text = Strings.Print; toolCut.Text = Strings.Cut; @@ -571,6 +574,17 @@ private void mnuNewErdDiagram_Click(object sender, EventArgs e) } } + private void mnuNewStdDiagram_Click(object sender, EventArgs e) + { + if (Workspace.Default.HasActiveProject) + { + ShowModelExplorer = true; + Diagram diagram = new Diagram(StdLanguage.Instance); + Workspace.Default.ActiveProject.Add(diagram); + Settings.Default.DefaultLanguageName = StdLanguage.Instance.AssemblyName; + } + } + private void mnuOpenFile_Click(object sender, EventArgs e) { Workspace.Default.OpenProject(); diff --git a/src/GUI/ModelExplorer/DiagramNode.cs b/src/GUI/ModelExplorer/DiagramNode.cs index 1af6669..28ece91 100644 --- a/src/GUI/ModelExplorer/DiagramNode.cs +++ b/src/GUI/ModelExplorer/DiagramNode.cs @@ -137,6 +137,11 @@ private static string KeyFromLanguage(Language language) return "erd"; } + if (language is StateTransitionDiagram.StdLanguage) + { + return "std"; + } + return "diagram"; } } diff --git a/src/GUI/ModelExplorer/ModelView.Designer.cs b/src/GUI/ModelExplorer/ModelView.Designer.cs index bf5ff26..83b8fd7 100644 --- a/src/GUI/ModelExplorer/ModelView.Designer.cs +++ b/src/GUI/ModelExplorer/ModelView.Designer.cs @@ -73,14 +73,14 @@ private void InitializeComponent() this.mnuSaveAll, this.mnuCloseAll}); this.contextMenu.Name = "contextMenu"; - this.contextMenu.Size = new System.Drawing.Size(228, 138); + this.contextMenu.Size = new System.Drawing.Size(174, 130); this.contextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenu_Opening); // // mnuNewProject // this.mnuNewProject.Image = global::NClass.GUI.Properties.Resources.Project; this.mnuNewProject.Name = "mnuNewProject"; - this.mnuNewProject.Size = new System.Drawing.Size(227, 32); + this.mnuNewProject.Size = new System.Drawing.Size(173, 30); this.mnuNewProject.Text = "&New Project"; this.mnuNewProject.Click += new System.EventHandler(this.mnuNewProject_Click); // @@ -96,7 +96,7 @@ private void InitializeComponent() this.mnuRecentFile5}); this.mnuOpen.Image = global::NClass.GUI.Properties.Resources.Open; this.mnuOpen.Name = "mnuOpen"; - this.mnuOpen.Size = new System.Drawing.Size(227, 32); + this.mnuOpen.Size = new System.Drawing.Size(173, 30); this.mnuOpen.Text = "&Open"; this.mnuOpen.DropDownOpening += new System.EventHandler(this.mnuOpen_DropDownOpening); // @@ -104,19 +104,19 @@ private void InitializeComponent() // this.mnuOpenFile.Name = "mnuOpenFile"; this.mnuOpenFile.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.mnuOpenFile.Size = new System.Drawing.Size(257, 34); + this.mnuOpenFile.Size = new System.Drawing.Size(171, 22); this.mnuOpenFile.Text = "&New File..."; this.mnuOpenFile.Click += new System.EventHandler(this.mnuOpenFile_Click); // // mnuSepOpenFile // this.mnuSepOpenFile.Name = "mnuSepOpenFile"; - this.mnuSepOpenFile.Size = new System.Drawing.Size(254, 6); + this.mnuSepOpenFile.Size = new System.Drawing.Size(168, 6); // // mnuRecentFile1 // this.mnuRecentFile1.Name = "mnuRecentFile1"; - this.mnuRecentFile1.Size = new System.Drawing.Size(257, 34); + this.mnuRecentFile1.Size = new System.Drawing.Size(171, 22); this.mnuRecentFile1.Tag = 0; this.mnuRecentFile1.Text = "Recent File 1"; this.mnuRecentFile1.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -124,7 +124,7 @@ private void InitializeComponent() // mnuRecentFile2 // this.mnuRecentFile2.Name = "mnuRecentFile2"; - this.mnuRecentFile2.Size = new System.Drawing.Size(257, 34); + this.mnuRecentFile2.Size = new System.Drawing.Size(171, 22); this.mnuRecentFile2.Tag = 1; this.mnuRecentFile2.Text = "Recent File 2"; this.mnuRecentFile2.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -132,7 +132,7 @@ private void InitializeComponent() // mnuRecentFile3 // this.mnuRecentFile3.Name = "mnuRecentFile3"; - this.mnuRecentFile3.Size = new System.Drawing.Size(257, 34); + this.mnuRecentFile3.Size = new System.Drawing.Size(171, 22); this.mnuRecentFile3.Tag = 2; this.mnuRecentFile3.Text = "Recent File 3"; this.mnuRecentFile3.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -140,7 +140,7 @@ private void InitializeComponent() // mnuRecentFile4 // this.mnuRecentFile4.Name = "mnuRecentFile4"; - this.mnuRecentFile4.Size = new System.Drawing.Size(257, 34); + this.mnuRecentFile4.Size = new System.Drawing.Size(171, 22); this.mnuRecentFile4.Tag = 3; this.mnuRecentFile4.Text = "Recent File 4"; this.mnuRecentFile4.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -148,7 +148,7 @@ private void InitializeComponent() // mnuRecentFile5 // this.mnuRecentFile5.Name = "mnuRecentFile5"; - this.mnuRecentFile5.Size = new System.Drawing.Size(257, 34); + this.mnuRecentFile5.Size = new System.Drawing.Size(171, 22); this.mnuRecentFile5.Tag = 4; this.mnuRecentFile5.Text = "Recent File 5"; this.mnuRecentFile5.Click += new System.EventHandler(this.OpenRecentFile_Click); @@ -156,20 +156,20 @@ private void InitializeComponent() // mnuSepOpen // this.mnuSepOpen.Name = "mnuSepOpen"; - this.mnuSepOpen.Size = new System.Drawing.Size(224, 6); + this.mnuSepOpen.Size = new System.Drawing.Size(170, 6); // // mnuSaveAll // this.mnuSaveAll.Image = global::NClass.GUI.Properties.Resources.SaveAll; this.mnuSaveAll.Name = "mnuSaveAll"; - this.mnuSaveAll.Size = new System.Drawing.Size(227, 32); + this.mnuSaveAll.Size = new System.Drawing.Size(173, 30); this.mnuSaveAll.Text = "Save A&ll Projects"; this.mnuSaveAll.Click += new System.EventHandler(this.mnuSaveAll_Click); // // mnuCloseAll // this.mnuCloseAll.Name = "mnuCloseAll"; - this.mnuCloseAll.Size = new System.Drawing.Size(227, 32); + this.mnuCloseAll.Size = new System.Drawing.Size(173, 30); this.mnuCloseAll.Text = "Close All Projects"; this.mnuCloseAll.Click += new System.EventHandler(this.mnuCloseAll_Click); // @@ -180,6 +180,7 @@ private void InitializeComponent() this.imageList.Images.SetKeyName(0, "project"); this.imageList.Images.SetKeyName(1, "diagram"); this.imageList.Images.SetKeyName(2, "erd"); + this.imageList.Images.SetKeyName(3, "std"); // // lblAddProject // diff --git a/src/GUI/ModelExplorer/ModelView.resx b/src/GUI/ModelExplorer/ModelView.resx index 1c4ca6b..3d136c8 100644 --- a/src/GUI/ModelExplorer/ModelView.resx +++ b/src/GUI/ModelExplorer/ModelView.resx @@ -118,66 +118,75 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 17, 65 + 17, 56 - 17, 113 + 17, 95 AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACS - CwAAAk1TRnQBSQFMAgEBAwEAARQBAAEUAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA - AwABEAMAAQEBAAEgBgABEFIAgP9IAAG3AaIBkwH/A4EB/wOBAf8DgQH/A4EB/wOBAf8DgQH/A4EB/xgA - BP8BpAGKAYEB/wOBAf8DgQH/A4EB/wOBAf8DgQH/A4EB/wOBAf8DgQH/A4EB/wOBAf8DgQH/A4FJ/0gA - AbcBogGTAf8B9QHeAdMB/wHdAdAByQH/AdoBzAHEAf8B1wHHAb8B/wHUAcMBugH/AdEBvwG1Af8DgQH/ - GAAE/wGkAYoBgQH/A/gB/wPeAf8D2wH/A9cB/wPVAf8D0QH/A84B/wPLAf8DxgH/A8MB/wPAAf8DgUn/ - QAABtwGiAZMB/wOBAf8BtwGiAZMB/wH3AeQB2wH/AeoBmwGBAf8B6gGVAYEB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/ProjectNode.cs b/src/GUI/ModelExplorer/ProjectNode.cs index 343a8d4..0ea8004 100644 --- a/src/GUI/ModelExplorer/ProjectNode.cs +++ b/src/GUI/ModelExplorer/ProjectNode.cs @@ -19,6 +19,7 @@ using NClass.DiagramEditor.ClassDiagram; using NClass.EntityRelationshipDiagram; using NClass.GUI.Properties; +using NClass.StateTransitionDiagram; using NClass.Translations; using System; using System.Windows.Forms; @@ -34,7 +35,8 @@ static ProjectNode() _contextMenu.Items.AddRange(new ToolStripItem[] { new ToolStripMenuItem(Strings.MenuAddNew, Resources.NewDocument, new ToolStripMenuItem(Strings.MenuCSharpDiagram, null, newCSharpDiagram_Click), - new ToolStripMenuItem(Strings.MenuErdDiagram, null, newErdDiagram_Click) + new ToolStripMenuItem(Strings.MenuErdDiagram, null, newErdDiagram_Click), + new ToolStripMenuItem(Strings.MenuStdDiagram, null, newStdDiagram_Click) ), new ToolStripSeparator(), new ToolStripMenuItem(Strings.MenuSave, Resources.Save, save_Click), @@ -188,6 +190,16 @@ private static void newErdDiagram_Click(object sender, EventArgs e) project.Add(diagram); } + private static void newStdDiagram_Click(object sender, EventArgs e) + { + ToolStripItem menuItem = (ToolStripItem)sender; + Project project = ((ProjectNode)menuItem.OwnerItem.Owner.Tag).Project; + + Diagram diagram = new Diagram(StdLanguage.Instance); + Settings.Default.DefaultLanguageName = StdLanguage.Instance.AssemblyName; + project.Add(diagram); + } + private static void rename_Click(object sender, EventArgs e) { ToolStripItem menuItem = (ToolStripItem)sender; diff --git a/src/StateTransitionDiagram/Properties/AssemblyInfo.cs b/src/StateTransitionDiagram/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4896926 --- /dev/null +++ b/src/StateTransitionDiagram/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("StateTransitionDiagram")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("StateTransitionDiagram")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("484172f2-cef2-42f2-b397-1ec73db90bbe")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/StateTransitionDiagram/StateTransitionDiagram.csproj b/src/StateTransitionDiagram/StateTransitionDiagram.csproj new file mode 100644 index 0000000..915f905 --- /dev/null +++ b/src/StateTransitionDiagram/StateTransitionDiagram.csproj @@ -0,0 +1,55 @@ + + + + + Debug + AnyCPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE} + Library + Properties + NClass.StateTransitionDiagram + NClass.StateTransitionDiagram + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + {8cf10505-3c2e-4e45-ab90-21613237b412} + Core + + + + \ No newline at end of file diff --git a/src/StateTransitionDiagram/StdClass.cs b/src/StateTransitionDiagram/StdClass.cs new file mode 100644 index 0000000..4abb9a6 --- /dev/null +++ b/src/StateTransitionDiagram/StdClass.cs @@ -0,0 +1,98 @@ +// NClass - Free class diagram editor +// Copyright (C) 2006-2009 Balazs Tihanyi +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +using NClass.Core; +using System; +using System.Text; + +namespace NClass.StateTransitionDiagram +{ + public sealed class StdClass : ClassType + { + public StdClass() : + this("NewClass") + { + } + + internal StdClass(string name) : + base(name) + { + } + + public override AccessModifier DefaultAccess => AccessModifier.Internal; + public override AccessModifier DefaultMemberAccess => AccessModifier.Private; + + public override bool SupportsProperties => false; + public override bool SupportsEvents => false; + public override bool SupportsDestructors => false; + public override bool SupportsNesting => false; + public override bool SupportsConstuctors => false; + public override bool SupportsMethods => false; + public override bool SupportsFields => false; + + public override Language Language => StdLanguage.Instance; + + public override void AddInterface(InterfaceType interfaceType) => throw new NotImplementedException(); + public override Field AddField() => throw new NotImplementedException(); + public override Constructor AddConstructor() => throw new NotImplementedException(); + public override Destructor AddDestructor() => throw new NotImplementedException(); + public override Method AddMethod() => throw new NotImplementedException(); + public override Property AddProperty() => throw new NotImplementedException(); + public override Event AddEvent() => throw new NotImplementedException(); + + public override string GetDeclaration() + { + var builder = new StringBuilder(); + + if (AccessModifier != AccessModifier.Default) + { + builder.Append(Language.GetAccessString(AccessModifier, true)); + builder.Append(" "); + } + if (Modifier != ClassModifier.None) + { + builder.Append(Language.GetClassModifierString(Modifier, true)); + builder.Append(" "); + } + builder.AppendFormat("class {0}", Name); + + if (HasExplicitBase || InterfaceList.Count > 0) + { + builder.Append(" : "); + if (HasExplicitBase) + { + builder.Append(BaseClass.Name); + if (InterfaceList.Count > 0) + builder.Append(", "); + } + for (int i = 0; i < InterfaceList.Count; i++) + { + builder.Append(InterfaceList[i].Name); + if (i < InterfaceList.Count - 1) + builder.Append(", "); + } + } + + return builder.ToString(); + } + + public override ClassType Clone() + { + var newClass = new StdClass(); + newClass.CopyFrom(this); + return newClass; + } + } +} diff --git a/src/StateTransitionDiagram/StdLanguage.cs b/src/StateTransitionDiagram/StdLanguage.cs new file mode 100644 index 0000000..c574b9f --- /dev/null +++ b/src/StateTransitionDiagram/StdLanguage.cs @@ -0,0 +1,72 @@ +// NClass - Free class diagram editor +// Copyright (C) 2006-2009 Balazs Tihanyi +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +using NClass.Core; +using System; +using System.Collections.Generic; + +namespace NClass.StateTransitionDiagram +{ + public sealed class StdLanguage : Language + { + private StdLanguage() + { + } + + public static StdLanguage Instance { get; } = new StdLanguage(); + public override string Name => "State Transition Diagram"; + public override string AssemblyName => "StateTransitionDiagram"; + + public override Dictionary ValidAccessModifiers => throw new NotImplementedException(); + public override Dictionary ValidClassModifiers => throw new NotImplementedException(); + public override Dictionary ValidFieldModifiers => throw new NotImplementedException(); + public override Dictionary ValidOperationModifiers => throw new NotImplementedException(); + + public override bool SupportsAssemblyImport => false; + public override bool SupportsInterfaces => false; + public override bool SupportsStructures => false; + public override bool SupportsEnums => false; + public override bool SupportsDelegates => false; + public override bool SupportsExplicitImplementation => false; + public override bool SupportsStates => true; + public override bool ExplicitVirtualMethods => false; + public override string DefaultFileExtension => "*.std"; + + protected override string[] ReservedNames => throw new NotImplementedException(); + protected override string[] TypeKeywords => throw new NotImplementedException(); + public override string GetAccessString(AccessModifier access, bool forCode) => throw new NotImplementedException(); + public override string GetClassModifierString(ClassModifier modifier, bool forCode) => throw new NotImplementedException(); + public override string GetFieldModifierString(FieldModifier modifier, bool forCode) => throw new NotImplementedException(); + public override string GetOperationModifierString(OperationModifier modifier, bool forCode) => throw new NotImplementedException(); + public override bool IsValidModifier(FieldModifier modifier) => throw new NotImplementedException(); + public override bool IsValidModifier(OperationModifier modifier) => throw new NotImplementedException(); + public override bool IsValidModifier(AccessModifier modifier) => throw new NotImplementedException(); + + protected override ClassType CreateClass() + { + return new StdClass(); + } + + protected override DelegateType CreateDelegate() => throw new NotImplementedException(); + protected override EnumType CreateEnum() => throw new NotImplementedException(); + protected override InterfaceType CreateInterface() => throw new NotImplementedException(); + protected override ArgumentList CreateParameterCollection() => throw new NotImplementedException(); + protected override StructureType CreateStructure() => throw new NotImplementedException(); + protected override Operation Implement(Operation operation, CompositeType newParent, bool explicitly) => throw new NotImplementedException(); + protected override Operation Override(Operation operation, CompositeType newParent) => throw new NotImplementedException(); + protected override void ValidateField(Field field) => throw new NotImplementedException(); + protected override void ValidateOperation(Operation operation) => throw new NotImplementedException(); + } +} diff --git a/src/Translations/Strings.Designer.cs b/src/Translations/Strings.Designer.cs index 61ca33a..d806ae2 100644 --- a/src/Translations/Strings.Designer.cs +++ b/src/Translations/Strings.Designer.cs @@ -2349,6 +2349,15 @@ public static string MenuState { } } + /// + /// Looks up a localized string similar to State Transition Diagram. + /// + public static string MenuStdDiagram { + get { + return ResourceManager.GetString("MenuStdDiagram", resourceCulture); + } + } + /// /// Looks up a localized string similar to &Structure. /// @@ -3001,7 +3010,7 @@ public static string TranslationUpdated { } /// - /// Looks up a localized string similar to 2019-08-05. + /// Looks up a localized string similar to 2019-12-28. /// public static string TranslationVersion { get { diff --git a/src/Translations/Strings.resx b/src/Translations/Strings.resx index 943d437..fdd3ff4 100644 --- a/src/Translations/Strings.resx +++ b/src/Translations/Strings.resx @@ -831,7 +831,7 @@ &Structure - 2019-08-05 + 2019-12-28 #It's needed for version controlling, don't translate it @@ -1209,4 +1209,7 @@ Do you still want to continue? unsupported .NET types + + State Transition Diagram + \ No newline at end of file diff --git a/src/nERD.sln b/src/nERD.sln index 28c1f8f..41c5766 100644 --- a/src/nERD.sln +++ b/src/nERD.sln @@ -28,6 +28,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EpForceDirectedGraph.cs", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntityRelationshipDiagram", "EntityRelationshipDiagram\EntityRelationshipDiagram.csproj", "{722F4F78-E7CA-41C5-908A-707C0226486B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StateTransitionDiagram", "StateTransitionDiagram\StateTransitionDiagram.csproj", "{484172F2-CEF2-42F2-B397-1EC73DB90BBE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -154,6 +156,18 @@ Global {722F4F78-E7CA-41C5-908A-707C0226486B}.Release|Mixed Platforms.Build.0 = Release|Any CPU {722F4F78-E7CA-41C5-908A-707C0226486B}.Release|x86.ActiveCfg = Release|Any CPU {722F4F78-E7CA-41C5-908A-707C0226486B}.Release|x86.Build.0 = Release|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Debug|x86.ActiveCfg = Debug|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Debug|x86.Build.0 = Debug|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Release|Any CPU.Build.0 = Release|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Release|x86.ActiveCfg = Release|Any CPU + {484172F2-CEF2-42F2-B397-1EC73DB90BBE}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE