Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add exit option to "solution/project changed" message

  • Loading branch information...
commit a89b6737416a272fa5200e550e913bef25ac536e 1 parent 7af6e0b
@siegfriedpammer siegfriedpammer authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/Main/Base/Project/Src/Project/ProjectChangeWatcher.cs
View
9 src/Main/Base/Project/Src/Project/ProjectChangeWatcher.cs
@@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.IO;
using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop.Commands;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.SharpDevelop.Project
@@ -120,8 +121,12 @@ static void MainFormActivated(object sender, EventArgs e)
if (wasChangedExternally) {
wasChangedExternally = false;
- if (ProjectService.OpenSolution != null && MessageService.ShowCustomDialog(MessageService.DefaultMessageBoxTitle, "${res:ICSharpCode.SharpDevelop.Project.SolutionAlteredExternallyMessage}", 0, 1, "${res:ICSharpCode.SharpDevelop.Project.ReloadSolution}", "${res:ICSharpCode.SharpDevelop.Project.KeepOldSolution}") == 0) {
- ProjectService.LoadSolution(ProjectService.OpenSolution.FileName);
+ if (ProjectService.OpenSolution != null) {
+ int result = MessageService.ShowCustomDialog(MessageService.DefaultMessageBoxTitle, "${res:ICSharpCode.SharpDevelop.Project.SolutionAlteredExternallyMessage}", 0, 1, "${res:ICSharpCode.SharpDevelop.Project.ReloadSolution}", "${res:ICSharpCode.SharpDevelop.Project.KeepOldSolution}", "${res:ICSharpCode.SharpDevelop.ExceptionBox.ExitSharpDevelop}");
+ if (result == 0)
+ ProjectService.LoadSolution(ProjectService.OpenSolution.FileName);
+ else if (result == 2)
+ new ExitWorkbenchCommand().Run();
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.