コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }