Code:
/ 4.0 / 4.0 / 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. /// ///// 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
- BinaryObjectReader.cs
- DbProviderFactoriesConfigurationHandler.cs
- XslTransformFileEditor.cs
- LocalizeDesigner.cs
- Directory.cs
- DebuggerAttributes.cs
- SqlExpressionNullability.cs
- WebContext.cs
- SQLResource.cs
- EventsTab.cs
- BamlResourceSerializer.cs
- UIPropertyMetadata.cs
- WebExceptionStatus.cs
- SHA512Cng.cs
- ScriptIgnoreAttribute.cs
- Parameter.cs
- Directory.cs
- WizardStepBase.cs
- MenuDesigner.cs
- TemplateColumn.cs
- SQLByte.cs
- SafeHandles.cs
- XsdDateTime.cs
- COM2IPerPropertyBrowsingHandler.cs
- While.cs
- InputBuffer.cs
- CodeObject.cs
- ReferenceConverter.cs
- DropShadowBitmapEffect.cs
- MediaCommands.cs
- SiteMapSection.cs
- SendActivityEventArgs.cs
- VisualBasicExpressionConverter.cs
- ListBindingHelper.cs
- FreezableOperations.cs
- StringInfo.cs
- hwndwrapper.cs
- SubqueryRules.cs
- _ListenerResponseStream.cs
- AssertSection.cs
- WorkflowServiceAttributes.cs
- DesignConnection.cs
- DataGridViewSelectedColumnCollection.cs
- EventSourceCreationData.cs
- NaturalLanguageHyphenator.cs
- KeyProperty.cs
- InheritedPropertyChangedEventArgs.cs
- HttpWebRequest.cs
- AlignmentYValidation.cs
- ImmutableObjectAttribute.cs
- DetailsViewPagerRow.cs
- PartialCachingControl.cs
- OdbcFactory.cs
- Nullable.cs
- AuthenticationModulesSection.cs
- FigureHelper.cs
- ScriptResourceInfo.cs
- _UriSyntax.cs
- OutKeywords.cs
- CounterSet.cs
- CheckedPointers.cs
- FileDataSourceCache.cs
- PropertyReference.cs
- PermissionSetTriple.cs
- PeerPresenceInfo.cs
- oledbmetadatacolumnnames.cs
- WebBrowserDocumentCompletedEventHandler.cs
- X509CertificateCollection.cs
- ResourceSetExpression.cs
- AssemblyResourceLoader.cs
- DataGridViewToolTip.cs
- CompositeClientFormatter.cs
- NotificationContext.cs
- InputReport.cs
- EdmMember.cs
- FixedSOMContainer.cs
- RadialGradientBrush.cs
- PathFigureCollectionValueSerializer.cs
- Trace.cs
- ColumnBinding.cs
- metadatamappinghashervisitor.cs
- GeneralTransform.cs
- BooleanProjectedSlot.cs
- OdbcCommandBuilder.cs
- SerializationInfoEnumerator.cs
- FormViewModeEventArgs.cs
- RadioButtonPopupAdapter.cs
- VisualTreeHelper.cs
- TransportManager.cs
- ControlBuilder.cs
- ToolbarAUtomationPeer.cs
- Rotation3DAnimation.cs
- BitmapEffectOutputConnector.cs
- HttpPostedFile.cs
- ByValueEqualityComparer.cs
- WriteTimeStream.cs
- CodeActivityMetadata.cs
- StringUtil.cs
- LinqDataSourceDisposeEventArgs.cs
- DiscoveryCallbackBehavior.cs