Esempio n. 1
0
 private bool SaveSettings()
 {
     if (this.useKeywordCheckbox.Checked && this.keywordTxt.Text.Length == 0)
     {
         MessageBox.Show("Cannot use empty keyword to capture Flight Simulator window", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(false);
     }
     Properties.Settings.Default.use_sound             = this.useSoundCheckbox.Checked;
     Properties.Settings.Default.sound_volume          = (float)this.volumeBar.Value / 100;
     Properties.Settings.Default.use_tv                = this.useTVCheckbox.Checked;
     Properties.Settings.Default.tv_refresh            = (int)this.refreshUpDown.Value;
     Properties.Settings.Default.offline               = this.testerCheckbox.Checked;
     Properties.Settings.Default.tv_increment          = this.incrementCheckbox.Checked;
     Properties.Settings.Default.tv_keyword            = this.keywordTxt.Text;
     Properties.Settings.Default.tv_use_keyword        = this.useKeywordCheckbox.Checked;
     Properties.Settings.Default.fdr_imaging           = this.fdrImagingCheckbox.Checked;
     Properties.Settings.Default.display_warnings      = this.WarningsCheckbox.Checked;
     Properties.Settings.Default.auto_connect          = this.AutoConnectCheckbox.Checked;
     Properties.Settings.Default.parking_brake_timeout = (int)this.parkingBrakeTimeout.Value;
     Properties.Settings.Default.weburl                = this.webroot.Text;
     Properties.Settings.Default.Save();
     SoundFactory.SetVolume(this.volumeBar.Value);
     return(true);
 }
Esempio n. 2
0
 private void volumeBar_ValueChanged_1(object sender, EventArgs e)
 {
     SoundFactory.SetVolume(this.volumeBar.Value);
 }