Added code to check for old settings file before trying to import it, clarified some comments.

Branch_1.5.0
Nathan Crawford 2010-02-15 03:42:51 +00:00
rodzic 25a793f1d9
commit af931b8c08
3 zmienionych plików z 10 dodań i 10 usunięć

Wyświetl plik

@ -55,5 +55,5 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.0.4")]
[assembly: AssemblyFileVersion("1.1.0.4")]
[assembly: AssemblyVersion("1.1.0.5")]
[assembly: AssemblyFileVersion("1.1.0.5")]

Wyświetl plik

@ -75,13 +75,13 @@ namespace embroideryReader
// new settings file in application data folder
settings = new NJCrawford.IniFile(settingsPath);
if (!System.IO.File.Exists(settingsPath))
// if the new file doesn't exist but the old one does, copy useful settings from old file to new
if (!System.IO.File.Exists(settingsPath) && System.IO.File.Exists(SETTINGS_FILENAME))
{
// Old settings file stored in installation folder
// breaks on Windows 7.
// Old settings file stored in installation folder breaks on
// Windows 7.
NJCrawford.IniFile oldSettings = new NJCrawford.IniFile(SETTINGS_FILENAME);
// copy useful settings from old file to new
if (!String.IsNullOrEmpty(oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED)))
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED));
@ -129,8 +129,8 @@ namespace embroideryReader
}
}
// This is no longer in the settings file, but keeping it here so I
// don't have to re-write every reference to it.
// This is no longer in the settings file, but I'm keeping it here because
// I can't think of a better place to put it yet.
public String updateLocation
{
get

Wyświetl plik

@ -54,5 +54,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.3.0.17")]
[assembly: AssemblyFileVersion("1.3.0.17")]
[assembly: AssemblyVersion("1.3.0.18")]
[assembly: AssemblyFileVersion("1.3.0.18")]