This commit is contained in:
2010-10-08 13:00:24 +00:00
parent 117bae32c8
commit ce69adcd51
3 changed files with 106 additions and 25 deletions

View File

@@ -56,9 +56,16 @@ namespace VEPROMS
SelectedDVI = null;
}
else // Step Tab Panel
{
SelectedDVI = value.MyStepPanel.MyProcedureItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
// Remove it first, if it wasn't set, this doesn't do anything, but if it was set, you don't want
// multiple events because the print dialog will be displayed for each time the event was added.
_SelectedStepTabPanel.MyStepTabRibbon.PrintRequest -= new StepTabRibbonEvent(MyStepTabRibbon_PrintRequest);
_SelectedStepTabPanel.MyStepTabRibbon.PrintRequest += new StepTabRibbonEvent(MyStepTabRibbon_PrintRequest);
}
}
}
public DocVersionInfo SelectedDVI
{
get { return _SelectedDVI; }
@@ -89,6 +96,9 @@ namespace VEPROMS
#endregion
public frmVEPROMS()
{
// cleanup from previous run:
Volian.Base.Library.TmpFile.RemoveAllTmps();
if (VlnSettings.DebugMode)
{
//use local data (for development/debug mode)
@@ -151,6 +161,7 @@ namespace VEPROMS
toolsPanel.Expanded = false;
displayTags.Visible = false;
ribbonControl1.ExpandedChanged += new EventHandler(ribbonControl1_ExpandedChanged);
dlgFindReplace = new FindReplace();
SpellChecker = new VlnSpellCheck();
displaySearch1.PrintRequest += new DisplaySearchEvent(displaySearch1_PrintRequest);
@@ -165,6 +176,13 @@ namespace VEPROMS
if (SelectedStepTabPanel!=null && SelectedStepTabPanel.MyStepTabRibbon != null)
SelectedStepTabPanel.MyStepTabRibbon.SetUpdRoValBtn(SelectedStepTabPanel.MyStepTabRibbon.NewerRoFst());
}
void MyStepTabRibbon_PrintRequest(object sender, StepTabRibbonEventArgs args)
{
ProcedureInfo pi = args.Proc as ProcedureInfo;
if (pi == null) return;
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi);
prnDlg.Show();
}
void displaySearch1_PrintRequest(object sender, DisplaySearchEventArgs args)
{
Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.MyItemInfoList, @"C:\temp\searchresults.pdf");