mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-12 18:39:45 +00:00
Shutdown in Viewer mode on Exception.
This commit is contained in:
@@ -30,7 +30,7 @@ namespace QuickLook
|
||||
BlurWindow.EnableWindowBlur(this);
|
||||
};
|
||||
|
||||
buttonCloseWindow.MouseLeftButtonUp += (sender, e) => Hide();
|
||||
buttonCloseWindow.MouseLeftButtonUp += (sender, e) => BeginHide(true);
|
||||
}
|
||||
|
||||
public ContextObject ContextObject { get; private set; }
|
||||
@@ -85,9 +85,6 @@ namespace QuickLook
|
||||
|
||||
private new void Hide()
|
||||
{
|
||||
if (App.RunningAsViewer)
|
||||
Application.Current.Shutdown();
|
||||
|
||||
UnloadPlugin();
|
||||
ContextObject.Reset();
|
||||
|
||||
@@ -131,8 +128,14 @@ namespace QuickLook
|
||||
throw thrown;
|
||||
}
|
||||
|
||||
internal bool BeginHide()
|
||||
internal bool BeginHide(bool quit = false)
|
||||
{
|
||||
if (quit && App.RunningAsViewer)
|
||||
{
|
||||
Application.Current.Shutdown();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Visibility != Visibility.Visible)
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user