Esempio n. 1
0
 private void MainMenuForm_Load(object sender, EventArgs e)
 {
     try
     {
         ClientSettings.Load();
     }
     catch (Exception)
     {
         MessageBox.Show("Error loading client settings. Resetting to defaults.");
         ClientSettings.Initialize();
         ClientSettings.Save();
     }
     // set the default music volume according to the settings
     // volume values are 0-100, so scale appropriately to the 0-1 range
     Music.setVolume(ClientSettings.Instance.MasterVolume * ClientSettings.Instance.MusicVolume * 1.0e-4f);
 }