Code:
/ DotNET / DotNET / 8.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
- TextDocumentView.cs
- CodeDirectionExpression.cs
- DependencyPropertyConverter.cs
- DragDropHelper.cs
- TypeReference.cs
- BufferCache.cs
- OracleConnectionStringBuilder.cs
- ipaddressinformationcollection.cs
- OutputScopeManager.cs
- WindowHideOrCloseTracker.cs
- CompensatableTransactionScopeActivityDesigner.cs
- _KerberosClient.cs
- FixedPageProcessor.cs
- Hash.cs
- Merger.cs
- _TLSstream.cs
- _FtpControlStream.cs
- SafeReversePInvokeHandle.cs
- ReadOnlyAttribute.cs
- TransformPattern.cs
- StylusPointCollection.cs
- OdbcConnectionStringbuilder.cs
- RichTextBoxAutomationPeer.cs
- XmlSchemaInferenceException.cs
- SchemaImporterExtensionsSection.cs
- ObjRef.cs
- InheritanceRules.cs
- PersistenceTypeAttribute.cs
- WriteLine.cs
- NameService.cs
- WebConfigurationHostFileChange.cs
- FrameworkObject.cs
- HttpListenerElement.cs
- selecteditemcollection.cs
- CredentialCache.cs
- CacheSection.cs
- TemplatingOptionsDialog.cs
- LinkArea.cs
- StringFormat.cs
- ThreadAbortException.cs
- SerializationException.cs
- FontCacheUtil.cs
- TextRangeProviderWrapper.cs
- SqlConnectionStringBuilder.cs
- Label.cs
- ReliableMessagingVersionConverter.cs
- DataContractSerializer.cs
- CompositeScriptReferenceEventArgs.cs
- ReceiveParametersContent.cs
- SpnegoTokenAuthenticator.cs
- SqlDataReaderSmi.cs
- Quad.cs
- Formatter.cs
- AuthenticationManager.cs
- SemanticResolver.cs
- SqlCacheDependencyDatabase.cs
- SyncOperationState.cs
- UmAlQuraCalendar.cs
- AnnotationHelper.cs
- DataGridPageChangedEventArgs.cs
- SelectionItemProviderWrapper.cs
- Facet.cs
- JoinTreeSlot.cs
- MaterialCollection.cs
- TrackingProfileSerializer.cs
- InvokePatternIdentifiers.cs
- XmlAttributeAttribute.cs
- _OverlappedAsyncResult.cs
- OpenFileDialog.cs
- GeneratedCodeAttribute.cs
- GlobalId.cs
- PropertyEntry.cs
- UriExt.cs
- ProfileManager.cs
- PropertyPathWorker.cs
- FrameworkElementFactoryMarkupObject.cs
- LogSwitch.cs
- ToolboxItemCollection.cs
- DesignTimeParseData.cs
- SQLInt32.cs
- ClientEventManager.cs
- FixedTextContainer.cs
- DataRelation.cs
- TextDecorationCollectionConverter.cs
- FrameSecurityDescriptor.cs
- QilInvoke.cs
- InputLanguage.cs
- ToolboxItemFilterAttribute.cs
- DrawingContext.cs
- WebProxyScriptElement.cs
- WebPartsPersonalizationAuthorization.cs
- RawStylusInput.cs
- XmlComplianceUtil.cs
- GridItemCollection.cs
- DataGridViewRowPostPaintEventArgs.cs
- KeyFrames.cs
- HttpDigestClientElement.cs
- FormsAuthenticationUser.cs
- ModelItemCollection.cs
- XslAstAnalyzer.cs