|
6 | 6 | using Hi3Helper.Http.Legacy; |
7 | 7 | using Hi3Helper.SentryHelper; |
8 | 8 | using Hi3Helper.Shared.ClassStruct; |
9 | | -using Hi3Helper.Win32.ManagedTools; |
10 | 9 | using Hi3Helper.Win32.Native.LibraryImport; |
11 | 10 | using Hi3Helper.Win32.Native.ManagedTools; |
12 | 11 | using InnoSetupHelper; |
13 | 12 | using Microsoft.UI.Dispatching; |
14 | 13 | using Microsoft.UI.Xaml; |
15 | | -using Microsoft.Win32; |
16 | 14 | using System; |
17 | 15 | using System.Diagnostics; |
18 | 16 | using System.Globalization; |
|
27 | 25 | using WinRT; |
28 | 26 | using static CollapseLauncher.ArgumentParser; |
29 | 27 | using static CollapseLauncher.InnerLauncherConfig; |
30 | | -using static CollapseLauncher.MainWindow; |
31 | 28 | using static Hi3Helper.Locale; |
32 | 29 | using static Hi3Helper.Logger; |
33 | 30 | using static Hi3Helper.Shared.Region.LauncherConfig; |
@@ -204,8 +201,6 @@ public static void Main(params string[] args) |
204 | 201 | MainEntryPointExtension.XamlCheckProcessRequirements(); |
205 | 202 | ComWrappersSupport.InitializeComWrappers(); |
206 | 203 |
|
207 | | - SystemEvents.SessionEnding += SystemEvent_EndingSession; |
208 | | - |
209 | 204 | StartMainApplication(); |
210 | 205 | } |
211 | 206 | #if !DEBUG |
@@ -234,15 +229,6 @@ private static async Task InitDatabaseHandler() |
234 | 229 | await DbHandler.Init(); |
235 | 230 | } |
236 | 231 |
|
237 | | - public static void SystemEvent_EndingSession(object sender, SessionEndingEventArgs e) |
238 | | - { |
239 | | - if (!IsCriticalOpInProgress) return; |
240 | | - |
241 | | - e.Cancel = true; |
242 | | - ShutdownBlocker.StartBlocking(WindowUtility.CurrentWindowPtr, Lang._Dialogs.EnsureExitSubtitle, |
243 | | - ILoggerHelper.GetILogger("ShutdownBlocker")); |
244 | | - } |
245 | | - |
246 | 232 | private static void InnoSetupLogUpdate_LoggerEvent(object sender, InnoSetupLogStruct e) |
247 | 233 | { |
248 | 234 | LogWriteLine( |
|
0 commit comments