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
- WorkflowWebHostingModule.cs
- RbTree.cs
- SqlAliasesReferenced.cs
- QueryRelOp.cs
- DBCSCodePageEncoding.cs
- ReflectPropertyDescriptor.cs
- MemberDescriptor.cs
- Parameter.cs
- NodeFunctions.cs
- RefExpr.cs
- FormsAuthenticationCredentials.cs
- TreeNodeConverter.cs
- SiteMapNodeCollection.cs
- SettingsAttributes.cs
- LocatorPartList.cs
- SymLanguageType.cs
- ACL.cs
- SqlFactory.cs
- ColumnCollectionEditor.cs
- HttpContext.cs
- DocumentViewerBaseAutomationPeer.cs
- DriveNotFoundException.cs
- SqlDataReader.cs
- NestedContainer.cs
- DescendantQuery.cs
- FormViewInsertEventArgs.cs
- _HeaderInfo.cs
- EventLogStatus.cs
- EventLogEntry.cs
- WebPartsPersonalizationAuthorization.cs
- ToolBarTray.cs
- CompilerTypeWithParams.cs
- AnonymousIdentificationModule.cs
- DocumentReferenceCollection.cs
- BooleanFunctions.cs
- ObfuscationAttribute.cs
- NullRuntimeConfig.cs
- AuthorizationRule.cs
- OleDbError.cs
- TextRangeAdaptor.cs
- FormClosedEvent.cs
- RedirectionProxy.cs
- GeometryValueSerializer.cs
- DaylightTime.cs
- MetadataArtifactLoaderComposite.cs
- SiteMapNodeItem.cs
- ExpressionHelper.cs
- DataGridComponentEditor.cs
- TextEffect.cs
- ListSortDescriptionCollection.cs
- View.cs
- DrawingCollection.cs
- uribuilder.cs
- SystemDiagnosticsSection.cs
- TextSelectionHighlightLayer.cs
- RichTextBoxAutomationPeer.cs
- EmptyCollection.cs
- OpCellTreeNode.cs
- DataRow.cs
- RecipientInfo.cs
- DataRowComparer.cs
- LinqDataSourceSelectEventArgs.cs
- ExpressionBinding.cs
- XmlTypeAttribute.cs
- BinaryNode.cs
- ContentElementAutomationPeer.cs
- SimpleWorkerRequest.cs
- SqlInternalConnection.cs
- SerializerWriterEventHandlers.cs
- ApplicationInterop.cs
- CollectionViewSource.cs
- SecurityResources.cs
- HostingPreferredMapPath.cs
- _KerberosClient.cs
- StatusBarPanelClickEvent.cs
- SqlNamer.cs
- SpnEndpointIdentity.cs
- HttpRuntimeSection.cs
- XmlSchemaSubstitutionGroup.cs
- EntityDataSourceReferenceGroup.cs
- ContextStaticAttribute.cs
- KeyFrames.cs
- ToolStrip.cs
- TracingConnectionInitiator.cs
- DataBindingCollection.cs
- DivideByZeroException.cs
- MeshGeometry3D.cs
- WindowHelperService.cs
- SessionStateModule.cs
- EndEvent.cs
- ScopelessEnumAttribute.cs
- DelayedRegex.cs
- HtmlInputControl.cs
- BindableTemplateBuilder.cs
- RuntimeArgument.cs
- SizeConverter.cs
- GlobalDataBindingHandler.cs
- BamlLocalizationDictionary.cs
- DrawingBrush.cs
- XmlSerializationReader.cs