Exemple #1
0
        }//end SpotTroubleUsingJobAttributes

        // </SnippetSpotTroubleUsingJobAttributes>

        //<SnippetHandlePausedJob>
        internal static void HandlePausedJob(PrintSystemJobInfo theJob)
        {
            // If there's no good reason for the queue to be paused, resume it and
            // give user choice to resume or cancel the job.
            Console.WriteLine("The user or someone with administrative rights to the queue" +
                              "\nhas paused the job or queue." +
                              "\nResume the queue? (Has no effect if queue is not paused.)" +
                              "\nEnter \"Y\" to resume, otherwise press return: ");
            String resume = Console.ReadLine();

            if (resume == "Y")
            {
                theJob.HostingPrintQueue.Resume();

                // It is possible the job is also paused. Find out how the user wants to handle that.
                Console.WriteLine("Does user want to resume print job or cancel it?" +
                                  "\nEnter \"Y\" to resume (any other key cancels the print job): ");
                String userDecision = Console.ReadLine();
                if (userDecision == "Y")
                {
                    theJob.Resume();
                }
                else
                {
                    theJob.Cancel();
                }
            } //end if the queue should be resumed
        }     //end HandlePausedJob
Exemple #2
0
 private void cmdResumeJob_Click(object sender, RoutedEventArgs e)
 {
     if (lstJobs.SelectedValue != null)
     {
         PrintQueue         queue = printServer.GetPrintQueue(lstQueues.SelectedValue.ToString());
         PrintSystemJobInfo job   = queue.GetJob((int)lstJobs.SelectedValue);
         job.Resume();
     }
 }
Exemple #3
0
        private void resumeLastJob()
        {
            PrintSystemJobInfo lastJob = getLastJob();

            if (lastJob != null)
            {
                lastJob.Resume();
                lastJob.Refresh();
            }
        }
Exemple #4
0
        internal static void HandlePausedJob(PrintSystemJobInfo theJob)
        {
            Console.WriteLine("The user or someone with administrative rights to the queue" +
                              "\nhas paused the job or queue." +
                              "\nResume the queue? (Has no effect if queue is not paused.)" +
                              "\nEnter \"Y\" to resume, otherwise press return: ");
            String resume = Console.ReadLine();

            if (resume == "Y")
            {
                theJob.HostingPrintQueue.Resume();
                Console.WriteLine("Does user want to resume print job or cancel it?" + "\nEnter \"Y\" to resume (any other key cancels the print job): ");
                String userDecision = Console.ReadLine();
                if (userDecision == "Y")
                {
                    theJob.Resume();
                }
                else
                {
                    theJob.Cancel();
                }
            }
        }
Exemple #5
0
 //Todo если этот сервис отключается, то удаляем все задания печати.
 private static void RunPrintJob(PrintSystemJobInfo jobJob)
 {
     jobJob.Resume();
     _logger.Information("Start printing");
     _logger.Information("___");
 }