From 045646b7390ef658b30ef30ff84ba73181316922 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 22 Oct 2012 18:34:23 +0000 Subject: [PATCH] the Update Formats option will now always prompt for the location of the FMTALL and GENMACALL folders, defaulting to the one last selected --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 0c556aee..05955591 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -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(); }