|
16 | 16 | namespace Files
|
17 | 17 | {
|
18 | 18 | sealed partial class App : Application
|
19 |
| - { |
| 19 | + { |
20 | 20 | public App()
|
21 | 21 | {
|
22 | 22 | this.InitializeComponent();
|
23 | 23 | this.Suspending += OnSuspending;
|
24 | 24 | this.UnhandledException += App_UnhandledException;
|
25 | 25 | Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
|
26 | 26 |
|
| 27 | + if (localSettings.Values["theme"] == null) |
| 28 | + { |
| 29 | + localSettings.Values["theme"] = "Default"; |
| 30 | + } |
| 31 | + |
27 | 32 | if (localSettings.Values["theme"] != null)
|
28 | 33 | {
|
29 | 34 | if (localSettings.Values["theme"].ToString() == "Light")
|
@@ -53,21 +58,17 @@ public App()
|
53 | 58 | }
|
54 | 59 | }
|
55 | 60 | }
|
56 |
| - else |
57 |
| - { |
58 |
| - localSettings.Values["theme"] = "Default"; |
59 |
| - } |
60 | 61 |
|
61 | 62 | this.RequestedTheme = SettingsPages.Personalization.TV.ThemeValue;
|
62 | 63 | Debug.WriteLine("!!Requested Theme!!" + RequestedTheme.ToString());
|
63 | 64 |
|
64 |
| - |
| 65 | + |
65 | 66 |
|
66 | 67 | }
|
67 | 68 |
|
68 | 69 | private void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
|
69 | 70 | {
|
70 |
| - e.Handled = true; |
| 71 | + e.Handled = true; |
71 | 72 | Frame rootFrame = Window.Current.Content as Frame;
|
72 | 73 | rootFrame.Navigate(typeof(UnhandledExceptionDisplay), e.Exception);
|
73 | 74 | }
|
@@ -111,17 +112,17 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
|
111 | 112 |
|
112 | 113 | if (rootFrame.Content == null)
|
113 | 114 | {
|
114 |
| - |
115 |
| - // When the navigation stack isn't restored navigate to the first page, |
116 |
| - // configuring the new page by passing required information as a navigation |
117 |
| - // parameter |
118 |
| - rootFrame.Navigate(typeof(InstanceTabsView), e.Arguments, new SuppressNavigationTransitionInfo()); |
119 |
| - |
120 |
| - |
| 115 | + |
| 116 | + // When the navigation stack isn't restored navigate to the first page, |
| 117 | + // configuring the new page by passing required information as a navigation |
| 118 | + // parameter |
| 119 | + rootFrame.Navigate(typeof(InstanceTabsView), e.Arguments, new SuppressNavigationTransitionInfo()); |
| 120 | + |
| 121 | + |
121 | 122 | }
|
122 | 123 | // Ensure the current window is active
|
123 | 124 | Window.Current.Activate();
|
124 |
| - |
| 125 | + |
125 | 126 | }
|
126 | 127 | }
|
127 | 128 |
|
|
0 commit comments