Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CommonUI / System / Drawing / Printing / PaperSource.cs / 1305376 / 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./// 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
- XmlArrayItemAttribute.cs
- SatelliteContractVersionAttribute.cs
- TargetControlTypeCache.cs
- RelativeSource.cs
- TranslateTransform.cs
- URL.cs
- PermissionSet.cs
- DataGridViewCellValidatingEventArgs.cs
- login.cs
- IgnoreDataMemberAttribute.cs
- TransportListener.cs
- DataGridViewColumnTypeEditor.cs
- RelationshipWrapper.cs
- FileNameEditor.cs
- CodePropertyReferenceExpression.cs
- WebPartCancelEventArgs.cs
- WebHttpEndpointElement.cs
- ContextQuery.cs
- MemberRelationshipService.cs
- PointAnimationUsingKeyFrames.cs
- HandleExceptionArgs.cs
- ListViewInsertedEventArgs.cs
- FieldNameLookup.cs
- OrderingQueryOperator.cs
- ServicesUtilities.cs
- control.ime.cs
- versioninfo.cs
- BlurBitmapEffect.cs
- WebControlsSection.cs
- BinaryConverter.cs
- SourceElementsCollection.cs
- Repeater.cs
- DbModificationCommandTree.cs
- util.cs
- Crc32.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- SetterBase.cs
- loginstatus.cs
- ExpressionVisitorHelpers.cs
- HttpWebRequestElement.cs
- BoundsDrawingContextWalker.cs
- MenuCommands.cs
- PropertyManager.cs
- IxmlLineInfo.cs
- PersonalizationStateInfoCollection.cs
- SqlComparer.cs
- Viewport3DVisual.cs
- ColumnHeaderConverter.cs
- WindowsStreamSecurityUpgradeProvider.cs
- DataGridViewDataErrorEventArgs.cs
- ListItemCollection.cs
- GreenMethods.cs
- ClientFormsIdentity.cs
- CopyNodeSetAction.cs
- BinaryCommonClasses.cs
- SerializationObjectManager.cs
- Rotation3DAnimation.cs
- DataGridViewAdvancedBorderStyle.cs
- WebPartsPersonalization.cs
- OdbcException.cs
- ValidationEventArgs.cs
- SelectionListComponentEditor.cs
- PrincipalPermission.cs
- ExecutionEngineException.cs
- SendingRequestEventArgs.cs
- PropertyDescriptor.cs
- Graphics.cs
- LifetimeMonitor.cs
- LexicalChunk.cs
- GroupBox.cs
- TreeViewDesigner.cs
- EventEntry.cs
- BinaryCommonClasses.cs
- DateTimeEditor.cs
- WebPartTransformerCollection.cs
- DefaultWorkflowLoaderService.cs
- TabItemAutomationPeer.cs
- Button.cs
- nulltextnavigator.cs
- DataSourceCacheDurationConverter.cs
- UnsafeNativeMethods.cs
- XmlSchemaInclude.cs
- XmlSiteMapProvider.cs
- CFStream.cs
- Variant.cs
- WebPartDescription.cs
- TimeStampChecker.cs
- Int32AnimationUsingKeyFrames.cs
- MemberCollection.cs
- NativeRecognizer.cs
- FileUpload.cs
- PrivateFontCollection.cs
- EventHandlersStore.cs
- EDesignUtil.cs
- IdnMapping.cs
- MimeMapping.cs
- CustomCategoryAttribute.cs
- RootBrowserWindowAutomationPeer.cs
- DateBoldEvent.cs
- SmiSettersStream.cs