public override void OnClick() { try { this._pageLayoutControl = _context.MainView.PageLayoutControl; FormPrinterSetup formPrinterSetup = new FormPrinterSetup(); formPrinterSetup.setPageLayout(ref this._pageLayoutControl); formPrinterSetup.ShowDialog(); } catch (Exception exception_) { System.Windows.Forms.MessageBox.Show("无法启动打印!"); //CErrorLog.writeErrorLog(this, exception_, ""); } }
public override void OnClick() { this.ipageLayoutControl_0 = this._context.Hook as IPageLayoutControl; if (this.ipageLayoutControl_0 != null) { try { FormPrinterSetup formPrinterSetup = new FormPrinterSetup(); formPrinterSetup.setPageLayout(ref this.ipageLayoutControl_0); formPrinterSetup.ShowDialog(); } catch (Exception exception1) { Exception exception = exception1; MessageBox.Show("无法启动打印!"); CErrorLog.writeErrorLog(this, exception, ""); } } }