/// <summary>
        ///直接打印
        /// </summary>
        public static void ActivePrintDialogEvent()
        {
            EditPrintEventArgs printage = new EditPrintEventArgs();

            PrintDialogEvent(printage);
            EditTemplatePrint.PrintDialogSetting(printage.editbitmap, printage.editcontrol);//直接打印
        }
        /// <summary>
        /// 触发打印过程
        /// </summary>
        public static void ActivePrintEditEvent()
        {
            EditPrintEventArgs printage = new EditPrintEventArgs();                 //传递实体

            PrintEditEvent(printage);                                               //触发模板打印过程,收集所有模板的打印数据
            //收集完毕开始打印
            EditTemplatePrint.PrintView(printage.editbitmap, printage.editcontrol); //开始打印
        }
Exemplo n.º 3
0
        /// <summary>
        /// 直接打印
        /// </summary>
        /// <param name="args"></param>
        void EditEventReferences_PrintDialogEvent(EditPrintEventArgs args)
        {
            args.editbitmap.Add((P_bgimg.BackgroundImage as Bitmap)); //添加图片到集合
            List <Control> list = new List <Control>();               //控件集合

            foreach (Control child in P_bgimg.Controls)
            {
                if (child is ComboBox)
                {
                    //ComboBox不参加打印
                }
                else
                {
                    list.Add(child);
                }
            }
            args.editcontrol.Add(list);//添加控件集合
        }