private void pauseJob(PrintSystemJobInfo job) { if (!job.IsPaused && job.Submitter.Equals(Environment.UserName)) { job.Pause(); form.RestoreFromTray(); } }
private void cmdPauseJob_Click(object sender, RoutedEventArgs e) { if (lstJobs.SelectedValue != null) { PrintQueue queue = printServer.GetPrintQueue(lstQueues.SelectedValue.ToString()); PrintSystemJobInfo job = queue.GetJob((int)lstJobs.SelectedValue); job.Pause(); } }