Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
Adds some handlers and project creation state toggles in ProjectOpera…
Browse files Browse the repository at this point in the history
…tions

Fixes VSTS #984930 - Get to code can be re-entered during new project flow
  • Loading branch information
netonjm committed Jan 10, 2020
1 parent 392e5dc commit 1060a60
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ public partial class ProjectOperations: Service
RootWorkspace workspace;

SelectReferenceDialog selDialog = null;


public event EventHandler BeforeCreateNewSolution;
public event EventHandler AfterCreateNewSolution;
public bool IsCreatingNewSolution { get; private set; }

internal ProjectOperations ()
{
}
Expand Down Expand Up @@ -749,8 +753,17 @@ public async Task<bool> NewSolution (string defaultTemplate, bool showTemplateSe
newProjectDialog.ShowTemplateSelection = showTemplateSelection;
var show = newProjectDialog.Show ();
if (show) {
WelcomePage.WelcomePageService.HideWelcomePageOrWindow ();
return await newProjectDialog.ProjectCreation;
try {
IsCreatingNewSolution = true;
BeforeCreateNewSolution?.Invoke (this, EventArgs.Empty);

WelcomePage.WelcomePageService.HideWelcomePageOrWindow ();
var isProjectCreated = await newProjectDialog.ProjectCreation;
return isProjectCreated;
} finally {
IsCreatingNewSolution = false;
AfterCreateNewSolution?.Invoke (this, EventArgs.Empty);
}
}
return false;
}
Expand Down

0 comments on commit 1060a60

Please sign in to comment.