diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index f49be7f0..9dde9d55 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -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(); diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index d163012e..3633303d 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1074,6 +1074,9 @@ namespace Volian.Controls.Library string ptext = myDO.GetData(DataFormats.Text).ToString(); ptext = ptext.TrimEnd("\r\n\t ".ToCharArray()); if (PasteNoReturnsSetting) ptext = ptext.Replace("\r\n", " "); + ptext = ptext.Replace("\u2013", "-"); // Replace EN Dash with hyphen + ptext = ptext.Replace("\u2014", "-"); // Replace EM Dash with hyphen + ptext = ptext.Replace("\u2011", "-"); // Replace non-breaking hyphen with hyphen myRtb.SelectedText = ptext; //myRtb.SelectedText = myDO.GetData(DataFormats.Text).ToString(); } diff --git a/PROMS/fmtxml/FmtFileToXml.cs b/PROMS/fmtxml/FmtFileToXml.cs index da95e947..d9971a9a 100644 --- a/PROMS/fmtxml/FmtFileToXml.cs +++ b/PROMS/fmtxml/FmtFileToXml.cs @@ -3102,10 +3102,12 @@ namespace fmtxml if (rightCheckOffBox[0] == -2 && rightCheckOffBox[1] == -2) fmtdata.ProcData.CheckOffData.SkipSpaces = "true"; else { - fmtdata.ProcData.CheckOffData.LayoutList[0].RnoLevel = "0"; - fmtdata.ProcData.CheckOffData.LayoutList[0].Column = rightCheckOffBox[0]; - fmtdata.ProcData.CheckOffData.LayoutList[0].RnoLevel = "1"; - fmtdata.ProcData.CheckOffData.LayoutList[0].Column = rightCheckOffBox[1]; + if (fmtdata.ProcData.CheckOffData.LayoutList == null) + fmtdata.ProcData.CheckOffData.LayoutList = new Absolute [2]; + fmtdata.ProcData.CheckOffData.LayoutList[0].RnoLevel = "0"; + fmtdata.ProcData.CheckOffData.LayoutList[0].Column = rightCheckOffBox[0]; + fmtdata.ProcData.CheckOffData.LayoutList[1].RnoLevel = "1"; + fmtdata.ProcData.CheckOffData.LayoutList[1].Column = rightCheckOffBox[1]; } } for (int i = 0; i < MAXCHKHEADINGS; i++)