Removed SUM and VCS from exclude list to support VCSummer data
Added status message when merging formats is completed Added message box when merging formats is completed
This commit is contained in:
parent
55bb5f8c95
commit
8fd70677fc
@ -350,7 +350,7 @@ namespace fmtxml
|
|||||||
{
|
{
|
||||||
Application.Run(new Form1());
|
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)
|
public static bool Excluded(FileInfo fi)
|
||||||
{
|
{
|
||||||
foreach (string prefix in _ExcludeList)
|
foreach (string prefix in _ExcludeList)
|
||||||
@ -486,33 +486,34 @@ namespace fmtxml
|
|||||||
foreach (FileInfo fi in fis) fi.Delete();
|
foreach (FileInfo fi in fis) fi.Delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnMergeFmtPagDoc_Click(object sender, EventArgs e)
|
private void btnMergeFmtPagDoc_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ClearResults(tbResultPath.Text);
|
ClearResults(tbResultPath.Text);
|
||||||
DateTime tStart = DateTime.Now;
|
DateTime tStart = DateTime.Now;
|
||||||
MyStatus = "Merging...";
|
MyStatus = "Merging...";
|
||||||
// get all of the generated xml format files in the fmt_xml directory and merge
|
// get all of the generated xml format files in the fmt_xml directory and merge
|
||||||
// the fmt/doc/pag & subformats into one file.
|
// the fmt/doc/pag & subformats into one file.
|
||||||
DirectoryInfo di = new DirectoryInfo("fmt_xml");
|
DirectoryInfo di = new DirectoryInfo("fmt_xml");
|
||||||
//testDirectoryInfo di = new DirectoryInfo("E:\\proms.net\\exe\\fmtxml");
|
//testDirectoryInfo di = new DirectoryInfo("E:\\proms.net\\exe\\fmtxml");
|
||||||
FileInfo[] fis = di.GetFiles("*f.xml");
|
FileInfo[] fis = di.GetFiles("*f.xml");
|
||||||
ClearListBox();
|
ClearListBox();
|
||||||
foreach (FileInfo fi in fis)
|
foreach (FileInfo fi in fis)
|
||||||
{
|
{
|
||||||
// see if all three, format, doc & pag exist - if not, print error,
|
// see if all three, format, doc & pag exist - if not, print error,
|
||||||
// if so, process
|
// if so, process
|
||||||
string docname = "fmt_xml\\" + fi.Name.Substring(0, fi.Name.Length - 5) + "p.xml";
|
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";
|
string pagname = "fmt_xml\\" + fi.Name.Substring(0, fi.Name.Length - 5) + "d.xml";
|
||||||
if (File.Exists(docname) && File.Exists(pagname))
|
if (File.Exists(docname) && File.Exists(pagname))
|
||||||
{
|
{
|
||||||
AddFileToListBox(fi);
|
AddFileToListBox(fi);
|
||||||
EntireFormat ef = new EntireFormat("fmt_xml\\" + fi.Name, tbResultPath.Text);
|
EntireFormat ef = new EntireFormat("fmt_xml\\" + fi.Name, tbResultPath.Text);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Console.WriteLine("For {0}, page or document file does not exist.", fi.Name);
|
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)
|
private void ClearResults(string path)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user