public DialogResult ShowPageSetupDialog() { var psd = new PageSetupDialog(); psd.AllowPrinter = true; psd.PageSettings = PageSettings; psd.PrinterSettings = PageSettings.PrinterSettings; return(psd.ShowDialog(window)); }
public void SettingDocument() { PageSetupDialog setup = new PageSetupDialog(); setup.Document = this.document; setup.PageSettings = this.pageSettings; setup.PrinterSettings = this.printSettings; setup.ShowDialog(); }
private void method_1() { this.pageSetupDialog1 = new PageSetupDialog() { PageSettings = new PageSettings(), PrinterSettings = new PrinterSettings(), ShowNetwork = false }; }
private void izbornikPageSetup_Click(object sender, EventArgs e) { PageSetupDialog pageSetup = new PageSetupDialog(); if (pageSetup.ShowDialog() == DialogResult.OK) { pageSetup.ShowDialog(); } }
private void izbornikPageSetup_Click(object sender, EventArgs e) { PageSetupDialog pageSetupDialog1 = new PageSetupDialog(); pageSetupDialog1.PrinterSettings = new System.Drawing.Printing.PrinterSettings(); pageSetupDialog1.PageSettings = new System.Drawing.Printing.PageSettings(); pageSetupDialog1.EnableMetric = false; pageSetupDialog1.ShowDialog(); }
private void ページ設定UToolStripMenuItem_Click(object sender, EventArgs e) { PageSetupDialog psd = new PageSetupDialog(); psd.EnableMetric = true; //cf. KB814355 et http://dobon.net/vb/dotnet/graphics/pagesetupdialogbug.html psd.PageSettings = GlobalData.Instance.pageSettings; psd.PrinterSettings = GlobalData.Instance.printerSettings; psd.AllowMargins = false; psd.ShowDialog(); }
private void PrintDocument1_PrintPage(System.Object sender, System.Drawing.Printing.PrintPageEventArgs e) { Bitmap bm = new Bitmap(this.Panel1.Width, this.Panel1.Height); Panel1.DrawToBitmap(bm, new Rectangle(0, 0, this.Panel1.Width, this.Panel1.Height)); e.Graphics.DrawImage(bm, 3, 0); PageSetupDialog aPS = new PageSetupDialog(); aPS.Document = PrintDocument1; }
public Task <bool> OnEvent(object MapEvent) { PageSetupDialog dlg = new PageSetupDialog(); dlg.Document = PrinterPage.Document; dlg.ShowDialog(); return(Task.FromResult(true)); }
private void InitializePageSetupDialog() { //实例化打印设置对话框 m_pageSetupDialog = new PageSetupDialog(); //初始化打印设置对话框属性 m_pageSetupDialog.PageSettings = new System.Drawing.Printing.PageSettings(); m_pageSetupDialog.PrinterSettings = new System.Drawing.Printing.PrinterSettings(); //不显示Network m_pageSetupDialog.ShowNetwork = false; }
void OnPrintSetupClick(object sender, EventArgs e) { PageSetupDialog pageSetupDialog = new PageSetupDialog(); pageSetupDialog.PageSettings = _pageSettings; pageSetupDialog.PrinterSettings = _printerSettings; pageSetupDialog.AllowOrientation = true; pageSetupDialog.AllowMargins = true; pageSetupDialog.ShowDialog(); }
public void PageSetupDialog_MinMargins_ShouldSerializeValue_ReturnsExpected(Margins value, bool expected) { var dialog = new PageSetupDialog(); PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(PageSetupDialog))[nameof(PageSetupDialog.MinMargins)]; Assert.False(property.ShouldSerializeValue(dialog)); dialog.MinMargins = value; Assert.Equal(expected, property.ShouldSerializeValue(dialog)); }
// 页面设置菜单按钮 private void pageSettingMenuItem_Click(object sender, EventArgs e) { PageSetupDialog pageSetupDialog = new PageSetupDialog(); pageSetupDialog.PageSettings = pageSettings; if (pageSetupDialog.ShowDialog() == DialogResult.OK) { pageSettings = pageSetupDialog.PageSettings; } }
public DialogResult ShowPageSetupDialog(IWin32Window owner) { PageSetupDialog psd = new PageSetupDialog(); psd.AllowPrinter = true; psd.PageSettings = PageSettings; psd.PrinterSettings = PageSettings.PrinterSettings; return(psd.ShowDialog(owner)); }
// ------------------------------------------------------------------ /// <summary> /// Displays a PageSetupDialog so the user can specify how each /// page is printed. /// </summary> // ------------------------------------------------------------------ public void PageSetup() { PageSetupDialog dialog = new PageSetupDialog(); dialog.PageSettings = this.PageSettings; if (dialog.ShowDialog() == DialogResult.OK) { this.PageSettings = dialog.PageSettings; } }
private void ustawieniaToolStripMenuItem_Click(object sender, EventArgs e) { PageSetupDialog pgSetup = new PageSetupDialog(); pgSetup.PageSettings = new System.Drawing.Printing.PageSettings(); pgSetup.PrinterSettings = new System.Drawing.Printing.PrinterSettings(); pgSetup.ShowNetwork = false; pgSetup.ShowDialog(); }
public static DialogResult PageSettings() { //Read and modify document page settings PageSetupDialog dlg = new PageSetupDialog(); dlg.AllowMargins = dlg.AllowOrientation = dlg.AllowPaper = true; dlg.AllowPrinter = false; //PrinterSettings=null disables AllowPrinter dlg.PageSettings = UltraGridPrinter.Settings; return(dlg.ShowDialog()); }
private void pageSettingsToolStripMenuItem_Click(object sender, EventArgs e) { var pd = new PrintDocument(); PageSetupDialog psd = new PageSetupDialog(); psd.Document = pd; psd.ShowDialog(); _pageSettings = pd.DefaultPageSettings; }
private void pageSetUptoolStrip_LauncherClick(object sender, EventArgs e) { PageSetupDialog pg = new PageSetupDialog(); pg.Document = printDocument; if (pg.ShowDialog() == DialogResult.OK) { ApplyPageSettings(pg); } }
private void menuItem4_Click(object sender, System.EventArgs e) { //构造页面设置对话框 PageSetupDialog pageSetupDialog1 = new PageSetupDialog(); //设置Document属性 pageSetupDialog1.Document = this.pDoc; //显示对话框 pageSetupDialog1.ShowDialog(); }
//File.Page Setup private void pageSetupToolStripMenuItem_Click(object sender, EventArgs e) { var PageSetupDialog = new PageSetupDialog(); PageSetupDialog.PageSettings = PageSettings; if (PageSetupDialog.ShowDialog(this) != DialogResult.OK) { return; } PageSettings = PageSetupDialog.PageSettings; }
private void SelectCustomPaper(LabelPrintDocument engine, PageSetupDialog pageDialog1) { for (int index = 0; index < engine.PrinterSettings.PaperSizes.Count; index++) { if (engine.PrinterSettings.PaperSizes[index].PaperName == Settings.Label.PrinterSettings.Paper) { PaperSize size = engine.PrinterSettings.PaperSizes[index]; pageDialog1.PageSettings.PaperSize = size; } } }
private void filePageSetupMenuItem_Click(Object sender, EventArgs e) { PageSetupDialog pageSetupDialog = new PageSetupDialog(); pageSetupDialog.PageSettings = pgSettings; pageSetupDialog.PrinterSettings = prtSettings; pageSetupDialog.AllowOrientation = true; pageSetupDialog.AllowMargins = true; pageSetupDialog.ShowDialog(); }
/// <summary> /// Setup the Page for printing /// </summary> private void _miFilePageSetup_Click(object sender, System.EventArgs e) { try { _printPage = 1; PageSetupDialog dlg = new PageSetupDialog(); dlg.Document = _printDocument; dlg.ShowDialog(this); } catch { } }
private void menuitemFilePageSetup_Click(object sender, EventArgs e) { var PageSetupDialog = new PageSetupDialog(); PageSetupDialog.PageSettings = PageSettings; if (PageSetupDialog.ShowDialog(this) != DialogResult.OK) { return; } PageSettings = PageSetupDialog.PageSettings; }
private void pageSetupToolStripMenuItem_Click(object sender, EventArgs e) { PageSetupDialog pgsetup = new PageSetupDialog(); pgsetup.PageSettings = new System.Drawing.Printing.PageSettings(); pgsetup.PrinterSettings = new System.Drawing.Printing.PrinterSettings(); pgsetup.ShowNetwork = false; pgsetup.AllowMargins = true; pgsetup.AllowOrientation = true; pgsetup.ShowDialog(); }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { //page setup menu PageSetupDialog pageSetupDialog = new PageSetupDialog(); pageSetupDialog.PageSettings = pgSettings; pageSetupDialog.PrinterSettings = prtSettings; pageSetupDialog.AllowOrientation = true; pageSetupDialog.AllowMargins = true; pageSetupDialog.ShowDialog(); }
void TsbPrintSetup_Click(object sender, EventArgs e) { var dlg = new PageSetupDialog(); dlg.Document = PrintDocument; if (dlg.ShowDialog(this) == DialogResult.OK) { PrintDocument.DefaultPageSettings = dlg.PageSettings; previewControl.InvalidatePreview(); } }
private void 页面设置ToolStripMenuItem_Click(object sender, EventArgs e) { PageSetupDialog MyPageSetupDg = new PageSetupDialog(); MyPageSetupDg.Document = MyPrintDc; try { MyPageSetupDg.ShowDialog(); } catch { } }
private void InitializePageSetupDialog() { //create a new PageSetupDialog using constructor pageSetupDialog1 = new PageSetupDialog(); //initialize the dialog's PrinterSettings property to hold user defined printer settings pageSetupDialog1.PageSettings = new System.Drawing.Printing.PageSettings(); //initialize dialog's PrinterSettings property to hold user set printer settings pageSetupDialog1.PrinterSettings = new System.Drawing.Printing.PrinterSettings(); //do not show the network in the printer dialog pageSetupDialog1.ShowNetwork = false; }
private void PageSetupButton_Click(object sender, EventArgs e) { using (PageSetupDialog dialog = new PageSetupDialog()) { dialog.Document = base.Document; if (dialog.ShowDialog() == DialogResult.OK) { base.Document.DefaultPageSettings = dialog.PageSettings; } } }
/* * if (bingoTable.printCallList == true) { printBingoCallList(pt, sz, bingoTable, Color.Black, ref graphicsObj, licenseInfo, "Oranges are pink", false); //print the call list here - msk } bingoTable.RandSeed = 0; * */ public BingoPrint() { printBingoDocument = new PrintDocument(); //printCallList = new PrintDocument(); printBingoPreviewDialog = new PrintPreviewDialog(); printBingoDialog = new PrintDialog(); pageBingoSetupDialog = new PageSetupDialog(); PrintPageSettings = new PageSettings(); printBingoDocument.PrintPage += new PrintPageEventHandler(this.PrintPage); // printCallList.PrintPage += new PrintPageEventHandler(this.PrintCallList); //printBingoDocument.QueryPageSettings += new QueryPageSettingsEventHandler(this.QueryPageSettings); numCardsToPrint = 0; return; }