Exemplo n.º 1
0
        //增加打印任务
        public static void AddPrintTask(String code, string name, string boxId, string sum)
        {
            PrintTask task = new PrintTask();

            task.Code  = code;
            task.Name  = name;
            task.Boxid = boxId;
            task.Sum   = sum;
            PrintQueue.Enqueue(task);
        }
Exemplo n.º 2
0
        private static void ThreadTask()
        {
            while (true && !OverThread)
            {
                if (PrintQueue.Count > 0)
                {
                    PrintTask task = PrintQueue.Dequeue();

                    Print(task);
                }
                Thread.Sleep(200);
            }
        }