From a206947150315e9202c553eda26e7e41dce5c497 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Mon, 9 Jun 2014 16:05:36 -0400 Subject: [PATCH] Implement SaveProject (a little bit at least) and assign unique Project ID when created --- .../MainWindow.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs index c790a253..57ae7430 100644 --- a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs +++ b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs @@ -590,6 +590,7 @@ namespace UniversalEditor.UserInterface.WindowsForms } Project project = pjt.Create(); + project.ID = Guid.NewGuid(); project.Title = dlg.ProjectTitle; solution.Projects.Add(project); @@ -949,7 +950,7 @@ namespace UniversalEditor.UserInterface.WindowsForms public void SaveProject() { - MessageBox.Show("Not implemented", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + SaveProjectAs(); } public void SaveProjectAs() { @@ -963,7 +964,10 @@ namespace UniversalEditor.UserInterface.WindowsForms } public void SaveProjectAs(string FileName) { - MessageBox.Show("Not implemented", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + if (CurrentSolution != null) + { + Document.Save(CurrentSolution, new DataFormats.Solution.Microsoft.VisualStudio.VisualStudioSolutionDataFormat(), new FileAccessor(FileName, true, true), true); + } } public void SaveAll() {