コード例 #1
0
ファイル: To_MP3_Options.cs プロジェクト: sorvis/Fast-Script
        public To_MP3_Options(Presenter presenter)
        {
            InitializeComponent();
            _presenter = presenter;
            _settings = presenter.Settings;

            // load avalible voices in to dropdown
            Installed_Voices_comboBox.Items.AddRange(_presenter.Settings.TTSVoiceNames);

            Installed_Voices_comboBox.Text = _settings.CurrentTTSVoice.VoiceInfo.Name; // set current voice

            TTS_Rate_trackBar.Value = _settings.TTS_Rate + 10;
        }
コード例 #2
0
 private void loadSettings()
 {
     if (File.Exists("Settings.data"))
     {
         _settings = (GUISettings)ObjectSerializing.DeSerializeObjectFromFile("Settings.data", this);
     }
     else if (File.Exists(Path.Combine(_appDataStorageFolder, "Settings.data")))
     {
         try
         {
             _settings = (GUISettings)ObjectSerializing.DeSerializeObjectFromFile(Path.Combine(_appDataStorageFolder, "Settings.data"), this);
         }
         catch
         {
             _settings = new GUISettings();
         }
     }
     else
     {
         _settings = new GUISettings();
     }
 }