Ejemplo n.º 1
0
        public static bool PrintTickets(ArrayList lists)
        {
#if DEBUG
            // MessageBox.Show("准备打印的影票个数为:"+lists.Count.ToString());
#endif
            if (lists != null)
            {
                // MyOpaqueLayerTools.ShowOpaqueLayer(this.panelHeader, 60, true);
                if (!GlobalHardwareTools.OpenHotPrinter())
                {
                    GlobalTools.Pop("打印机打开错误,请检查!");
                    return(false);
                }
                else
                {
                    for (int i = 0; i < lists.Count; i++)
                    {
#if DEBUG
                        //   MessageBox.Show("正在打印第"+i+"个影票");
#endif
                        if (lists[i] is TicketPrintObject)
                        {
                            GlobalHardwareTools.PrintTicket(lists[i] as TicketPrintObject);
                        }
                        else
                        {
                            GlobalHardwareTools.PrintSellProduct(lists[i] as SellProductPrinter);
                        }
                    }
                    GlobalHardwareTools.CloseHotPrinter();
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
        // public

        public static void PrintTickets(TicketPrintObject ticket)
        {
            if (ticket != null)
            {
                // MyOpaqueLayerTools.ShowOpaqueLayer(this.panelHeader, 60, true);
                GlobalHardwareTools.OpenHotPrinter();
                GlobalHardwareTools.PrintTicket(ticket);

                GlobalHardwareTools.CloseHotPrinter();
            }
        }