PrinterSettings.PaperSourceCollection 클래스

정의

PaperSource 개체의 컬렉션을 포함합니다.

public: ref class PrinterSettings::PaperSourceCollection : System::Collections::ICollection
public class PrinterSettings.PaperSourceCollection : System.Collections.ICollection
type PrinterSettings.PaperSourceCollection = class
    interface ICollection
    interface IEnumerable
Public Class PrinterSettings.PaperSourceCollection
Implements ICollection
상속
PrinterSettings.PaperSourceCollection
구현

예제

다음 코드 예제에서는 프린터의 comboPaperSource 지원되는 용지 원본으로 콤보 상자를 채웁니다. SourceName 콤보 상자의 속성을 통해 추가되는 항목에 대한 표시 문자열을 DisplayMember 제공하는 속성으로 식별됩니다. 이 예제에서는 명명 printDocPrintDocument 변수가 존재하고 특정 콤보 상자가 있어야 합니다.

// 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

설명

PrinterSettings.PaperSourceCollection 중 하나를 포함하는 속성을 통해 용지 원본 트레이를 PaperSource.Kind 나타내는 인스턴스를 PaperSourceKind 포함합니다PaperSource.

일반적으로 속성을 통해 페이지의 용지 원본을 PageSettings.PaperSource 컬렉션을 통해 사용할 수 있는 유효한 PaperSource 인스턴스로 PaperSources 설정합니다.

생성자

PrinterSettings.PaperSourceCollection(PaperSource[])

PrinterSettings.PaperSourceCollection 클래스의 새 인스턴스를 초기화합니다.

속성

Count

컬렉션에 있는 다른 용지 공급의 수를 가져옵니다.

Item[Int32]

지정된 인덱스에 해당하는 PaperSource을 가져옵니다.

메서드

Add(PaperSource)

지정된 PaperSourcePrinterSettings.PaperSourceCollection의 끝에 추가합니다.

CopyTo(PaperSource[], Int32)

지정된 인덱스에서 시작하여 현재 PrinterSettings.PaperSourceCollection의 내용을 지정된 배열에 복사합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetEnumerator()

컬렉션을 반복할 수 있는 열거자를 반환합니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

ICollection.CopyTo(Array, Int32)

이 멤버에 대한 설명은 CopyTo(Array, Int32)를 참조하세요.

ICollection.Count

이 멤버에 대한 설명은 Count를 참조하세요.

ICollection.IsSynchronized

이 멤버에 대한 설명은 IsSynchronized를 참조하세요.

ICollection.SyncRoot

이 멤버에 대한 설명은 SyncRoot를 참조하세요.

IEnumerable.GetEnumerator()

이 API는 제품 인프라를 지원하며 코드에서 직접 사용되지 않습니다.

이 멤버에 대한 설명은 GetEnumerator()를 참조하세요.

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상

추가 정보