private void LoadForegroundConfiguration() { string ColorString = SQLite.Current.GetFileColor(Path); if (!string.IsNullOrEmpty(ColorString)) { SetColorAsSpecific(ColorHelper.ToColor(ColorString)); } }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override async void OnLaunched(LaunchActivatedEventArgs e) { Root root = Window.Current.Content as Root; if (root == null) { var CoreView = CoreApplication.GetCurrentView(); var AppView = ApplicationView.GetForCurrentView(); var coreTitleBar = CoreView.TitleBar; coreTitleBar.ExtendViewIntoTitleBar = true; var titleBar = AppView.TitleBar; titleBar.ButtonBackgroundColor = Colors.Transparent; titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; root = new Root(); root.ChangeTheme(Settings.Theme); root.UpdateThemeColors(); (Service.Platform as UWPlatformService).SetRoot(root); /*if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 13)) * this.Resources["SymbolThemeFontFamily"] = new FontFamily("Segoe Fluent Icons");*/ ((SolidColorBrush)this.Resources["CustomReaderBackground"]).Color = ColorHelper.ToColor(Settings.ReaderBackground); if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } Window.Current.Content = root; } if (!e.PrelaunchActivated) { CoreApplication.EnablePrelaunch(true); if (root.FrameContent.Content == null) { Service.Platform.GoToPage(Pages.Loading, PagesTransition.None, e.SplashScreen); } Window.Current.Activate(); } else { await InitServices(); } }