Exemplo n.º 1
0
        public async void RefreshDeliveryJobQueue()
        {
            try
            {
                deliveryJobQueue = await DeliveryJobProcessor.GetDeliveryJobs();
            }
            catch
            {
                //MessageBox.Show("Unable to connect to Internet.");
            }

            TableLayoutHelper.ClearTable(tableLayoutDeliveryQueue);

            populateDeliveryQueue(deliveryJobQueue);
        }
Exemplo n.º 2
0
        public async void RefreshPrintJobQueue(Queue <PrintJobModel> printJobQueue)
        {
            //PrintJobQueue = GetPrintJobs();

            // TODO: Remove this server call and use formal parameter
            printJobQueue = await PrintJobProcessor.LoadPrintJobs();

            //int topPrintJobId = printJobQueue.Last().Id;
            string stringPrintJobQueue = printJobQueueToString(printJobQueue);

            if (!string.Equals(StringPrintJobQueue, stringPrintJobQueue))
            {
                StringPrintJobQueue = stringPrintJobQueue;

                // Only show this message in Manual operation
                if (PrintJobProcessor.PausePrint && PrintJobProcessor.showMessageBox)
                {
                    MessageBox.Show("We have a new Print Job");
                }
                PrintJobProcessor.showMessageBox = true;
                TableLayoutHelper.ClearTable(tableLayoutPrintQueue);
                populatePrintQueue(printJobQueue);
            }
        }