/// <summary> /// Populate all configurations /// </summary> private static void PopulateConfigurations() { var defaultPaths = FixedConfigSettingsProvider.CreateDefaultSettingsProvider(); var configPathProvider = new FixedConfigSettingsProvider( CommandLineSettings.ConfigFolder ?? defaultPaths.ConfigurationFolderPath, CommandLineSettings.UserDataFolder ?? defaultPaths.UserDataFolderPath ); FileHelpers.CreateFolder(configPathProvider.UserDataFolderPath); FileHelpers.CreateFolder(configPathProvider.ConfigurationFolderPath); // Populate the App Config and Test Config ConfigurationManager.GetDefaultInstance(configPathProvider); // based on customer feedback, we will set default selection mode to Element // when AccessibilityInsights starts up. ConfigurationManager.GetDefaultInstance().AppConfig.IsUnderElementScope = true; // Configure the correct ReleaseChannel for autoupdate Container.SetAutoUpdateReleaseChannel(ConfigurationManager.GetDefaultInstance().AppConfig.ReleaseChannel.ToString()); // enable/disable telemetry if (ConfigurationManager.GetDefaultInstance().AppConfig.EnableTelemetry) { TelemetryController.EnableTelemetry(); } // Update theming since it depends on config options SetColorTheme(); }
/// <summary> /// Updates telemetry settings based on user input /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnExit_Click(object sender, RoutedEventArgs e) { ConfigurationManager.GetDefaultInstance().AppConfig.ShowTelemetryDialog = false; ConfigurationManager.GetDefaultInstance().AppConfig.EnableTelemetry = ckbxAgreeToHelp.IsChecked.Value; DialogResult = ckbxAgreeToHelp.IsChecked ?? false; if (DialogResult) { TelemetryController.EnableTelemetry(); } else { TelemetryController.DisableTelemetry(); } WaitHandle.Set(); }
/// <summary> /// Populate all configurations /// </summary> private static void PopulateConfigurations() { // make sure that necessary folders are created. DirectoryManagement.CreateFolders(); // Populate the App Config and Test Config ConfigurationManager.GetDefaultInstance(); // based on customer feedback, we will set default selection mode to Element // when AccessibilityInsights starts up. ConfigurationManager.GetDefaultInstance().AppConfig.IsUnderElementScope = true; // Configure the correct ReleaseChannel for autoupdate Container.SetAutoUpdateReleaseChannel(ConfigurationManager.GetDefaultInstance().AppConfig.ReleaseChannel.ToString()); // enable/disable telemetry if (ConfigurationManager.GetDefaultInstance().AppConfig.EnableTelemetry) { TelemetryController.EnableTelemetry(); } }