/// <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(); } }