15
15
using ShadowViewer . Plugin . PluginManager ;
16
16
using ShadowViewer . Services ;
17
17
using SqlSugar ;
18
- using System . Globalization ;
19
18
using System . Threading . Tasks ;
20
19
using Microsoft . UI . Xaml . Controls ;
21
20
using ShadowViewer . Pages ;
22
21
using CustomExtensions . WinUI ;
23
22
using Microsoft . UI . Windowing ;
24
- using ShadowViewer . Helpers ;
25
23
26
24
namespace ShadowViewer ;
27
25
28
- public sealed partial class MainWindow : Window
26
+ public sealed partial class MainWindow
29
27
{
30
28
private NavigationPage ? navigationPage ;
31
29
private ShadowTitleBar ? shadowTitleBar ;
@@ -59,18 +57,19 @@ private async void Content_Loaded(object sender, RoutedEventArgs e)
59
57
LoadingText . Text = "加载标题栏..." ;
60
58
var caller = DiFactory . Services . Resolve < ICallableService > ( ) ;
61
59
navigationPage = new NavigationPage ( ) ;
62
- shadowTitleBar = new ShadowTitleBar ( this ) ;
63
- MainGrid . Children . Add ( shadowTitleBar ) ;
64
60
Grid . SetRow ( navigationPage , 1 ) ;
65
61
MainGrid . Children . Add ( navigationPage ) ;
62
+ shadowTitleBar = new ShadowTitleBar ( this ) ;
63
+ MainGrid . Children . Add ( shadowTitleBar ) ;
66
64
shadowTitleBar . InitAppTitleBar_BackButtonClick ( navigationPage . AppTitleBar_BackButtonClick ) ;
67
65
shadowTitleBar . InitAppTitleBar_OnPaneButtonClick ( navigationPage . AppTitleBar_OnPaneButtonClick ) ;
68
66
caller . ThemeChangedEvent += shadowTitleBar . AppTitleBar_ThemeChangedEvent ;
69
67
caller . DebugEvent += shadowTitleBar . AppTitleBar_DebugEvent ;
70
68
// await OutAnimationLoadingGrid.StartAsync();
71
- LoadingGrid . Visibility = Visibility . Collapsed ;
72
69
MainGrid . Visibility = Visibility . Visible ;
73
- if ( firstUri != null ) NavigateHelper . ShadowNavigate ( firstUri ) ;
70
+ LoadingGrid . Visibility = Visibility . Collapsed ;
71
+ var navigateService = DiFactory . Services . Resolve < INavigateService > ( ) ;
72
+ if ( firstUri != null ) navigateService . Navigate ( firstUri ) ;
74
73
}
75
74
76
75
@@ -89,7 +88,7 @@ private async Task OnLoading(IProgress<string>? loadingProgress)
89
88
90
89
var pluginServices = DiFactory . Services . Resolve < PluginLoader > ( ) ;
91
90
92
- var currentCulture = CultureInfo . CurrentUICulture ;
91
+ // var currentCulture = CultureInfo.CurrentUICulture;
93
92
94
93
loadingProgress ? . Report ( "加载插件..." ) ;
95
94
try
0 commit comments