/// <summary> /// Proceso de Impresion de documentos /// </summary> private static async void PrintingProcess() { while (IsRunning) { var document = DocumentPrintStack.FirstOrDefault(); if (document.Value != null) { var service = new PrintManagerService(); if (service.SendToPrint(document.Value, "Enviar a OneNote 2013")) { // Eliminar y cambiar estado en la web api await PrintFormManager.DeleteForm(document.Key); // Eliminar en cola local PrintForm form; DocumentPrintStack.TryRemove(document.Key, out form); } } else Thread.Sleep(TimeSpan.FromSeconds(SleepingTime)); } }