Esempio 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();
        }
Esempio 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));
        }