PrintSystemJobInfo.JobIdentifier Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan nomor identifikasi untuk pekerjaan cetak.
public:
property int JobIdentifier { int get(); };
public int JobIdentifier { get; }
member this.JobIdentifier : int
Public ReadOnly Property JobIdentifier As Integer
Nilai Properti
Yang Int32 mengidentifikasi pekerjaan cetak.
Contoh
Contoh berikut menunjukkan cara menggunakan properti ini saat mendiagnosis masalah dengan pekerjaan cetak.
for each (PrintQueue^ pq in myPrintQueues)
{
pq->Refresh();
PrintJobInfoCollection^ jobs = pq->GetPrintJobInfoCollection();
for each (PrintSystemJobInfo^ job in jobs)
{
// Since the user may not be able to articulate which job is problematic,
// present information about each job the user has submitted.
if (job->Submitter == userName)
{
atLeastOne = true;
jobList = jobList + "\nServer:" + line;
jobList = jobList + "\n\tQueue:" + pq->Name;
jobList = jobList + "\n\tLocation:" + pq->Location;
jobList = jobList + "\n\t\tJob: " + job->JobName + " ID: " + job->JobIdentifier;
}
}
}
foreach (PrintQueue pq in myPrintQueues)
{
pq.Refresh();
PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{
// Since the user may not be able to articulate which job is problematic,
// present information about each job the user has submitted.
if (job.Submitter == userName)
{
atLeastOne = true;
jobList = jobList + "\nServer:" + line;
jobList = jobList + "\n\tQueue:" + pq.Name;
jobList = jobList + "\n\tLocation:" + pq.Location;
jobList = jobList + "\n\t\tJob: " + job.JobName + " ID: " + job.JobIdentifier;
}
}// end for each print job
}// end for each print queue
For Each pq As PrintQueue In myPrintQueues
pq.Refresh()
Dim jobs As PrintJobInfoCollection = pq.GetPrintJobInfoCollection()
For Each job As PrintSystemJobInfo In jobs
' Since the user may not be able to articulate which job is problematic,
' present information about each job the user has submitted.
If job.Submitter = userName Then
atLeastOne = True
jobList = jobList & vbLf & "Server:" & line
jobList = jobList & vbLf & vbTab & "Queue:" & pq.Name
jobList = jobList & vbLf & vbTab & "Location:" & pq.Location
jobList = jobList & vbLf & vbTab & vbTab & "Job: " & job.JobName & " ID: " & job.JobIdentifier
End If
Next job ' end for each print job
Next pq ' end for each print queue
Keterangan
Sistem penomoran mana yang digunakan ditentukan oleh sistem operasi server cetak dan apakah server cetak adalah komputer atau appliance server cetak. Misalnya, sistem operasi untuk Microsoft Windows XP menentukan penomoran dengan cara ini: ketika server cetak diaktifkan, jika semua antrean cetaknya kosong, pekerjaan cetak pertama yang dikirimkan di server oleh pengguna mana pun dan ke antrean apa pun ditetapkan ID nomor 2. Setiap pekerjaan berikutnya di server diberi angka yang lebih besar dari pekerjaan cetak sebelumnya di server tersebut.
Antrean cetak untuk pekerjaan cetak tidak berpengaruh pada jumlahnya: jika pekerjaan dikirim ke QueueA, QueueB, dan QueueA, dalam urutan tersebut, maka QueueA memiliki pekerjaan 2 dan 4, dan QueueB memiliki pekerjaan 3.
Setelah pekerjaan diberi nomor, nomor tidak pernah berubah, bahkan jika pekerjaan lain selesai mencetak atau dibatalkan, atau jika server dimulai ulang. Jika sudah ada pekerjaan dalam satu atau beberapa antrean saat server dimulai ulang, pekerjaan baru pertama diberi angka yang lebih besar dari pekerjaan bernomor tertinggi yang ada dalam antrean ketika server dimulai. Namun, sampai dimulai ulang, server cetak tidak menggunakan kembali angka. Bahkan jika pekerjaan bernomor tertinggi dibatalkan sebelum dicetak, pekerjaan berikutnya mendapatkan angka yang lebih tinggi.