diff --git a/PROMS/fmtxml/Form1.cs b/PROMS/fmtxml/Form1.cs index de5fdec7..6dd3cca1 100644 --- a/PROMS/fmtxml/Form1.cs +++ b/PROMS/fmtxml/Form1.cs @@ -350,7 +350,7 @@ namespace fmtxml { Application.Run(new Form1()); } - private static string[] _ExcludeList = "ANO,ATA,ATLAS,LPL,MYA,NAE,NAI,NAS,PAC,RBN,SCE,SRS,SUM,VCS,VP,WPF,YAE".Split(",".ToCharArray()); + private static string[] _ExcludeList = "ANO,ATA,ATLAS,LPL,MYA,NAE,NAI,NAS,PAC,RBN,SCE,SRS,VP,WPF,YAE".Split(",".ToCharArray()); public static bool Excluded(FileInfo fi) { foreach (string prefix in _ExcludeList) @@ -486,33 +486,34 @@ namespace fmtxml foreach (FileInfo fi in fis) fi.Delete(); } - private void btnMergeFmtPagDoc_Click(object sender, EventArgs e) - { - ClearResults(tbResultPath.Text); - DateTime tStart = DateTime.Now; - MyStatus = "Merging..."; - // get all of the generated xml format files in the fmt_xml directory and merge - // the fmt/doc/pag & subformats into one file. - DirectoryInfo di = new DirectoryInfo("fmt_xml"); - //testDirectoryInfo di = new DirectoryInfo("E:\\proms.net\\exe\\fmtxml"); - FileInfo[] fis = di.GetFiles("*f.xml"); - ClearListBox(); - foreach (FileInfo fi in fis) - { - // see if all three, format, doc & pag exist - if not, print error, - // if so, process - string docname = "fmt_xml\\" + fi.Name.Substring(0, fi.Name.Length - 5) + "p.xml"; - string pagname = "fmt_xml\\" + fi.Name.Substring(0, fi.Name.Length - 5) + "d.xml"; - if (File.Exists(docname) && File.Exists(pagname)) - { - AddFileToListBox(fi); - EntireFormat ef = new EntireFormat("fmt_xml\\" + fi.Name, tbResultPath.Text); - } - else - Console.WriteLine("For {0}, page or document file does not exist.", fi.Name); - } - - } + private void btnMergeFmtPagDoc_Click(object sender, EventArgs e) + { + ClearResults(tbResultPath.Text); + DateTime tStart = DateTime.Now; + MyStatus = "Merging..."; + // get all of the generated xml format files in the fmt_xml directory and merge + // the fmt/doc/pag & subformats into one file. + DirectoryInfo di = new DirectoryInfo("fmt_xml"); + //testDirectoryInfo di = new DirectoryInfo("E:\\proms.net\\exe\\fmtxml"); + FileInfo[] fis = di.GetFiles("*f.xml"); + ClearListBox(); + foreach (FileInfo fi in fis) + { + // see if all three, format, doc & pag exist - if not, print error, + // if so, process + string docname = "fmt_xml\\" + fi.Name.Substring(0, fi.Name.Length - 5) + "p.xml"; + string pagname = "fmt_xml\\" + fi.Name.Substring(0, fi.Name.Length - 5) + "d.xml"; + if (File.Exists(docname) && File.Exists(pagname)) + { + AddFileToListBox(fi); + EntireFormat ef = new EntireFormat("fmt_xml\\" + fi.Name, tbResultPath.Text); + } + else + Console.WriteLine("For {0}, page or document file does not exist.", fi.Name); + } + MyStatus = string.Format("DONE Merging Formats {0:F3} seconds", TimeSpan.FromTicks(DateTime.Now.Ticks - tStart.Ticks).TotalSeconds); + MessageBox.Show("DONE Merging Formats - Results are in " + tbResultPath.Text + @"fmtall'"); + } private void ClearResults(string path) {