public void RawKind_ReturnsExpected(int rawKind, PaperSourceKind expectedKind) { PaperSource ps = new PaperSource(); ps.RawKind = rawKind; Assert.Equal(expectedKind, ps.Kind); Assert.Equal(rawKind, ps.RawKind); }
// Constructor. internal PaperSource(PaperSourceKind kind, String name) { this.kind = kind; if (name == null) { this.name = kind.ToString(); } else { this.name = name; } }
// Internal state. // Constructor. internal PaperSource(PaperSourceKind kind, string name) { Kind = kind; if(name == null) { SourceName = kind.ToString(); } else { SourceName = name; } }
// Constructor. internal PaperSource(PaperSourceKind kind, String name) { this.kind = kind; if(name == null) { this.name = kind.ToString(); } else { this.name = name; } }
public void RawKind_Set_GetReturnsExpected(int value, PaperSourceKind expectedKind) { var source = new PaperSource { RawKind = value }; Assert.Equal(value, source.RawKind); Assert.Equal(expectedKind, source.Kind); // Set same. source.RawKind = value; Assert.Equal(value, source.RawKind); Assert.Equal(expectedKind, source.Kind); }
internal PaperSource(string sourceName, PaperSourceKind kind, bool isDefault) { this.source_name = sourceName; this.kind = kind; this.is_default = IsDefault; }
internal PaperSource(string sourceName, PaperSourceKind kind) { this.source_name = sourceName; this.kind = kind; }
private bool SetPaperSource(PrinterSettings pPrinterSettings, string pPaperSourceName, PaperSourceKind pKind, int pRawKind) { bool vPaperSourceFound = false; foreach (PaperSource vStockPaperSource in pPrinterSettings.PaperSources) { if ((vStockPaperSource.SourceName == pPaperSourceName) || (vStockPaperSource.Kind == pKind && vStockPaperSource.RawKind == pRawKind)) { vPaperSourceFound = true; pPrinterSettings.DefaultPageSettings.PaperSource = vStockPaperSource; break; } } return(vPaperSourceFound); }
// Get a standard paper source object. public static PaperSource GetStandardPaperSource(PaperSourceKind kind) { return new PaperSource(kind, null); }
internal PaperSource(PaperSourceKind kind, string name) { this.kind = kind; this.name = name; }
/// <include file='doc\PaperSource.uex' path='docs/doc[@for="PaperSource.PaperSource"]/*' /> /// <devdoc> /// <para> /// Initializes a new instance of the <see cref='System.Drawing.Printing.PaperSource'/> class with default properties. /// This constructor is required for the serialization of the <see cref='System.Drawing.Printing.PaperSource'/> class. /// </para> /// </devdoc> public PaperSource() { this.kind = PaperSourceKind.Custom; this.name = String.Empty; }
// Get a standard paper source object. public static PaperSource GetStandardPaperSource(PaperSourceKind kind) { return(new PaperSource(kind, null)); }
/// <summary> /// Initializes a new instance of the <see cref='PaperSource'/> class with default properties. /// </summary> public PaperSource() { _kind = PaperSourceKind.Custom; _name = string.Empty; }
internal PaperSource(PaperSourceKind kind, string name) { _kind = kind; _name = name; }