예제 #1
0
        private void _initControlls()
        {
            _settingsequalizer = SettingsEqualizer.GetSettings();

            GetInstalVoicesToComboVoices();

            initionSliders();
            initionSpeed();
            initionVolume();
            initionPause();
        }
예제 #2
0
        public static SettingsEqualizer GetSettings()
        {
            SettingsEqualizer formsett = null;
            string            filename = Globals.SettingsFileEqulizer;

            if (File.Exists(filename))
            {
                using (FileStream fs = new FileStream(filename, FileMode.Open))
                {
                    XmlSerializer xser = new XmlSerializer(typeof(SettingsEqualizer));
                    formsett = (SettingsEqualizer)xser.Deserialize(fs);
                    fs.Close();
                }
            }
            else
            {
                formsett = new SettingsEqualizer();
            }
            return(formsett);
        }
        private void AllReadersLoadVoice()
        {
            ReaderOriginal     = new SpeechSynthesizer();
            _settingsEqualizer = SettingsEqualizer.GetSettings();

            try
            {
                ReaderOriginal.SelectVoice(_settingsEqualizer.VoiceName);
            }
            catch (Exception ex)
            {
                if (Voices.Count != 0)
                {
                    ReaderOriginal.SelectVoice(Voices[0].Name);
                    MessageBox.Show(Massage(ex), Globals.ERR, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    throw new Exception("None instaled voices");
                }
            }
        }