Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. //------------------------------------------------------------------------------ ///// Provides some interesting information about the PaperSource in /// String form. /// ///// 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
- BitmapCodecInfo.cs
- IdentityNotMappedException.cs
- CompoundFileStreamReference.cs
- DataGridTableCollection.cs
- ExecutionContext.cs
- DrawingVisual.cs
- DataGridViewTopLeftHeaderCell.cs
- CultureSpecificStringDictionary.cs
- Base64Encoder.cs
- BitStack.cs
- DataKey.cs
- ResourceDisplayNameAttribute.cs
- DataExchangeServiceBinder.cs
- ItemCheckEvent.cs
- DiscriminatorMap.cs
- safelink.cs
- NoClickablePointException.cs
- X509ChainElement.cs
- httpserverutility.cs
- OleDbException.cs
- NativeMethods.cs
- Geometry.cs
- TraceHwndHost.cs
- WmpBitmapDecoder.cs
- IdleTimeoutMonitor.cs
- TextTreeTextElementNode.cs
- ApplicationFileParser.cs
- PostBackOptions.cs
- IfAction.cs
- StoreAnnotationsMap.cs
- Exceptions.cs
- EventLogPermissionAttribute.cs
- FixedPageProcessor.cs
- RenderDataDrawingContext.cs
- TableLayoutStyleCollection.cs
- StringUtil.cs
- Drawing.cs
- ImageSourceConverter.cs
- HtmlControlAdapter.cs
- SystemDiagnosticsSection.cs
- ActivityDesigner.cs
- RouteCollection.cs
- VolatileEnlistmentMultiplexing.cs
- OrderedDictionaryStateHelper.cs
- BoolExpressionVisitors.cs
- ObfuscationAttribute.cs
- Char.cs
- QilCloneVisitor.cs
- MenuEventArgs.cs
- WebPartChrome.cs
- VerificationAttribute.cs
- _UriSyntax.cs
- CookielessHelper.cs
- Trigger.cs
- BitConverter.cs
- TableCellCollection.cs
- CodeSnippetCompileUnit.cs
- NavigatorOutput.cs
- HttpListener.cs
- TimeManager.cs
- XmlSchemaSimpleContentExtension.cs
- XmlSchemaComplexContentRestriction.cs
- AdornerHitTestResult.cs
- LicenseProviderAttribute.cs
- CompoundFileReference.cs
- ShapeTypeface.cs
- MissingMemberException.cs
- XPathPatternParser.cs
- ConnectionProviderAttribute.cs
- SplineKeyFrames.cs
- SelectionPatternIdentifiers.cs
- RouteValueExpressionBuilder.cs
- StorageComplexPropertyMapping.cs
- ContainerUIElement3D.cs
- ToolStripDropDownClosingEventArgs.cs
- ECDiffieHellmanPublicKey.cs
- ClientScriptItem.cs
- AssociationType.cs
- CharKeyFrameCollection.cs
- IndentTextWriter.cs
- ElementHostPropertyMap.cs
- precedingsibling.cs
- TextBox.cs
- AppLevelCompilationSectionCache.cs
- XmlSchemaSimpleContentRestriction.cs
- Italic.cs
- XmlAttributeAttribute.cs
- ForceCopyBuildProvider.cs
- DataControlLinkButton.cs
- GatewayDefinition.cs
- OracleColumn.cs
- FilterEventArgs.cs
- Type.cs
- NonClientArea.cs
- Asn1IntegerConverter.cs
- SerializationInfoEnumerator.cs
- DataBindingValueUIHandler.cs
- HtmlTableRowCollection.cs
- httpserverutility.cs
- XamlTypeMapper.cs