예제 #1
0
        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);
        }
예제 #2
0
        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;
                }
            }
        }
예제 #3
0
 public HearingImpaired(HIConfigs config)
 {
     Config = config;
 }