Implement SaveProject (a little bit at least) and assign unique Project ID when created

This commit is contained in:
Michael Becker 2014-06-09 16:05:36 -04:00
parent 041aadfa0b
commit a206947150

View File

@ -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()
{