Щелкните, чтобы оценить и отправить отзыв

  Включение просмотра при низкой пропускной способности канала
Библиотека классов платформы .NET Framework
PrintQueue..::.FullName - свойство

Обновлен: Ноябрь 2007

Возвращает полное имя очереди.

Пространство имен:  System.Printing
Сборка:  System.Printing (в System.Printing.dll)
Язык Visual Basic (Объявление)
Public ReadOnly Property FullName As String
Язык Visual Basic (Использование)
Dim instance As PrintQueue
Dim value As String

value = instance.FullName
Язык C#
public string FullName { get; }
Язык Visual C++
public:
property String^ FullName {
    String^ get ();
}
Язык J#
/** @property */
public String get_FullName()
Язык JScript
public function get FullName () : String

Значение свойства

Тип: System..::.String
Полное имя очереди печати.

У очередей печати на локальном сервере печати значение этого свойства идентично Name, в противном случае оно включает полное UNC-имя.

Объект PrintQueue также имеет доступные для записи свойства Name и ShareName.

В следующем примере показывается использование этого свойства при слиянии двух билетов на печать.

Язык C#
/// <summary>
/// Changes the user-default PrintTicket setting of the specified print queue.
/// </summary>
/// <param name="queue">the printer whose user-default PrintTicket setting needs to be changed</param>
static private void ChangePrintTicketSetting(PrintQueue queue)
{
    //
    // Obtain the printer's PrintCapabilities so we can determine whether or not
    // duplexing printing is supported by the printer.
    //
    PrintCapabilities printcap = queue.GetPrintCapabilities();

    //
    // The printer's duplexing capability is returned as a read-only collection of duplexing options
    // that can be supported by the printer. If the collection returned contains the duplexing
    // option we want to set, it means the duplexing option we want to set is supported by the printer,
    // so we can make the user-default PrintTicket setting change.
    //
    if (printcap.DuplexingCapability.Contains(Duplexing.TwoSidedLongEdge))
    {
        //
        // To change the user-default PrintTicket, we can first create a delta PrintTicket with
        // the new duplexing setting.
        //
        PrintTicket deltaTicket = new PrintTicket();
        deltaTicket.Duplexing = Duplexing.TwoSidedLongEdge;

        //
        // Then merge the delta PrintTicket onto the printer's current user-default PrintTicket,
        // and validate the merged PrintTicket to get the new PrintTicket we want to set as the
        // printer's new user-default PrintTicket.
        //
        ValidationResult result = queue.MergeAndValidatePrintTicket(queue.UserPrintTicket, deltaTicket);

        //
        // The duplexing option we want to set could be constrained by other PrintTicket settings
        // or device settings. We can check the validated merged PrintTicket to see whether the
        // the validation process has kept the duplexing option we want to set unchanged.
        //
        if (result.ValidatedPrintTicket.Duplexing == Duplexing.TwoSidedLongEdge)
        {
            //
            // Set the printer's user-default PrintTicket and commit the set operation.
            //
            queue.UserPrintTicket = result.ValidatedPrintTicket;
            queue.Commit();
            Console.WriteLine("PrintTicket new duplexing setting is set on '{0}'.", queue.FullName);
        }
        else
        {
            //
            // The duplexing option we want to set has been changed by the validation process
            // when it was resolving setting constraints.
            //
            Console.WriteLine("PrintTicket new duplexing setting is constrained on '{0}'.", queue.FullName);
        }
    }
    else
    {
        //
        // If the printer doesn't support the duplexing option we want to set, skip it.
        //
        Console.WriteLine("PrintTicket new duplexing setting is not supported on '{0}'.", queue.FullName);
    }
}

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

.NET Framework

Поддерживается в версиях: 3.5, 3.0
Содержимое Сообщества   Что такое «Содержимое сообщества»?
Добавить содержимое RSS  Примечания
Processing
© 2009 Microsoft Corporation. Все права защищены. Условия использования  |  Товарные знаки  |  Конфиденциальность
Page view tracker