public PrintPreviewLabel(Panel panel, ExportInfo exinfo = null) : base() { try { BelongPanel = panel; ExpandArray = new int[4]; MenuStrip = new ControlContextMenuStrip(); panel.Controls.Add(this); Exinfo = exinfo; if (Exinfo != null) { this.GetInfoFromExportInfo(Exinfo); } } catch (Exception ex) { MessageBox.Show(this, ex.Message); } }
public PrintPreviewPictureBox(Panel panel, ExportInfo exinfo = null) : base() { try { BelongPanel = panel; PanelForm = panel.Parent as PrintForm; if (PanelForm == null) { throw new Exception("Can't get PanelForm."); } ExpandArray = new int[4]; MenuStrip = new ControlContextMenuStrip(); panel.Controls.Add(this); } catch (Exception ex) { MessageBox.Show(this, ex.Message); } if (exinfo != null) { this.GetInfoFromExportInfo(exinfo); } }