Code:
/ 4.0 / 4.0 / untmp / 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. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XPathNodeHelper.cs
- HttpNamespaceReservationInstallComponent.cs
- StrokeCollection2.cs
- PeerToPeerException.cs
- Rotation3DKeyFrameCollection.cs
- ExpressionBindingCollection.cs
- ISFTagAndGuidCache.cs
- COM2TypeInfoProcessor.cs
- BasicKeyConstraint.cs
- DataListItemEventArgs.cs
- WindowsListBox.cs
- shaperfactoryquerycacheentry.cs
- UriTemplateVariablePathSegment.cs
- ClientScriptManager.cs
- CounterSetInstanceCounterDataSet.cs
- FormatStringEditor.cs
- PlanCompilerUtil.cs
- MenuAdapter.cs
- ReferentialConstraintRoleElement.cs
- Int32AnimationUsingKeyFrames.cs
- Nodes.cs
- GAC.cs
- WebPartCatalogCloseVerb.cs
- PartialClassGenerationTaskInternal.cs
- PageCodeDomTreeGenerator.cs
- PingOptions.cs
- StateMachineAction.cs
- NameValueFileSectionHandler.cs
- BufferedWebEventProvider.cs
- ArrayTypeMismatchException.cs
- ADMembershipUser.cs
- WebBrowserDocumentCompletedEventHandler.cs
- TypeBuilderInstantiation.cs
- FixedPageStructure.cs
- complextypematerializer.cs
- handlecollector.cs
- OSFeature.cs
- PreviewControlDesigner.cs
- ComboBox.cs
- DesignerActionVerbItem.cs
- DataGridPageChangedEventArgs.cs
- EntityModelBuildProvider.cs
- Literal.cs
- SessionSwitchEventArgs.cs
- SHA512.cs
- DesignerSerializationManager.cs
- QilFunction.cs
- Scheduler.cs
- SynchronizingStream.cs
- SystemWebExtensionsSectionGroup.cs
- PathGeometry.cs
- unsafeIndexingFilterStream.cs
- HeaderedItemsControl.cs
- TableCellCollection.cs
- Decoder.cs
- AutomationAttributeInfo.cs
- FixedSOMLineCollection.cs
- IncrementalReadDecoders.cs
- WeakReferenceEnumerator.cs
- Stream.cs
- CompressedStack.cs
- XmlValidatingReaderImpl.cs
- ParameterModifier.cs
- Barrier.cs
- NewExpression.cs
- FillErrorEventArgs.cs
- SessionSwitchEventArgs.cs
- DbCommandDefinition.cs
- WebControl.cs
- NativeObjectSecurity.cs
- ErrorRuntimeConfig.cs
- ScalarOps.cs
- StrokeCollection2.cs
- BamlLocalizationDictionary.cs
- _NegotiateClient.cs
- Peer.cs
- Grant.cs
- ExpressionParser.cs
- TransactionManager.cs
- RectangleGeometry.cs
- unitconverter.cs
- Parameter.cs
- HttpListener.cs
- LogLogRecordEnumerator.cs
- TransferMode.cs
- securitycriticaldataClass.cs
- SelectionBorderGlyph.cs
- TrackingDataItem.cs
- DataGridViewHeaderCell.cs
- DataControlButton.cs
- KeysConverter.cs
- ScrollViewerAutomationPeer.cs
- SqlStream.cs
- AppDomainShutdownMonitor.cs
- FontNamesConverter.cs
- SHA1CryptoServiceProvider.cs
- SBCSCodePageEncoding.cs
- srgsitem.cs
- SizeChangedEventArgs.cs
- BitmapMetadataBlob.cs