다음을 통해 공유


PrintSystemJobInfo.IsDeleted 속성

정의

PrintSystemJobInfo 개체가 나타내는 인쇄 작업이 인쇄 대기열에서 삭제되었는지 여부를 나타내는 값을 가져옵니다.

public:
 property bool IsDeleted { bool get(); };
public bool IsDeleted { get; }
member this.IsDeleted : bool
Public ReadOnly Property IsDeleted As Boolean

속성 값

인쇄 작업이 삭제되었으면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 인쇄 작업 문제를 진단 하는 경우이 속성을 사용 하는 방법을 보여 줍니다.

// Check for possible trouble states of a print job using its properties
static void SpotTroubleUsingProperties (PrintSystemJobInfo^ theJob) 
{
   if (theJob->IsBlocked)
   {
      Console::WriteLine("The job is blocked.");
   }
   if (theJob->IsCompleted || theJob->IsPrinted)
   {
      Console::WriteLine("The job has finished. Have user recheck all output bins and be sure the correct printer is being checked.");
   }
   if (theJob->IsDeleted || theJob->IsDeleting)
   {
      Console::WriteLine("The user or someone with administration rights to the queue has deleted the job. It must be resubmitted.");
   }
   if (theJob->IsInError)
   {
      Console::WriteLine("The job has errored.");
   }
   if (theJob->IsOffline)
   {
      Console::WriteLine("The printer is offline. Have user put it online with printer front panel.");
   }
   if (theJob->IsPaperOut)
   {
      Console::WriteLine("The printer is out of paper of the size required by the job. Have user add paper.");
   }

   if (theJob->IsPaused || theJob->HostingPrintQueue->IsPaused)
   {
      HandlePausedJob(theJob);
      //HandlePausedJob is defined in the complete example.
   }

   if (theJob->IsPrinting)
   {
      Console::WriteLine("The job is printing now.");
   }
   if (theJob->IsSpooling)
   {
      Console::WriteLine("The job is spooling now.");
   }
   if (theJob->IsUserInterventionRequired)
   {
      Console::WriteLine("The printer needs human intervention.");
   }
};
// Check for possible trouble states of a print job using its properties
internal static void SpotTroubleUsingProperties(PrintSystemJobInfo theJob)
{
    if (theJob.IsBlocked)
    {
        Console.WriteLine("The job is blocked.");
    }
    if (theJob.IsCompleted || theJob.IsPrinted)
    {
        Console.WriteLine("The job has finished. Have user recheck all output bins and be sure the correct printer is being checked.");
    }
    if (theJob.IsDeleted || theJob.IsDeleting)
    {
        Console.WriteLine("The user or someone with administration rights to the queue has deleted the job. It must be resubmitted.");
    }
    if (theJob.IsInError)
    {
        Console.WriteLine("The job has errored.");
    }
    if (theJob.IsOffline)
    {
        Console.WriteLine("The printer is offline. Have user put it online with printer front panel.");
    }
    if (theJob.IsPaperOut)
    {
        Console.WriteLine("The printer is out of paper of the size required by the job. Have user add paper.");
    }

    if (theJob.IsPaused || theJob.HostingPrintQueue.IsPaused)
    {
        HandlePausedJob(theJob);
        //HandlePausedJob is defined in the complete example.
    }

    if (theJob.IsPrinting)
    {
        Console.WriteLine("The job is printing now.");
    }
    if (theJob.IsSpooling)
    {
        Console.WriteLine("The job is spooling now.");
    }
    if (theJob.IsUserInterventionRequired)
    {
        Console.WriteLine("The printer needs human intervention.");
    }
}//end SpotTroubleUsingProperties
' Check for possible trouble states of a print job using its properties
Friend Shared Sub SpotTroubleUsingProperties(ByVal theJob As PrintSystemJobInfo)
    If theJob.IsBlocked Then
        Console.WriteLine("The job is blocked.")
    End If
    If theJob.IsCompleted OrElse theJob.IsPrinted Then
        Console.WriteLine("The job has finished. Have user recheck all output bins and be sure the correct printer is being checked.")
    End If
    If theJob.IsDeleted OrElse theJob.IsDeleting Then
        Console.WriteLine("The user or someone with administration rights to the queue has deleted the job. It must be resubmitted.")
    End If
    If theJob.IsInError Then
        Console.WriteLine("The job has errored.")
    End If
    If theJob.IsOffline Then
        Console.WriteLine("The printer is offline. Have user put it online with printer front panel.")
    End If
    If theJob.IsPaperOut Then
        Console.WriteLine("The printer is out of paper of the size required by the job. Have user add paper.")
    End If

    If theJob.IsPaused OrElse theJob.HostingPrintQueue.IsPaused Then
        HandlePausedJob(theJob)
        'HandlePausedJob is defined in the complete example.
    End If

    If theJob.IsPrinting Then
        Console.WriteLine("The job is printing now.")
    End If
    If theJob.IsSpooling Then
        Console.WriteLine("The job is spooling now.")
    End If
    If theJob.IsUserInterventionRequired Then
        Console.WriteLine("The printer needs human intervention.")
    End If

End Sub

설명

사실이 보일 수 있습니다 개체 삭제를 자체의 상태를 보고할 수 있지만 유지는 처음에 유의 하는 PrintSystemJobInfo 개체만 나타냅니다 실제 인쇄 작업을 합니다. 후자는 인쇄 대기열에서 삭제 하는 자동으로 삭제할는 PrintSystemJobInfo 애플리케이션의 개체입니다. 마찬가지로, 개체에서 제거 되지 않습니다 PrintJobInfoCollection 나타내는 인쇄 작업이 삭제 되기 전 생성 된 합니다. 예를 들어 경우는 GetPrintJobInfoCollection 인쇄 작업 삭제 되기 전 메서드가 실행 될, 반환 된 컬렉션에 포함 됩니다는 PrintSystemJobInfo 인쇄 작업을 나타내는 개체입니다. 인쇄 작업이 삭제 되 면이 개체를 컬렉션에서 제거 되지 않습니다. 그러나 GetPrintJobInfoCollection 을 다시 실행에서 반환 된 컬렉션에 삭제 된 인쇄 작업을 나타내는 멤버가 포함 됩니다.

적용 대상