Aracılığıyla paylaş


PaperSource Sınıf

Tanım

Yazıcının kağıdı aldığı kağıt tepsisini belirtir.

public ref class PaperSource
public class PaperSource
[System.Serializable]
public class PaperSource
type PaperSource = class
[<System.Serializable>]
type PaperSource = class
Public Class PaperSource
Devralma
PaperSource
Öznitelikler

Örnekler

Aşağıdaki kod örneği birleşik giriş kutusunu yazıcının desteklenen kağıt kaynaklarıyla doldurur comboPaperSource . SourceName, birleşik giriş kutusunun özelliği aracılığıyla DisplayMember eklenen öğenin görüntüleme dizesini sağlayan özellik olarak tanımlanır. Örnek, adlı printDoc bir değişkenin mevcut olmasını ve belirli birleşik PrintDocument giriş kutusunun mevcut olmasını gerektirir.

// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that will provide the display String*.
comboPaperSource->DisplayMember = "SourceName";
PaperSource^ pkSource;
for ( int i = 0; i < printDoc->PrinterSettings->PaperSources->Count; i++ )
{
   pkSource = printDoc->PrinterSettings->PaperSources[ i ];
   comboPaperSource->Items->Add( pkSource );
}
// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that will provide the display string.
comboPaperSource.DisplayMember="SourceName";

PaperSource pkSource;
for (int i = 0; i < printDoc.PrinterSettings.PaperSources.Count; i++){
    pkSource = printDoc.PrinterSettings.PaperSources[i];
    comboPaperSource.Items.Add(pkSource);
}
' Add list of paper sources found on the printer to the combo box.
' The DisplayMember property is used to identify the property that will provide the display string.
comboPaperSource.DisplayMember = "SourceName"

Dim pkSource As PaperSource
For i = 0 to printDoc.PrinterSettings.PaperSources.Count - 1
    pkSource = printDoc.PrinterSettings.PaperSources.Item(i)
    comboPaperSource.Items.Add(pkSource)
Next

Açıklamalar

Bu sınıf, ve PageSettings.PaperSource özellikleri tarafından PrinterSettings.PaperSources yazıcıda kullanılabilen kağıt kaynağı tepsilerini almak ve sırasıyla bir sayfanın kağıt kaynağını ayarlamak için kullanılır.

Yazdırma hakkında daha fazla bilgi için ad alanına genel bakış bölümüne System.Drawing.Printing bakın.

Oluşturucular

Name Description
PaperSource()

PaperSource sınıfının yeni bir örneğini başlatır.

Özellikler

Name Description
Kind

Kağıt kaynağını alır.

RawKind

Değerlerden birini veya özel bir değeri temsil eden tamsayıyı PaperSourceKind alır veya ayarlar.

SourceName

Kağıt kaynağının adını alır veya ayarlar.

Yöntemler

Name Description
Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()

Geçerli örneğin Type alır.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli Objectbasit bir kopyasını oluşturur.

(Devralındığı yer: Object)
ToString()

dize biçiminde hakkında PaperSource bilgi sağlar.

Şunlara uygulanır

Ayrıca bkz.