Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- XmlComplianceUtil.cs
- IpcClientManager.cs
- XmlSchemaFacet.cs
- IPipelineRuntime.cs
- IndividualDeviceConfig.cs
- XmlElementAttributes.cs
- StructuredTypeInfo.cs
- SchemaTableColumn.cs
- BezierSegment.cs
- ToolTipService.cs
- Gdiplus.cs
- PolicyConversionContext.cs
- AdRotator.cs
- ICspAsymmetricAlgorithm.cs
- PropertyInfoSet.cs
- Thread.cs
- LoadGrammarCompletedEventArgs.cs
- SessionStateUtil.cs
- SubMenuStyle.cs
- ReliableOutputSessionChannel.cs
- StringResourceManager.cs
- Part.cs
- DbParameterHelper.cs
- XhtmlBasicTextViewAdapter.cs
- MultiTrigger.cs
- ThreadExceptionDialog.cs
- SmtpFailedRecipientException.cs
- BulletedList.cs
- DesigntimeLicenseContextSerializer.cs
- DataGridViewTopRowAccessibleObject.cs
- IriParsingElement.cs
- RenderData.cs
- InternalException.cs
- VScrollBar.cs
- TrackBarDesigner.cs
- TriggerAction.cs
- XmlAttributeOverrides.cs
- EdmSchemaAttribute.cs
- VisualBrush.cs
- RetrieveVirtualItemEventArgs.cs
- HtmlTitle.cs
- SessionStateItemCollection.cs
- HttpHandlersSection.cs
- LambdaCompiler.Unary.cs
- WeakReadOnlyCollection.cs
- ImageList.cs
- ScaleTransform.cs
- HitTestWithPointDrawingContextWalker.cs
- DependencyPropertyDescriptor.cs
- Int32CollectionValueSerializer.cs
- ArrayTypeMismatchException.cs
- CreateUserErrorEventArgs.cs
- X509ChainPolicy.cs
- FontDialog.cs
- ServiceModelConfigurationSectionCollection.cs
- MessageSmuggler.cs
- ImplicitInputBrush.cs
- CodeSnippetStatement.cs
- ColorMatrix.cs
- NamespaceList.cs
- StorageInfo.cs
- BindValidationContext.cs
- DelimitedListTraceListener.cs
- ContentOperations.cs
- CacheEntry.cs
- AvTraceFormat.cs
- NativeCppClassAttribute.cs
- EntityContainerAssociationSet.cs
- FormsAuthenticationUserCollection.cs
- SubqueryRules.cs
- PersonalizationAdministration.cs
- DataGridItemEventArgs.cs
- NativeObjectSecurity.cs
- ControlParameter.cs
- ResumeStoryboard.cs
- FragmentQueryProcessor.cs
- SchemaCollectionCompiler.cs
- StringPropertyBuilder.cs
- AdjustableArrowCap.cs
- CodeDOMProvider.cs
- ConfigXmlText.cs
- Stackframe.cs
- ElementProxy.cs
- Button.cs
- ButtonFieldBase.cs
- SerializationInfo.cs
- CommonGetThemePartSize.cs
- XPathParser.cs
- Blend.cs
- XmlSchemaException.cs
- QueryMatcher.cs
- HttpFileCollection.cs
- SlotInfo.cs
- MetaTableHelper.cs
- PngBitmapDecoder.cs
- WindowsBrush.cs
- UnicastIPAddressInformationCollection.cs
- DateTimeSerializationSection.cs
- HtmlTableCell.cs
- ClientData.cs