From 93676d91a7c734cf6b2ace496142e69ccb037775 Mon Sep 17 00:00:00 2001
From: Moli <13026959681@163.com>
Date: 星期六, 02 五月 2026 16:41:54 +0800
Subject: [PATCH] T10, T11

---
 src/Moli.Desktop/App.xaml.cs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/Moli.Desktop/App.xaml.cs b/src/Moli.Desktop/App.xaml.cs
index 9063de7..111d1a0 100644
--- a/src/Moli.Desktop/App.xaml.cs
+++ b/src/Moli.Desktop/App.xaml.cs
@@ -2,6 +2,7 @@
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Hosting;
 using Moli.Desktop.Host;
+using Moli.Desktop.Runtime;
 
 namespace Moli.Desktop;
 
@@ -16,6 +17,7 @@
 
         _host = DesktopHostBuilder.Create(e.Args).Build();
         await _host.StartAsync();
+        await _host.Services.GetRequiredService<IDesktopRuntime>().StartAsync();
 
         var mainWindow = _host.Services.GetRequiredService<MainWindow>();
         mainWindow.Show();
@@ -25,6 +27,7 @@
     {
         if (_host is not null)
         {
+            await _host.Services.GetRequiredService<IDesktopRuntime>().ShutdownAsync();
             await _host.StopAsync(TimeSpan.FromSeconds(5));
             _host.Dispose();
         }

--
Gitblit v1.9.1