Message 1 of 1
Can I close a preview window on my button handler?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, Dears.
I am creating a multi-plot module.
I am trying to create previous, next, and close buttons on my form applied to the preview window.
Is it possible?
This is my code for single plot preview.
PlotEngine pe = PlotFactory.CreatePreviewEngine((int)PreviewEngineFlags.Plot);
using (pe)
{
PlotProgressDialog ppd = new PlotProgressDialog(false, 1, true);
using (ppd)
{
ppd.set_PlotMsgString(
PlotMessageIndex.DialogTitle,
"Custom Plot Progress"
);
ppd.set_PlotMsgString(
PlotMessageIndex.CancelJobButtonMessage,
"Cancel Job"
);
ppd.set_PlotMsgString(
PlotMessageIndex.CancelSheetButtonMessage,
"Cancel Sheet"
);
ppd.set_PlotMsgString(
PlotMessageIndex.SheetSetProgressCaption,
"Sheet Set Progress"
);
ppd.set_PlotMsgString(
PlotMessageIndex.SheetProgressCaption,
"Sheet Progress"
);
ppd.LowerPlotProgressRange = 0;
ppd.UpperPlotProgressRange = 100;
ppd.PlotProgressPos = 0;
ppd.OnBeginPlot();
ppd.IsVisible = true;
pe.BeginPlot(ppd, null);
pe.BeginDocument(
pi,
doc.Name,
null,
1,
true, // Let's plot to file
"d:\\test-output"
);
ppd.OnBeginSheet();
ppd.LowerSheetProgressRange = 0;
ppd.UpperSheetProgressRange = 100;
ppd.SheetProgressPos = 0;
PlotPageInfo ppi = new PlotPageInfo();
pe.BeginPage(
ppi,
pi,
true,
null
);
pe.BeginGenerateGraphics(null);
pe.EndGenerateGraphics(null);
PreviewEndPlotInfo pepi = new PreviewEndPlotInfo();
pe.EndPage(pepi);
ppd.SheetProgressPos = 100;
ppd.OnEndSheet();
pe.EndDocument(null);
ppd.PlotProgressPos = 100;
ppd.OnEndPlot();
pe.EndPlot(null);
}
}
Is there a way to access the preview window and pass a close command to it?
How should I approach this problem?
Thanks for reading.