This commit is contained in:
2012-04-30 13:52:14 +00:00
parent 5a34e3c7f0
commit 679fe5860c
2 changed files with 27 additions and 18 deletions

View File

@@ -1809,10 +1809,12 @@ namespace VEPROMS
}
private void btnUpdateFormat_Click(object sender, EventArgs e)
{
DirectoryInfo di = new DirectoryInfo(Properties.Settings.Default.FormatPath);
if (!di.Exists || !File.Exists(di.FullName + @"\fmtall") || !File.Exists(di.FullName + @"\genmacall"))
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 || !File.Exists(di.FullName + @"\fmtall") || !File.Exists(di.FullName + @"\genmacall"))))
{
while (!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")))
{
fbd.Description = "Select folder containing FmtAll and GenMacAll folders to update formats";
DialogResult dr = fbd.ShowDialog();
@@ -1822,6 +1824,7 @@ namespace VEPROMS
return;
}
di = new DirectoryInfo(fbd.SelectedPath);
tmp = di.FullName;
}
Properties.Settings.Default.FormatPath = fbd.SelectedPath;
Properties.Settings.Default.Save();