• Add ability to print all procedures from the command-line.

•	Position frmPDFStatusForm below this form.
•	Close the dialog when all procedures are printed.
Position this form at a specific location.
Command-Line Print all procedures for a specified DocVersionID
This commit is contained in:
Rich
2011-12-02 16:42:32 +00:00
parent 0641588ee8
commit f1af6e9d6c
3 changed files with 85 additions and 9 deletions

View File

@@ -342,7 +342,38 @@ namespace VEPROMS
if (VlnSettings.DemoMode) StepRTB.MyFontFamily = GetFamily("Bookman Old Style");
displaySearch1.Enter += new EventHandler(displaySearch1_Enter);
ctrlAnnotationDetails.Enter += new EventHandler(ctrlAnnotationDetails_Enter);
RunAutomatic();
}
private void RunAutomatic()
{
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
bool ranAuto = false;
foreach (string parameter in parameters)
{
if(parameter.StartsWith("/P="))
{
string[] dvstrs = parameter.Substring(3).Split(",".ToCharArray());
foreach (string dvstr in dvstrs)
{
DocVersionInfo dvi = DocVersionInfo.Get(int.Parse(dvstr));
if (dvi != null)
{
DlgPrintProcedure prnDlg = new DlgPrintProcedure(dvi,true);
prnDlg.ShowDialog();
//prnDlg.FormClosed += new FormClosedEventHandler(prnDlg_FormClosed);
//while (!_RunNext) Application.DoEvents();
ranAuto = true;
}
}
}
}
if(ranAuto) this.Close();
}
private bool _RunNext = false;
//void prnDlg_FormClosed(object sender, FormClosedEventArgs e)
//{
// _RunNext = true;
//}
private FontFamily GetFamily(string name)
{
foreach (FontFamily ff in FontFamily.Families)