public void LoadConfigurations() { string configFile = FileUtils.GetConfigFile("hi2uc-config.xml"); // load from existing file if (File.Exists(configFile)) { _hiConfigs = HIConfigs.LoadConfiguration(configFile); } else { _hiConfigs = new HIConfigs(configFile); _hiConfigs.SaveConfigurations(); } _hearingImpaired = new HearingImpaired(_hiConfigs); }
private void UpdateUIFromConfigs(HIConfigs configs) { checkBoxSingleLineNarrator.Checked = configs.SingleLineNarrator; checkBoxRemoveSpaces.Checked = configs.RemoveExtraSpaces; checkBoxNames.Checked = configs.NarratorToUppercase; checkBoxMoods.Checked = configs.MoodsToUppercase; for (int i = 0; i < comboBoxStyle.Items.Count; i++) { var cbi = (ComboBoxItem)comboBoxStyle.Items[i]; if (cbi.Style == configs.Style) { //MessageBox.Show($"Test {i}"); comboBoxStyle.SelectedIndex = i; break; } } }
public HearingImpaired(HIConfigs config) { Config = config; }