PaperSource Osztály
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Megadja azt a papírtálcát, amelyből a nyomtató papírt kap.
public ref class PaperSource
public class PaperSource
[System.Serializable]
public class PaperSource
type PaperSource = class
[<System.Serializable>]
type PaperSource = class
Public Class PaperSource
- Öröklődés
-
PaperSource
- Attribútumok
Példák
Az alábbi példakód kitölti a comboPaperSource kombinált listát a nyomtató támogatott papírforrásaival. Az SourceName azonosító az a tulajdonság, amely a kombinált lista tulajdonságán keresztül adja meg a DisplayMember hozzáadott elem megjelenítési sztringjét. A példa megköveteli, hogy létezik egy PrintDocument névvel ellátott printDoc változó, és hogy az adott kombinált lista létezik.
// 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
Megjegyzések
Ezt az osztályt és PrinterSettings.PaperSources tulajdonságokat használja PageSettings.PaperSource a nyomtatón elérhető papírforrás tálcáinak lekérésére, illetve a lap papírforrásának beállítására.
A nyomtatással kapcsolatos további információkért tekintse meg a System.Drawing.Printing névtér áttekintését.
Konstruktorok
| Name | Description |
|---|---|
| PaperSource() |
Inicializálja a PaperSource osztály új példányát. |
Tulajdonságok
| Name | Description |
|---|---|
| Kind |
Lekéri a papírforrást. |
| RawKind |
Lekéri vagy beállítja az egyik PaperSourceKind értéket vagy egyéni értéket képviselő egész számot. |
| SourceName |
Lekéri vagy beállítja a papírforrás nevét. |
Metódusok
| Name | Description |
|---|---|
| Equals(Object) |
Meghatározza, hogy a megadott objektum egyenlő-e az aktuális objektummal. (Öröklődés forrása Object) |
| GetHashCode() |
Ez az alapértelmezett kivonatoló függvény. (Öröklődés forrása Object) |
| GetType() |
Lekéri az Type aktuális példányt. (Öröklődés forrása Object) |
| MemberwiseClone() |
Az aktuális Objectpéldány sekély másolatát hozza létre. (Öröklődés forrása Object) |
| ToString() |
Információt nyújt a sztringben PaperSource lévő űrlapról. |