Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CommonUI / System / Drawing / Printing / PaperSource.cs / 1 / PaperSource.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Drawing.Printing { using System.Runtime.Serialization.Formatters; using System.Runtime.InteropServices; using System.Diagnostics; using System; using System.Drawing; using System.ComponentModel; using Microsoft.Win32; ////// /// [Serializable] public class PaperSource { private string name; private PaperSourceKind kind; ////// Specifies the paper tray from which the printer gets paper. /// ////// /// public PaperSource() { this.kind = PaperSourceKind.Custom; this.name = String.Empty; } internal PaperSource(PaperSourceKind kind, string name) { this.kind = kind; this.name = name; } ////// Initializes a new instance of the ///class with default properties. /// This constructor is required for the serialization of the class. /// /// /// public PaperSourceKind Kind { get { if (((int) kind) >= SafeNativeMethods.DMBIN_USER) return PaperSourceKind.Custom; else return kind; } } ////// Gets /// a value indicating the type of paper source. /// /// ////// /// public int RawKind { get { return (int) kind; } set { kind = (PaperSourceKind) value; } } ////// Same as Kind, but values larger than DMBIN_USER do not map to PaperSourceKind.Custom. /// This property is needed for serialization of the PrinterSettings object. /// ////// /// public string SourceName { get { return name;} set { name = value; } } ////// Gets the name of the paper source. /// Setter is added for serialization of the PrinterSettings object. /// ////// /// /// public override string ToString() { return "[PaperSource " + SourceName + " Kind=" + TypeDescriptor.GetConverter(typeof(PaperSourceKind)).ConvertToString(Kind) + "]"; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Provides some interesting information about the PaperSource in /// String form. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListParagraph.cs
- AssemblyBuilder.cs
- userdatakeys.cs
- EventRouteFactory.cs
- OwnerDrawPropertyBag.cs
- PolyQuadraticBezierSegment.cs
- selecteditemcollection.cs
- ConsoleKeyInfo.cs
- CredentialCache.cs
- HttpHandlerActionCollection.cs
- FixedDocumentPaginator.cs
- BaseCollection.cs
- DetailsViewInsertEventArgs.cs
- ReverseInheritProperty.cs
- MSAANativeProvider.cs
- Msec.cs
- DbDataSourceEnumerator.cs
- PersonalizationStateQuery.cs
- mongolianshape.cs
- RowSpanVector.cs
- ExecutionTracker.cs
- GPPOINTF.cs
- SmtpReplyReader.cs
- AdCreatedEventArgs.cs
- DBPropSet.cs
- DeviceContext.cs
- Stack.cs
- SimplePropertyEntry.cs
- HttpCapabilitiesEvaluator.cs
- translator.cs
- SpellerStatusTable.cs
- SafeFileMappingHandle.cs
- Context.cs
- IntegerFacetDescriptionElement.cs
- WsatConfiguration.cs
- AsymmetricSignatureDeformatter.cs
- HandleTable.cs
- OutOfMemoryException.cs
- RowParagraph.cs
- StringSource.cs
- TransformPattern.cs
- Classification.cs
- DataSourceView.cs
- DocumentDesigner.cs
- DetailsViewPageEventArgs.cs
- BrowserCapabilitiesCodeGenerator.cs
- IssuanceLicense.cs
- TriggerBase.cs
- ScriptResourceMapping.cs
- QuestionEventArgs.cs
- FileDialog.cs
- NamespaceExpr.cs
- DatagridviewDisplayedBandsData.cs
- ConnectionPointGlyph.cs
- DataGridViewAccessibleObject.cs
- VirtualPathData.cs
- RelatedPropertyManager.cs
- SatelliteContractVersionAttribute.cs
- WebConfigurationFileMap.cs
- ReaderContextStackData.cs
- ChtmlCalendarAdapter.cs
- CompilationPass2Task.cs
- Overlapped.cs
- XmlDataSourceView.cs
- GACIdentityPermission.cs
- XmlDocumentViewSchema.cs
- ComponentEditorForm.cs
- TypeSystem.cs
- XmlDocumentType.cs
- EdmValidator.cs
- ForwardPositionQuery.cs
- EmptyReadOnlyDictionaryInternal.cs
- CellNormalizer.cs
- TraceHandlerErrorFormatter.cs
- StatusBarDrawItemEvent.cs
- CssClassPropertyAttribute.cs
- DescriptionAttribute.cs
- TriggerCollection.cs
- DataGridViewTopRowAccessibleObject.cs
- RewritingProcessor.cs
- Mutex.cs
- ConnectionStringsExpressionBuilder.cs
- ListenerChannelContext.cs
- CatalogPartCollection.cs
- SHA384.cs
- LinkClickEvent.cs
- Style.cs
- SqlUtils.cs
- TryExpression.cs
- StringValidatorAttribute.cs
- HandlerBase.cs
- SHA512.cs
- TableHeaderCell.cs
- WebPartAuthorizationEventArgs.cs
- XmlSchemaSimpleTypeList.cs
- Rect.cs
- Grant.cs
- XmlSchemaComplexType.cs
- Panel.cs
- ViewStateModeByIdAttribute.cs