Ejemplo n.º 1
0
 /// <summary>
 /// 打印tab页面的表格
 /// </summary>
 /// <returns></returns>
 protected virtual int PrintData()
 {
     try
     {
         Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
         //print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.Border;
         if (this.neuTabControl1.SelectedIndex == 1)
         {
             print.PrintPage(0, 0, this.neuPanel8);
         }
         else if (this.neuTabControl1.SelectedIndex == 0)
         {
             print.PrintPage(0, 0, this.neuPanel5);
         }
         else
         {
             MessageBox.Show("请选择要打印的页面");
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message);
     }
     return(0);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 重载toolbarservice的OnPrintPreview
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="neuObject"></param>
 /// <returns></returns>
 protected override int OnPrintPreview(object sender, object neuObject)
 {
     Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
     //print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.Border;
     if (this.neuTabControl1.SelectedIndex == 1)
     {
         print.PrintPreview(this.neuPanel8);
     }
     else if (this.neuTabControl1.SelectedIndex == 0)
     {
         print.PrintPreview(this.neuPanel5);
     }
     return(base.OnPrintPreview(sender, neuObject));
 }