the Update Formats option will now always prompt for the location of the FMTALL and GENMACALL folders, defaulting to the one last selected

This commit is contained in:
John Jenko 2012-10-22 18:34:23 +00:00
parent d7a6b7beb1
commit 045646b739

View File

@ -1955,12 +1955,17 @@ namespace VEPROMS
{
string tmp = Properties.Settings.Default.FormatPath;
DirectoryInfo di = null;
if (tmp != null && tmp !="") di = new DirectoryInfo(Properties.Settings.Default.FormatPath);
if (((tmp ?? "") == "") || (di != null && (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall"))))
//if (tmp != null && tmp !="") di = new DirectoryInfo(Properties.Settings.Default.FormatPath);
if (tmp == null) tmp = "";
di = new DirectoryInfo(Properties.Settings.Default.FormatPath);
//if (((tmp ?? "") == "") || (di != null && (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall"))))
if (di != null)
{
while (((tmp ?? "") == "") || (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall")))
//while (((tmp ?? "") == "") || (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall")))
do
{
fbd.Description = "Select folder containing FmtAll and GenMacAll folders to update formats";
fbd.SelectedPath = tmp;
DialogResult dr = fbd.ShowDialog();
if (dr == DialogResult.Cancel)
{
@ -1969,7 +1974,7 @@ namespace VEPROMS
}
di = new DirectoryInfo(fbd.SelectedPath);
tmp = di.FullName;
}
} while (((tmp ?? "") == "") || (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall")));
Properties.Settings.Default.FormatPath = fbd.SelectedPath;
Properties.Settings.Default.Save();
}