Exemplo n.º 1
0
        /// <summary>
        /// 打印影票
        /// </summary>
        /// <param name="seat"></param>
        public static void PrintTest()
        {
            Flamingo.TemplateCore.TemplatePrintModel PrintModel = new Flamingo.TemplateCore.TemplatePrintModel();
            PrintModel.BarCodeStr    = "12345678901234567890";
            PrintModel.FilmName      = "打印测试";
            PrintModel.HallFieldCode = "00";
            PrintModel.HallName      = "影厅名称";
            PrintModel.RowNumber     = "0";
            PrintModel.SeatNumber    = "0";
            PrintModel.SellTime      = DateTime.Now.ToString("yyyyMMddHHmm");
            PrintModel.StaffNumber   = "000110011";
            PrintModel.TheaterName   = "影院名称";
            PrintModel.TicketDate    = DateTime.Now.ToShortDateString();
            PrintModel.TicketPrice   = "100.00元";
            PrintModel.TicketTime    = DateTime.Now.ToShortTimeString();
            PrintModel.TicketType    = "电影票";
            PrintModel.PayType       = "现金";
            PrintModel.SeatNumberStr = "0排0座";
            PrintModel.CheckingType  = "对号入座";
            PrintModel.Position      = "01";

            Cobainsoft.Windows.Forms.BarcodeControl BarcodeControl = new Cobainsoft.Windows.Forms.BarcodeControl();
            BarcodeControl.BarcodeType         = Cobainsoft.Windows.Forms.BarcodeType.CODE128C;
            BarcodeControl.CopyRight           = "";
            BarcodeControl.ShowCode39StartStop = true;
            BarcodeControl.StretchText         = true;
            BarcodeControl.TextPosition        = Cobainsoft.Windows.Forms.BarcodeTextPosition.Below;
            TemplatePrintCore core = new TemplatePrintCore(FrmMain.template, PrintModel);

            BarcodeControl.Data = PrintModel.BarCodeStr;
            core.BarCode        = BarcodeControl;
            //core.ShowPrintDialog = true;
            core.Print();
        }
Exemplo n.º 2
0
        TemplatePrintModel CreateDemoTemplatePrintModel()
        {
            //Graphics gs = new Graphics();
            TemplatePrintModel model1 = new TemplatePrintModel();

            model1.BarCodeStr    = "11111111111";
            model1.FilmName      = "电影名称";
            model1.HallFieldCode = "00";
            model1.HallName      = "影厅名称";
            model1.RowNumber     = "0";
            model1.SeatNumber    = "0";
            model1.SellTime      = DateTime.Now.ToString();
            model1.StaffNumber   = "000110011";
            model1.TheaterName   = "影院名称";
            model1.TicketDate    = DateTime.Now.ToShortDateString();
            model1.TicketPrice   = "80.00元";
            model1.TicketTime    = DateTime.Now.ToShortTimeString();
            model1.TicketType    = "电影票";
            model1.PayType       = "现金";
            model1.SeatNumberStr = "0排0座";
            model1.CheckingType  = "对号入座";

            BarcodeControl                     = new Cobainsoft.Windows.Forms.BarcodeControl();
            BarcodeControl.BarcodeType         = Cobainsoft.Windows.Forms.BarcodeType.CODE128C;
            BarcodeControl.CopyRight           = "";
            BarcodeControl.ShowCode39StartStop = true;
            BarcodeControl.StretchText         = true;
            BarcodeControl.TextPosition        = Cobainsoft.Windows.Forms.BarcodeTextPosition.Below;
            return(model1);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 打印影票
        /// </summary>
        /// <param name="seat"></param>
        public static void PrintTicket(Flamingo.TemplateCore.TemplatePrintModel PrintModel)
        {
            Cobainsoft.Windows.Forms.BarcodeControl BarcodeControl = new Cobainsoft.Windows.Forms.BarcodeControl();
            BarcodeControl.BarcodeType         = Cobainsoft.Windows.Forms.BarcodeType.CODE128C;
            BarcodeControl.CopyRight           = "";
            BarcodeControl.ShowCode39StartStop = true;
            BarcodeControl.StretchText         = true;
            BarcodeControl.TextPosition        = Cobainsoft.Windows.Forms.BarcodeTextPosition.Below;
            TemplatePrintCore core = new TemplatePrintCore(FrmMain.template, PrintModel);

            BarcodeControl.Data = PrintModel.BarCodeStr;
            core.BarCode        = BarcodeControl;
            //core.ShowPrintDialog = true;
            core.Print();
        }