Fixed logic for SUM.FMT
Fixed logic to update formats Fixed logic to paste dashes
This commit is contained in:
@@ -1989,35 +1989,27 @@ namespace VEPROMS
|
||||
}
|
||||
private void btnUpdateFormat_Click(object sender, EventArgs e)
|
||||
{
|
||||
string tmp = Properties.Settings.Default.FormatPath;
|
||||
string fmtPath = Properties.Settings.Default.FormatPath ?? "";
|
||||
DirectoryInfo di = null;
|
||||
//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)
|
||||
do
|
||||
{
|
||||
//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 = fmtPath;
|
||||
DialogResult dr = fbd.ShowDialog();
|
||||
if (dr == DialogResult.Cancel)
|
||||
{
|
||||
fbd.Description = "Select folder containing FmtAll and GenMacAll folders to update formats";
|
||||
fbd.SelectedPath = tmp;
|
||||
DialogResult dr = fbd.ShowDialog();
|
||||
if (dr == DialogResult.Cancel)
|
||||
{
|
||||
bottomProgBar.Text = "Format Update Cancelled";
|
||||
return;
|
||||
}
|
||||
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();
|
||||
}
|
||||
string fmtPath = di.FullName + @"\fmtall";
|
||||
string genmacPath = di.FullName + @"\genmacall";
|
||||
bottomProgBar.Text = "Format Update Cancelled";
|
||||
return;
|
||||
}
|
||||
di = new DirectoryInfo(fbd.SelectedPath);
|
||||
fmtPath = di.FullName;
|
||||
} while (((fmtPath ?? "") == "") || (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall")));
|
||||
Properties.Settings.Default.FormatPath = fbd.SelectedPath;
|
||||
Properties.Settings.Default.Save();
|
||||
string fmtPathAll = di.FullName + @"\fmtall";
|
||||
string genmacPathAll = di.FullName + @"\genmacall";
|
||||
Format.FormatLoaded += new FormatEvent(Format_FormatLoaded);
|
||||
Format.UpdateFormats(fmtPath, genmacPath);
|
||||
Format.UpdateFormats(fmtPathAll, genmacPathAll);
|
||||
Format.FormatLoaded -= new FormatEvent(Format_FormatLoaded);
|
||||
}
|
||||
|
||||
@@ -2029,7 +2021,7 @@ namespace VEPROMS
|
||||
bottomProgBar.Maximum = int.Parse(args.Status.Split(" ".ToCharArray())[0]);
|
||||
}
|
||||
else
|
||||
bottomProgBar.Value++;
|
||||
if(!args.Status.Contains("SubFormat"))bottomProgBar.Value++;
|
||||
bottomProgBar.Text = args.Status;
|
||||
bottomProgBar.TextVisible = true;
|
||||
Application.DoEvents();
|
||||
|
Reference in New Issue
Block a user