private async System.Threading.Tasks.Task ActivateAsync(IActivatedEventArgs e) { if (!(Window.Current.Content is Frame rootFrame)) { rootFrame = CreateRootFrame(e); Window.Current.Content = rootFrame; } ThemeSettingsService.Initialize(); EditorSettingsService.Initialize(); var appLaunchSettings = new Dictionary <string, string>() { { "UseWindowsTheme", ThemeSettingsService.UseWindowsTheme.ToString() }, { "ThemeMode", ThemeSettingsService.ThemeMode.ToString() }, { "UseWindowsAccentColor", ThemeSettingsService.UseWindowsAccentColor.ToString() }, { "AppBackgroundTintOpacity", $"{(int) (ThemeSettingsService.AppBackgroundPanelTintOpacity * 100.0)}" }, { "ShowStatusBar", EditorSettingsService.ShowStatusBar.ToString() }, { "EditorDefaultLineEnding", EditorSettingsService.EditorDefaultLineEnding.ToString() }, { "EditorDefaultEncoding", EncodingUtility.GetEncodingBodyName(EditorSettingsService.EditorDefaultEncoding) }, { "EditorDefaultTabIndents", EditorSettingsService.EditorDefaultTabIndents.ToString() }, { "EditorDefaultDecoding", EncodingUtility.GetEncodingBodyName(EditorSettingsService.EditorDefaultDecoding) }, { "EditorFontFamily", EditorSettingsService.EditorFontFamily }, { "EditorFontSize", EditorSettingsService.EditorFontSize.ToString() }, }; LoggingService.LogInfo($"AppLaunchSettings: {string.Join(";", appLaunchSettings.Select(x => x.Key + "=" + x.Value).ToArray())}"); Analytics.TrackEvent("AppLaunchSettings", appLaunchSettings); await ActivationService.ActivateAsync(rootFrame, e); Window.Current.Activate(); ExtendAcrylicIntoTitleBar(); }
private async System.Threading.Tasks.Task ActivateAsync(IActivatedEventArgs e) { if (!(Window.Current.Content is Frame rootFrame)) { rootFrame = CreateRootFrame(e); Window.Current.Content = rootFrame; } ThemeSettingsService.Initialize(); EditorSettingsService.Initialize(); Analytics.TrackEvent("AppLaunch_Settings", new Dictionary <string, string>() { { "UseWindowsTheme", ThemeSettingsService.UseWindowsTheme.ToString() }, { "ThemeMode", ThemeSettingsService.ThemeMode.ToString() }, { "UseWindowsAccentColor", ThemeSettingsService.UseWindowsAccentColor.ToString() }, { "AppBackgroundTintOpacity", $"{ThemeSettingsService.AppBackgroundPanelTintOpacity:0.0}" }, { "ShowStatusBar", EditorSettingsService.ShowStatusBar.ToString() }, { "EditorDefaultLineEnding", EditorSettingsService.EditorDefaultLineEnding.ToString() }, { "EditorDefaultEncoding", EncodingUtility.GetEncodingBodyName(EditorSettingsService.EditorDefaultEncoding) }, { "EditorDefaultTabIndents", EditorSettingsService.EditorDefaultTabIndents.ToString() }, { "EditorDefaultDecoding", EncodingUtility.GetEncodingBodyName(EditorSettingsService.EditorDefaultDecoding) }, }); await ActivationService.ActivateAsync(rootFrame, e); //await LoggingService.InitializeAsync(); Window.Current.Activate(); ExtendAcrylicIntoTitleBar(); }
public override void WriteJson(JsonWriter writer, Encoding value, JsonSerializer serializer) { writer.WriteValue(EncodingUtility.GetEncodingBodyName(value)); }