Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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. // Copyright (c) Microsoft Corporation. All rights reserved./// 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
- DataComponentMethodGenerator.cs
- XmlSchemaGroup.cs
- NetworkInterface.cs
- EntityTransaction.cs
- RelatedCurrencyManager.cs
- RecognizedAudio.cs
- VisualBasicValue.cs
- DesignerOptionService.cs
- UnsettableComboBox.cs
- StructuralObject.cs
- Content.cs
- MatrixKeyFrameCollection.cs
- SessionParameter.cs
- MembershipSection.cs
- XmlQueryOutput.cs
- MaterializeFromAtom.cs
- GeneratedCodeAttribute.cs
- X509Chain.cs
- WsdlWriter.cs
- RefreshPropertiesAttribute.cs
- ServiceProviders.cs
- UnicodeEncoding.cs
- QueuePathEditor.cs
- SplashScreen.cs
- ForwardPositionQuery.cs
- Knowncolors.cs
- WebPartConnectionsCancelEventArgs.cs
- ReachPageContentCollectionSerializerAsync.cs
- OperationPickerDialog.cs
- SafeCertificateContext.cs
- OptimalTextSource.cs
- ColumnPropertiesGroup.cs
- TiffBitmapEncoder.cs
- SortFieldComparer.cs
- HtmlInputText.cs
- CompressedStack.cs
- ThrowOnMultipleAssignment.cs
- ParameterToken.cs
- EntityStoreSchemaFilterEntry.cs
- UIHelper.cs
- TransportBindingElementImporter.cs
- EventLog.cs
- ResolveResponse.cs
- StateFinalizationDesigner.cs
- EntityContainerEntitySet.cs
- BorderGapMaskConverter.cs
- DataGridClipboardHelper.cs
- ModelUIElement3D.cs
- XPathSelectionIterator.cs
- SqlDataSourceCommandParser.cs
- XmlSchemaElement.cs
- HostingMessageProperty.cs
- CqlWriter.cs
- TabRenderer.cs
- RootBuilder.cs
- ShaperBuffers.cs
- OutputCacheModule.cs
- XmlSchemaAttributeGroupRef.cs
- Shape.cs
- RuntimeWrappedException.cs
- ObjectFullSpanRewriter.cs
- DoubleStorage.cs
- PropertyEntry.cs
- UserControlCodeDomTreeGenerator.cs
- XmlILConstructAnalyzer.cs
- GroupByExpressionRewriter.cs
- GridViewCommandEventArgs.cs
- TreeNodeCollection.cs
- CodeTypeParameter.cs
- baseaxisquery.cs
- ArrayWithOffset.cs
- ExpressionNode.cs
- ObjectDataSourceWizardForm.cs
- precedingquery.cs
- OperationCanceledException.cs
- DrawingVisualDrawingContext.cs
- IBuiltInEvidence.cs
- TextureBrush.cs
- ScrollPatternIdentifiers.cs
- DependencyObjectType.cs
- BevelBitmapEffect.cs
- RemotingAttributes.cs
- RegionInfo.cs
- DesignBindingPropertyDescriptor.cs
- SoapIncludeAttribute.cs
- SequentialUshortCollection.cs
- InArgumentConverter.cs
- ExtentCqlBlock.cs
- DBCommandBuilder.cs
- WindowsIdentity.cs
- DoubleMinMaxAggregationOperator.cs
- MediaPlayerState.cs
- HtmlImage.cs
- CodeArgumentReferenceExpression.cs
- StorageFunctionMapping.cs
- ArrayElementGridEntry.cs
- ToolBarOverflowPanel.cs
- HitTestDrawingContextWalker.cs
- XmlDomTextWriter.cs
- HandlerBase.cs