mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-02 19:04:36 +00:00
Compare commits
2 Commits
2e941f468e
...
3ae4eeb26d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3ae4eeb26d | ||
![]() |
da0033b52a |
@@ -210,9 +210,7 @@ public partial class App : Application
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize MessageBox patching
|
||||
bool modernMessageBox = SettingHelper.Get("ModernMessageBox", true, "QuickLook");
|
||||
if (modernMessageBox) MessageBoxPatcher.Initialize();
|
||||
base.OnStartup(e);
|
||||
|
||||
// Set initial theme based on system settings
|
||||
ThemeManager.Apply(OSThemeHelper.AppsUseDarkTheme() ? ApplicationTheme.Dark : ApplicationTheme.Light);
|
||||
@@ -220,17 +218,16 @@ public partial class App : Application
|
||||
ThemeManager.Apply(OSThemeHelper.AppsUseDarkTheme() ? ApplicationTheme.Dark : ApplicationTheme.Light);
|
||||
UxTheme.ApplyPreferredAppMode();
|
||||
|
||||
// Initialize TrayIcon
|
||||
_ = TrayIconManager.GetInstance();
|
||||
|
||||
base.OnStartup(e);
|
||||
// Initialize MessageBox patching
|
||||
bool modernMessageBox = SettingHelper.Get("ModernMessageBox", true, "QuickLook");
|
||||
if (modernMessageBox) MessageBoxPatcher.Initialize();
|
||||
}
|
||||
|
||||
private void Application_Startup(object sender, StartupEventArgs e)
|
||||
{
|
||||
if (!EnsureOSVersion()
|
||||
|| !EnsureFirstInstance(e.Args)
|
||||
|| !EnsureFolderWritable(SettingHelper.LocalDataPath))
|
||||
|| !EnsureFirstInstance(e.Args)
|
||||
|| !EnsureFolderWritable(SettingHelper.LocalDataPath))
|
||||
{
|
||||
_cleanExit = false;
|
||||
Shutdown();
|
||||
@@ -325,8 +322,10 @@ public partial class App : Application
|
||||
}
|
||||
// Second instance: duplicate
|
||||
else
|
||||
{
|
||||
MessageBox.Show(TranslationHelper.Get("APP_SECOND_TEXT"), TranslationHelper.Get("APP_SECOND"),
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
1
QuickLook/GlobalUsing.cs
Normal file
1
QuickLook/GlobalUsing.cs
Normal file
@@ -0,0 +1 @@
|
||||
global using MessageBox = Wpf.Ui.Violeta.Controls.MessageBox;
|
Reference in New Issue
Block a user