Beispiel #1
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == this.tbPrint)
     {
         Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();
         p.IsDataAutoExtend = false;
         p.PrintPreview(this.panel1);
     }
     else if (e.Button == this.tbExit)
     {
         this.Close();
     }
     else if (e.Button == this.tbOut)
     {
         SaveFileDialog F = new SaveFileDialog();
         F.Filter = "word文件|*.rtf";
         if (F.ShowDialog() == DialogResult.OK)
         {
             if (F.FileName.IndexOf(".rtf") <= 0)
             {
                 F.FileName = F.FileName = ".rtf";
             }
             this.richTextBox1.SaveFile(F.FileName);
         }
     }
 }
        //打印预览
        public override int PrintPreview(object sender, object neuObject)
        {
            Neusoft.FrameWork.WinForms.Classes.Print printview = new Neusoft.FrameWork.WinForms.Classes.Print();

            printview.PrintPreview(0, 0, this.neuTabControl1.SelectedTab);
            return(base.OnPrintPreview(sender, neuObject));
        }
Beispiel #3
0
        /// <summary>
        /// 打印
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="neuObject"></param>
        /// <returns></returns>
        protected override int OnPrint(object sender, object neuObject)
        {
            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
            print.PrintPage(0, 0, this.NpPrint);

            return(base.OnPrint(sender, neuObject));
        }
Beispiel #4
0
        private void Print()
        {
            int Index = this.neuTabControl1.SelectedIndex;

            Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();
            p.PrintPage(0, 0, this.controls[Index].FpSpread);
        }
Beispiel #5
0
 /// <summary>
 /// 打印
 /// </summary>
 public void Print()
 {
     Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
     print.SetPageSize(new System.Drawing.Printing.PaperSize("Letter", 780, 640));
     print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;
     print.PrintPage(20, 10, this);
 }
        public int Print()
        {
            if (this.neuSpread1_Sheet1.Rows.Count > 0)
            {
                Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();

                Neusoft.HISFC.Components.Common.Classes.Function.GetPageSize("compound", ref print);

                //print.SetPageSize(new System.Drawing.Printing.PaperSize("compound", 420, 320));

                print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;
                print.PrintPage(0, 45, this);
            }

            //if (ucDetail != null && this.isPrintDetailBill)
            //{
            //    ucDetail.PrintPreview();
            //    this.isPrintDetailBill = false;
            //}

            if (this.ucList != null && this.isPrintDetailBill)
            {
                this.ucList.ShowData(this.alCompoundListData, false);
                this.isPrintDetailBill = false;
            }

            return(1);
        }
        /// <summary>
        /// 打印条码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void menuItem2_Click(object sender, EventArgs e)
        {
            if (this.neuSpread1.ActiveSheet != this.spPatient)
            {
                return;
            }
            if (this.spPatient.ActiveRow.Tag == null)
            {
                return;
            }
            //{63F68506-F49D-4ed5-92BD-28A52AF54626}
            AccountCard tempaccontCard = this.spPatient.ActiveRow.Tag as AccountCard;

            if (tempaccontCard == null)
            {
                return;
            }
            PictureBox picBox = new PictureBox();

            picBox.Size      = new Size(400, 30);
            picBox.Visible   = true;
            picBox.BackColor = System.Drawing.Color.White;
            picBox.SizeMode  = PictureBoxSizeMode.AutoSize;
            Panel panel = new Panel();

            panel.Controls.Add(picBox);
            panel.Visible = true;
            Class.Code39 code39 = new Neusoft.HISFC.Components.Account.Class.Code39();
            code39.ShowCodeString = true;
            Bitmap bitmap = code39.GenerateBarcode(tempaccontCard.MarkNO);

            picBox.Image = bitmap as Image;
            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
            print.PrintPage(0, 0, panel);
        }
        //打印
        /// <summary>
        /// 条码打印{D2F77BDA-F5E5-48fe-AB73-B7FE6D92E6E2}
        /// </summary>
        public void PrintBar()
        {
            Neusoft.HISFC.BizProcess.Interface.Registration.IPrintBar ip = Neusoft.FrameWork.WinForms.Classes.UtilInterface.CreateObject(this.GetType(), typeof(Neusoft.HISFC.BizProcess.Interface.Registration.IPrintBar))
                                                                           as Neusoft.HISFC.BizProcess.Interface.Registration.IPrintBar;
            if (ip == null)//默认实现打印
            {
                if (string.IsNullOrEmpty(CardNO))
                {
                    MessageBox.Show("病历号为空,不能打印");
                    return;
                }

                Neusoft.FrameWork.WinForms.Controls.ucBaseControl uc = new Neusoft.FrameWork.WinForms.Controls.ucBaseControl();
                Neusoft.FrameWork.WinForms.Controls.NeuPictureBox p  = new Neusoft.FrameWork.WinForms.Controls.NeuPictureBox();
                p.Image = Neusoft.FrameWork.WinForms.Classes.CodePrint.GetCode39(CardNO);
                Neusoft.FrameWork.WinForms.Controls.NeuPanel pn = new Neusoft.FrameWork.WinForms.Controls.NeuPanel();
                pn.Controls.Add(p);
                pn.BackColor = Color.White;
                uc.Controls.Add(pn);
                uc.BackColor = Color.White;

                Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
                print.PrintPage(0, 0, uc);
            }
            else //接口实现打印
            {
                string errText     = string.Empty;
                int    returnValue = ip.printBar((patientInfo as Neusoft.HISFC.Models.RADT.Patient), ref errText);
                if (returnValue < 0)
                {
                    MessageBox.Show(errText);
                    return;
                }
            }
        }
 public int PrintPreview()
 {
     Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();
     p.IsHaveGrid = true;
     p.PrintPreview(this.panel1);
     return(0);
 }
Beispiel #10
0
        /// <summary>
        /// 打印预览
        /// </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.PrintPreview(0, 0, this.plPrint);

            return(1);
        }
Beispiel #11
0
        /// <summary>
        /// 打印
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="neuObject"></param>
        /// <returns></returns>
        protected override int OnPrint(object sender, object neuObject)
        {
            if (MessageBox.Show("是否打印?", "提示信息", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return(1);
            }
            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
            if (!string.IsNullOrEmpty(this.pageSize))
            {
                try
                {
                    string[] size    = this.pageSize.Split(',');
                    int      pwidth  = Int32.Parse(size[0]);
                    int      pheight = Int32.Parse(size[0]);
                    Neusoft.HISFC.Models.Base.PageSize page = new Neusoft.HISFC.Models.Base.PageSize();
                    page.Name     = "crossReport";
                    page.WidthMM  = pwidth;
                    page.HeightMM = pheight;
                    print.SetPageSize(page);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("纸张大小设置有误");
                    return(-1);
                }
            }
            print.PrintPage(0, 0, this.plPrint);

            return(1);
        }
Beispiel #12
0
        /// <summary>
        /// 打印
        /// </summary>
        public void Print()
        {
            //Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
            //print.SetPageSize(new System.Drawing.Printing.PaperSize("Letter", 780, 640));
            //print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;
            //print.PrintPreview(20, 10, this);

            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();

            System.Drawing.Printing.PaperSize paperSize = new System.Drawing.Printing.PaperSize();
            paperSize.PaperName = "xxx" + (new Random()).Next(10000).ToString();//随便编个名字
            try
            {
                int width     = 960;
                int curHeight = this.Height;
                int addHeight = (this.neuSpread1_Sheet1.RowCount - 1) * (int)this.neuSpread1_Sheet1.Rows[0].Height;

                int additionAddHeight = 3 * (int)this.neuSpread1_Sheet1.Rows[0].Height;

                paperSize.Width  = width;
                paperSize.Height = (addHeight + curHeight + additionAddHeight);
            }
            catch (Exception ex)
            {
                MessageBox.Show("设置汇总发药纸张出错>>" + ex.Message);
            }

            print.SetPageSize(paperSize);
            print.PrintPreview(15, 10, this);
        }
        public int PrintPreview()
        {
            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();

            print.PrintPreview(0, 0, this);
            return(1);
        }
Beispiel #14
0
        public int Print()
        {
            Neusoft.FrameWork.WinForms.Classes.Print printer = new Neusoft.FrameWork.WinForms.Classes.Print();
            printer.PrintPage(0, 0, this);

            return(0);
        }
Beispiel #15
0
 /// <summary>
 /// 打印
 /// </summary>
 private void PrintInfo()
 {
     Neusoft.FrameWork.WinForms.Classes.Print pr = new Neusoft.FrameWork.WinForms.Classes.Print();
     pr.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.Border;
     //pr.ShowPrintPageDialog();
     pr.PrintPreview(this.neuPanel1);
 }
Beispiel #16
0
        /// <summary>
        /// 打印预览
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="neuObject"></param>
        /// <returns></returns>
        protected override int OnPrintPreview(object sender, object neuObject)
        {
            int Index = this.neuTabControl1.SelectedIndex;

            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
            print.PrintPreview(0, 0, this.controls[Index].FpSpread);
            return(base.OnPrintPreview(sender, neuObject));
        }
 protected override int OnPrint(object sender, object neuObject)
 {
     //this.myReport.PrintData();
     //屏蔽上一句,使用下面两句实现打印功能 by Sunjh 2009-3-13 {699DBE34-5DEA-4ba8-AFDD-A04364CFC8AD}
     Neusoft.FrameWork.WinForms.Classes.Print pp = new Neusoft.FrameWork.WinForms.Classes.Print();
     pp.PrintPreview(this.myReport.neuGroupBox2);
     return(base.OnPrint(sender, neuObject));
 }
Beispiel #18
0
 public void PrintOrder()
 {
     Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();
     p.IsDataAutoExtend = true;
     p.IsCanCancel      = true;
     p.ControlBorder    = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;
     p.PrintPage(110, 0, this);
 }
Beispiel #19
0
        /// <summary>
        /// 打印预览
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="neuObject"></param>
        /// <returns></returns>
        public override int PrintPreview(object sender, object neuObject)
        {
            Neusoft.FrameWork.WinForms.Classes.Print printview = new Neusoft.FrameWork.WinForms.Classes.Print();
            printview.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.Line;
            printview.PrintPreview(50, 100, this.plPrint);

            return(1);
        }
Beispiel #20
0
        public void Print()
        {
            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
            print.IsHaveGrid    = false;
            print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;

            print.PrintPage(0, 0, this.neuPanel1);
        }
Beispiel #21
0
 /// <summary>
 /// 打印
 /// </summary>
 /// <returns></returns>
 public int Print()
 {
     // TODO:  添加 UcSysFunction.Print 实现
     Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();
     p.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.Border;
     p.PrintPreview(panel1);
     return(0);
 }
 public int Print()
 {
     Neusoft.FrameWork.WinForms.Classes.Print print       = new Neusoft.FrameWork.WinForms.Classes.Print();
     Neusoft.HISFC.BizLogic.Manager.PageSize  pageManager = new Neusoft.HISFC.BizLogic.Manager.PageSize();
     print.SetPageSize(pageManager.GetPageSize("MZGH"));
     print.PrintPage(0, 0, this);
     return(0);
 }
 /// <summary>
 /// 打印
 /// </summary>
 public void Print()
 {
     this.neuSpread1_Sheet1.Columns[(int)ColumnSet.ColMemo].Visible = false;
     Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
     print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;
     print.PrintPage(30, 10, this);
     this.neuSpread1_Sheet1.Columns[(int)ColumnSet.ColMemo].Visible = true;
 }
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public int  Print()
 {
     Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
     //print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;
     print.SetPageSize(new System.Drawing.Printing.PaperSize("A4", 800, 860));
     //print.PrintPreview(27, 73, this.neuPanel1);
     print.PrintPage(32, 64, this.neuPanel1);
     return(1);
 }
Beispiel #25
0
        public void Preview()
        {
            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();

            Neusoft.HISFC.Components.Common.Classes.Function.GetPageSize("DrugBag", ref print);

            print.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;
            print.PrintPreview(30, 10, this);
        }
Beispiel #26
0
        private void Print()
        {
            Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();
            p.ControlBorder = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;

            #region 郑大更新--{708DEA18-EAB7-4f87-BC8B-D2C7C529BB87}
            p.PrintPreview(52, 40, this.panelFun); //p.PrintPreview(0, 5, this.panelFun);
            #endregion
        }
Beispiel #27
0
        public int Print()
        {
            this.neuSpread1_Sheet1.ColumnHeader.DefaultStyle.BackColor = System.Drawing.Color.White;
            this.neuSpread1_Sheet1.RowHeader.DefaultStyle.BackColor    = System.Drawing.Color.White;
            this.neuSpread1_Sheet1.SheetCornerStyle.BackColor          = System.Drawing.Color.White;

            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();
            return(print.PrintPage(this.left, this.top, this.panelPrint));
        }
 public void Print()
 {
     Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();
     p.IsResetPage = true;
     System.Drawing.Printing.PaperSize pageSize = this.getPaperSizeForInput();
     p.SetPageSize(pageSize);
     p.PrintPage(15, 10, this);
     //p.PrintPreview(15, 10, this.neuPanel1);
 }
Beispiel #29
0
        void Neusoft.HISFC.BizProcess.Interface.Pharmacy.IDrugPrint.Print()
        {
            this.lblTitle.Text = managerIntegrate.GetHospitalName() + "处 方 笺";

            Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();
            p.IsDataAutoExtend = true;
            p.ControlBorder    = Neusoft.FrameWork.WinForms.Classes.enuControlBorder.None;
            p.PrintPreview(this);
        }
        protected override int OnPrint(object sender, object neuObject)
        {
            Neusoft.FrameWork.WinForms.Classes.Print print = new Neusoft.FrameWork.WinForms.Classes.Print();

            //print.PrintPage(0, 0, this.fpInpatInfo);
            print.PrintPreview(0, 0, this.neuPanel2);

            return(base.OnPrint(sender, neuObject));
        }