F2022-024 – logic to support printing of Time Critical Action Summary report
This commit is contained in:
@@ -91,6 +91,9 @@ namespace VEPROMS
|
||||
_SelectedStepTabPanel.MyStepTabRibbon.ContActionSummaryRequest += MyStepTabRibbon_ContActionSummaryRequest;
|
||||
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree -= new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
|
||||
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree += new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
|
||||
// F2022-024 Time Critical Action Summary
|
||||
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest -= MyStepTabRibbon_TimeCriticalActionSummaryRequest;
|
||||
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest += MyStepTabRibbon_TimeCriticalActionSummaryRequest;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,6 +129,38 @@ namespace VEPROMS
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
// F2022-024 Time Critical Action Summary
|
||||
void MyStepTabRibbon_TimeCriticalActionSummaryRequest(object sender, StepTabRibbonEventArgs args)
|
||||
{
|
||||
DialogResult dr = System.Windows.Forms.DialogResult.Yes;
|
||||
|
||||
ProcedureInfo piThis = null;
|
||||
if (_CurrentItem != null) piThis = _CurrentItem.MyProcedure;
|
||||
|
||||
ProcedureInfo pi = args.Proc as ProcedureInfo;
|
||||
if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis;
|
||||
|
||||
if (pi == null) return;
|
||||
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = pi.ProcedureConfig.SelectedSlave;
|
||||
|
||||
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi);
|
||||
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
prnDlg.SelectedSlave = (pi.ProcedureConfig.SelectedSlave == 0) ? -1 : pi.ProcedureConfig.SelectedSlave;
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.Automatic = true;
|
||||
prnDlg.CreateTimeCriticalActionSummary = true;
|
||||
prnDlg.OpenAfterCreate = (dr == System.Windows.Forms.DialogResult.Yes);
|
||||
prnDlg.Prefix = "TCASTMP_"; // A temporary procedure PDF is created to grab page numbers
|
||||
|
||||
prnDlg.SetupForProcedure();
|
||||
prnDlg.CreatePDF();
|
||||
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
|
||||
public DocVersionInfo SelectedDVI
|
||||
{
|
||||
@@ -473,6 +508,7 @@ namespace VEPROMS
|
||||
tv.Processing += tv_Processing;
|
||||
tv.CreateContinuousActionSummary += new vlnTreeViewEvent(tv_CreateContinuousActionSummary);
|
||||
tv.SelectDateToStartChangeBars += tv_SelectDateToStartChangeBars;
|
||||
tv.CreateTimeCriticalActionSummary += new vlnTreeViewEvent(tv_CreateTimeCriticalActionSummary);
|
||||
|
||||
displayBookMarks.ResetBookMarksInPROMSWindows += displayBookMarks_ResetBookMarksInPROMSWindows;
|
||||
}
|
||||
@@ -1119,6 +1155,30 @@ namespace VEPROMS
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
|
||||
void tv_CreateTimeCriticalActionSummary(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
DialogResult dr = System.Windows.Forms.DialogResult.Yes;
|
||||
|
||||
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
|
||||
if (pi == null) return;
|
||||
|
||||
tc.SaveCurrentEditItem(pi);
|
||||
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex;
|
||||
|
||||
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi, true);
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.SelectedSlave = args.UnitIndex;
|
||||
prnDlg.Automatic = true;
|
||||
prnDlg.CreateTimeCriticalActionSummary = true;
|
||||
prnDlg.OpenAfterCreate = (dr == System.Windows.Forms.DialogResult.Yes);
|
||||
prnDlg.Prefix = "TCASTMP_"; // prefix the temporary procedure PDF file that is generated (to grab page numbers)
|
||||
prnDlg.SetupForProcedure();
|
||||
prnDlg.CreatePDF();
|
||||
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
|
||||
void RefreshDisplayHistory(object sender)
|
||||
{
|
||||
displayHistory.RefreshChangeList();
|
||||
@@ -1209,7 +1269,7 @@ namespace VEPROMS
|
||||
|
||||
void frmVEPROMS_Activated(object sender, EventArgs e)
|
||||
{
|
||||
Volian.Base.Library.vlnStackTrace.ShowStack();
|
||||
//Volian.Base.Library.vlnStackTrace.ShowStack();
|
||||
|
||||
if (ActiveControl == tc) tc.HideCaret();
|
||||
// refresh anything that pertains to external files or programs:
|
||||
@@ -2928,7 +2988,7 @@ namespace VEPROMS
|
||||
|
||||
void tc_ToggleRibbonExpanded(object sender, EventArgs args)
|
||||
{
|
||||
Volian.Base.Library.vlnStackTrace.ShowStackLocal("tc_ToggleRibbonExpanded {0}", ribbonControl1.Expanded);
|
||||
//Volian.Base.Library.vlnStackTrace.ShowStackLocal("tc_ToggleRibbonExpanded {0}", ribbonControl1.Expanded);
|
||||
ribbonControl1.Expanded = !ribbonControl1.Expanded;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user