Share via


PrintServer.GetPrintQueues Yöntem

Tanım

Yazdırma sunucusunun barındırır yazdırma kuyrukları koleksiyonunu alır.

Aşırı Yüklemeler

GetPrintQueues(String[], EnumeratedPrintQueueTypes[])

Belirtilen ve yalnızca belirtilen EnumeratedPrintQueueTypes özelliklerde başlatılan yazdırma kuyrukları koleksiyonunu alır.

GetPrintQueues(PrintQueueIndexedProperty[], EnumeratedPrintQueueTypes[])

Belirtilen türlerdeki yazdırma kuyruklarından oluşan bir koleksiyon alır. Bu yazdırma kuyrukları yalnızca dizide belirtilen özelliklerde PrintQueueIndexedProperty başlatılır.

GetPrintQueues(String[])

Yazdırma sunucusu tarafından barındırılan ve yalnızca belirtilen özelliklerde başlatılan yazdırma kuyrukları koleksiyonunu alır.

GetPrintQueues(EnumeratedPrintQueueTypes[])

yazdırma sunucusu tarafından içinde adlandırılmış ve barındırılan belirtilen türlerdeki EnumeratedPrintQueueTypes yazdırma kuyruklarının koleksiyonunu alır.

GetPrintQueues()

Yazdırma sunucusunun barındırır yazdırma kuyrukları koleksiyonunu alır.

GetPrintQueues(PrintQueueIndexedProperty[])

Yazdırma sunucusu tarafından barındırılan ve yalnızca dizide PrintQueueIndexedProperty belirtilen özelliklerde başlatılan yazdırma kuyrukları koleksiyonunu alır.

GetPrintQueues(String[], EnumeratedPrintQueueTypes[])

Belirtilen ve yalnızca belirtilen EnumeratedPrintQueueTypes özelliklerde başlatılan yazdırma kuyrukları koleksiyonunu alır.

public:
 System::Printing::PrintQueueCollection ^ GetPrintQueues(cli::array <System::String ^> ^ propertiesFilter, cli::array <System::Printing::EnumeratedPrintQueueTypes> ^ enumerationFlag);
public System.Printing.PrintQueueCollection GetPrintQueues (string[] propertiesFilter, System.Printing.EnumeratedPrintQueueTypes[] enumerationFlag);
member this.GetPrintQueues : string[] * System.Printing.EnumeratedPrintQueueTypes[] -> System.Printing.PrintQueueCollection
Public Function GetPrintQueues (propertiesFilter As String(), enumerationFlag As EnumeratedPrintQueueTypes()) As PrintQueueCollection

Parametreler

propertiesFilter
String[]

Başlatılan kuyruk özelliklerinin adları.

enumerationFlag
EnumeratedPrintQueueTypes[]

Koleksiyonda döndürülen yazdırma kuyruğu türlerini temsil eden bir değer dizisi.

Döndürülenler

PrintQueueCollection Belirtilen türlerdeki yazdırma kuyruklarından biri; her yazdırma kuyruğunda yalnızca belirtilen özellikler başlatılır.

Şunlara uygulanır

GetPrintQueues(PrintQueueIndexedProperty[], EnumeratedPrintQueueTypes[])

Belirtilen türlerdeki yazdırma kuyruklarından oluşan bir koleksiyon alır. Bu yazdırma kuyrukları yalnızca dizide belirtilen özelliklerde PrintQueueIndexedProperty başlatılır.

public:
 System::Printing::PrintQueueCollection ^ GetPrintQueues(cli::array <System::Printing::PrintQueueIndexedProperty> ^ propertiesFilter, cli::array <System::Printing::EnumeratedPrintQueueTypes> ^ enumerationFlag);
public System.Printing.PrintQueueCollection GetPrintQueues (System.Printing.PrintQueueIndexedProperty[] propertiesFilter, System.Printing.EnumeratedPrintQueueTypes[] enumerationFlag);
member this.GetPrintQueues : System.Printing.PrintQueueIndexedProperty[] * System.Printing.EnumeratedPrintQueueTypes[] -> System.Printing.PrintQueueCollection
Public Function GetPrintQueues (propertiesFilter As PrintQueueIndexedProperty(), enumerationFlag As EnumeratedPrintQueueTypes()) As PrintQueueCollection

Parametreler

propertiesFilter
PrintQueueIndexedProperty[]

Oluşturucunun başlatmış olduğu özellikler.

enumerationFlag
EnumeratedPrintQueueTypes[]

Koleksiyondaki yazdırma kuyruğu türlerini temsil eden bir değer dizisi.

Döndürülenler

PrintQueueCollection Yazdırma sunucusunun.

Açıklamalar

Koleksiyondaki kuyruklar yalnızca dizide listelenen özelliklerde PrintQueueIndexedProperty başlatılır.

Şunlara uygulanır

GetPrintQueues(String[])

Yazdırma sunucusu tarafından barındırılan ve yalnızca belirtilen özelliklerde başlatılan yazdırma kuyrukları koleksiyonunu alır.

public:
 System::Printing::PrintQueueCollection ^ GetPrintQueues(cli::array <System::String ^> ^ propertiesFilter);
public System.Printing.PrintQueueCollection GetPrintQueues (string[] propertiesFilter);
member this.GetPrintQueues : string[] -> System.Printing.PrintQueueCollection
Public Function GetPrintQueues (propertiesFilter As String()) As PrintQueueCollection

Parametreler

propertiesFilter
String[]

Başlatılan kuyruk özelliklerinin adları.

Döndürülenler

PrintQueueCollection Yazdırma sunucusundaki yazdırma kuyruklarının sayısı; her yazdırma kuyruğu yalnızca içinde belirtilen özelliklerde propertiesFilterbaşlatılır.

Şunlara uygulanır

GetPrintQueues(EnumeratedPrintQueueTypes[])

yazdırma sunucusu tarafından içinde adlandırılmış ve barındırılan belirtilen türlerdeki EnumeratedPrintQueueTypes yazdırma kuyruklarının koleksiyonunu alır.

public:
 System::Printing::PrintQueueCollection ^ GetPrintQueues(cli::array <System::Printing::EnumeratedPrintQueueTypes> ^ enumerationFlag);
public System.Printing.PrintQueueCollection GetPrintQueues (System.Printing.EnumeratedPrintQueueTypes[] enumerationFlag);
member this.GetPrintQueues : System.Printing.EnumeratedPrintQueueTypes[] -> System.Printing.PrintQueueCollection
Public Function GetPrintQueues (enumerationFlag As EnumeratedPrintQueueTypes()) As PrintQueueCollection

Parametreler

enumerationFlag
EnumeratedPrintQueueTypes[]

Koleksiyondaki yazdırma kuyruğu türlerini temsil eden bir değer dizisi.

Döndürülenler

PrintQueueCollection Yazdırma sunucusunda belirtilen türlerdeki yazdırma kuyruklarının sayısı.

Örnekler

Aşağıdaki örnekte, kullanılabilir yazdırma kuyruklarının bir alt kümesini almak için bu yöntemin nasıl kullanılacağı gösterilmektedir.

// Specify that the list will contain only the print queues that are installed as local and are shared
array<System::Printing::EnumeratedPrintQueueTypes>^ enumerationFlags = {EnumeratedPrintQueueTypes::Local,EnumeratedPrintQueueTypes::Shared};

LocalPrintServer^ printServer = gcnew LocalPrintServer();

//Use the enumerationFlags to filter out unwanted print queues
PrintQueueCollection^ printQueuesOnLocalServer = printServer->GetPrintQueues(enumerationFlags);

Console::WriteLine("These are your shared, local print queues:\n\n");

for each (PrintQueue^ printer in printQueuesOnLocalServer)
{
   Console::WriteLine("\tThe shared printer " + printer->Name + " is located at " + printer->Location + "\n");
}
Console::WriteLine("Press enter to continue.");
Console::ReadLine();
// Specify that the list will contain only the print queues that are installed as local and are shared
EnumeratedPrintQueueTypes[] enumerationFlags = {EnumeratedPrintQueueTypes.Local,
                                                EnumeratedPrintQueueTypes.Shared};

LocalPrintServer printServer = new LocalPrintServer();

//Use the enumerationFlags to filter out unwanted print queues
PrintQueueCollection printQueuesOnLocalServer = printServer.GetPrintQueues(enumerationFlags);

Console.WriteLine("These are your shared, local print queues:\n\n");

foreach (PrintQueue printer in printQueuesOnLocalServer)
{
    Console.WriteLine("\tThe shared printer " + printer.Name + " is located at " + printer.Location + "\n");
}
Console.WriteLine("Press enter to continue.");
Console.ReadLine();
' Specify that the list will contain only the print queues that are installed as local and are shared
Dim enumerationFlags() As EnumeratedPrintQueueTypes = {EnumeratedPrintQueueTypes.Local, EnumeratedPrintQueueTypes.Shared}

Dim printServer As New LocalPrintServer()

'Use the enumerationFlags to filter out unwanted print queues
Dim printQueuesOnLocalServer As PrintQueueCollection = printServer.GetPrintQueues(enumerationFlags)

Console.WriteLine("These are your shared, local print queues:" & vbLf & vbLf)

For Each printer As PrintQueue In printQueuesOnLocalServer
    Console.WriteLine(vbTab & "The shared printer " & printer.Name & " is located at " & printer.Location & vbLf)
Next printer
Console.WriteLine("Press enter to continue.")
Console.ReadLine()

Şunlara uygulanır

GetPrintQueues()

Yazdırma sunucusunun barındırır yazdırma kuyrukları koleksiyonunu alır.

public:
 System::Printing::PrintQueueCollection ^ GetPrintQueues();
public System.Printing.PrintQueueCollection GetPrintQueues ();
member this.GetPrintQueues : unit -> System.Printing.PrintQueueCollection
Public Function GetPrintQueues () As PrintQueueCollection

Döndürülenler

PrintQueueCollection Yazdırma sunucusundaki yazdırma kuyruklarının sayısı.

Örnekler

Aşağıdaki örnekte, tarafından barındırılan PrintServeryazdırma kuyruklarını listelemek için bu yöntemin nasıl kullanılacağı gösterilmektedir.


// Create a PrintServer
// "theServer" must be a print server to which the user has full print access.
PrintServer myPrintServer = new PrintServer(@"\\theServer");

// List the print server's queues
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
String printQueueNames = "My Print Queues:\n\n";
foreach (PrintQueue pq in myPrintQueues)
{
    printQueueNames += "\t" + pq.Name + "\n";
}
Console.WriteLine(printQueueNames);
Console.WriteLine("\nPress Return to continue.");
Console.ReadLine();

' Create a PrintServer
' "theServer" must be a print server to which the user has full print access.
Dim myPrintServer As New PrintServer("\\theServer")

' List the print server's queues
Dim myPrintQueues As PrintQueueCollection = myPrintServer.GetPrintQueues()
Dim printQueueNames As String = "My Print Queues:" & vbLf & vbLf
For Each pq As PrintQueue In myPrintQueues
    printQueueNames &= vbTab & pq.Name & vbLf
Next pq
Console.WriteLine(printQueueNames)
Console.WriteLine(vbLf & "Press Return to continue.")
Console.ReadLine()

Şunlara uygulanır

GetPrintQueues(PrintQueueIndexedProperty[])

Yazdırma sunucusu tarafından barındırılan ve yalnızca dizide PrintQueueIndexedProperty belirtilen özelliklerde başlatılan yazdırma kuyrukları koleksiyonunu alır.

public:
 System::Printing::PrintQueueCollection ^ GetPrintQueues(cli::array <System::Printing::PrintQueueIndexedProperty> ^ propertiesFilter);
public System.Printing.PrintQueueCollection GetPrintQueues (System.Printing.PrintQueueIndexedProperty[] propertiesFilter);
member this.GetPrintQueues : System.Printing.PrintQueueIndexedProperty[] -> System.Printing.PrintQueueCollection
Public Function GetPrintQueues (propertiesFilter As PrintQueueIndexedProperty()) As PrintQueueCollection

Parametreler

propertiesFilter
PrintQueueIndexedProperty[]

Oluşturucunun başlatmış olduğu özellikler.

Döndürülenler

PrintQueueCollection Üyeleri yalnızca tarafından propertiesFilterbelirtilen özelliklerde başlatılan bir.

Şunlara uygulanır