Ejemplo n.º 1
0
        public void OnEvent(object MapEvent)
        {
            FormPrintPreview dlg = new FormPrintPreview();

            //PrintPreviewDialog dlg = new PrintPreviewDialog();
            dlg.Document = PrinterPage.Document;

            PrinterMap map = new PrinterMap((Map)((MapEvent)MapEvent).Map);

            PrinterPage page = new PrinterPage(map, ((MapEvent)MapEvent).Map.Display.Envelope);

            //dlg.ShowDialog();
            page.Release();
        }
Ejemplo n.º 2
0
        public Task <bool> OnEvent(object MapEvent)
        {
            FormPrintPreview dlg = new FormPrintPreview();

            //PrintPreviewDialog dlg = new PrintPreviewDialog();
            dlg.Document = PrinterPage.Document;

            PrinterMap map = new PrinterMap((Map)((MapEvent)MapEvent).Map);

            PrinterPage page = new PrinterPage(map, ((MapEvent)MapEvent).Map.Display.Envelope);

            //dlg.ShowDialog();
            page.Release();

            return(Task.FromResult(true));
        }