İngilizce dilinde oku

Aracılığıyla paylaş


PrintJobStatus Sabit listesi

Tanım

Yazdırma kuyruğundaki bir yazdırma işinin geçerli durumunu belirtir.

Bu sabit listesi, üyeleri için bit düzeyinde karşılaştırmayı destekler.

C#
[System.Flags]
public enum PrintJobStatus
Devralma
PrintJobStatus
Öznitelikler

Alanlar

Name Değer Description
Blocked 512

Muhtemelen kuyruktaki bir yazdırma işinde bulunan bir hata koşulu yazdırma işini engelledi.

Completed 4096

Yazdırma sonrası işlemler de dahil olmak üzere yazdırma işi tamamlanır.

Deleted 256

Yazdırma işi genellikle yazdırıldıktan sonra kuyruktan silindi.

Deleting 4

Yazdırma işi siliniyor.

Error 2

Yazdırma işi hata durumunda.

None 0

Yazdırma işinin belirtilen durumu yok.

Offline 32

Yazıcı çevrimdışı.

PaperOut 64

Yazıcının kağıt boyutu gerekli değil.

Paused 1

Yazdırma işi duraklatıldı.

Printed 128

Yazdırma işi yazdırıldı.

Printing 16

Yazdırma işi şimdi yazdırılıyor.

Restarted 2048

Yazdırma işi engellendi ancak yeniden başlatıldı.

Retained 8192

Yazdırma işi, yazdırıldıktan sonra yazdırma kuyruğunda tutulur.

Spooling 8

Yazdırma işi biriktiriliyor.

UserIntervention 1024

Yazıcı, bir hata koşulunu düzeltmek için kullanıcı eylemi gerektiriyor.

Örnekler

Aşağıdaki örnekte, yazdırma işiyle ilgili bir sorunu tanılarken bu numaralandırmanın nasıl kullanılacağı gösterilmektedir.

C#
// Check for possible trouble states of a print job using the flags of the JobStatus property
internal static void SpotTroubleUsingJobAttributes(PrintSystemJobInfo theJob)
{
    if ((theJob.JobStatus & PrintJobStatus.Blocked) == PrintJobStatus.Blocked)
    {
        Console.WriteLine("The job is blocked.");
    }
    if (((theJob.JobStatus & PrintJobStatus.Completed) == PrintJobStatus.Completed)
        || 
        ((theJob.JobStatus & PrintJobStatus.Printed) == PrintJobStatus.Printed))
    {
        Console.WriteLine("The job has finished. Have user recheck all output bins and be sure the correct printer is being checked.");
    }
    if (((theJob.JobStatus & PrintJobStatus.Deleted) == PrintJobStatus.Deleted)
        || 
        ((theJob.JobStatus & PrintJobStatus.Deleting) == PrintJobStatus.Deleting))
    {
        Console.WriteLine("The user or someone with administration rights to the queue has deleted the job. It must be resubmitted.");
    }
    if ((theJob.JobStatus & PrintJobStatus.Error) == PrintJobStatus.Error)
    {
        Console.WriteLine("The job has errored.");
    }
    if ((theJob.JobStatus & PrintJobStatus.Offline) == PrintJobStatus.Offline)
    {
        Console.WriteLine("The printer is offline. Have user put it online with printer front panel.");
    }
    if ((theJob.JobStatus & PrintJobStatus.PaperOut) == PrintJobStatus.PaperOut)
    {
        Console.WriteLine("The printer is out of paper of the size required by the job. Have user add paper.");
    }

    if (((theJob.JobStatus & PrintJobStatus.Paused) == PrintJobStatus.Paused)
        || 
        ((theJob.HostingPrintQueue.QueueStatus & PrintQueueStatus.Paused) == PrintQueueStatus.Paused))
    {
        HandlePausedJob(theJob);
        //HandlePausedJob is defined in the complete example.
    }

    if ((theJob.JobStatus & PrintJobStatus.Printing) == PrintJobStatus.Printing)
    {
        Console.WriteLine("The job is printing now.");
    }
    if ((theJob.JobStatus & PrintJobStatus.Spooling) == PrintJobStatus.Spooling)
    {
        Console.WriteLine("The job is spooling now.");
    }
    if ((theJob.JobStatus & PrintJobStatus.UserIntervention) == PrintJobStatus.UserIntervention)
    {
        Console.WriteLine("The printer needs human intervention.");
    }
}//end SpotTroubleUsingJobAttributes

Açıklamalar

Bu numaralandırma öncelikle özelliğin JobStatus değeri olarak kullanılır.

Şunlara uygulanır

Ürün Sürümler
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Ayrıca bkz.