This class adds the ISettings to the project's Properties.Settings class.
This file should not contain any memebers or properties.
상속: ISettings
예제 #1
0
 /// <summary>
 /// This ensures that the settings have been upgraded to work with the current
 /// version of the programme.
 /// </summary>
 /// <param name="p_setSettings">The settings to upgrade.</param>
 private static void UpgradeSettings(Properties.Settings p_setSettings)
 {
     if (!p_setSettings.SettingsUpgraded)
     {
         try
         {
             p_setSettings.Upgrade();
         }
         catch (ConfigurationException e)
         {
             string strFilename = e.Filename;
             File.Delete(strFilename);
             p_setSettings.Reload();
         }
         p_setSettings.Upgrade();
         p_setSettings.SettingsUpgraded = true;
         p_setSettings.Save();
     }
 }