Code:
/ FX-1434 / FX-1434 / 1.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
- DiscoveryServerProtocol.cs
- CreateSequenceResponse.cs
- InvalidDataException.cs
- UxThemeWrapper.cs
- GlobalProxySelection.cs
- HiddenFieldPageStatePersister.cs
- CopyCodeAction.cs
- HttpModuleAction.cs
- DNS.cs
- BoolExpr.cs
- AddInProcess.cs
- MultilineStringConverter.cs
- EntityCollectionChangedParams.cs
- Rectangle.cs
- AtlasWeb.Designer.cs
- StringComparer.cs
- HitTestFilterBehavior.cs
- PtsPage.cs
- SelectionItemPattern.cs
- PropertyEntry.cs
- SqlInternalConnectionTds.cs
- relpropertyhelper.cs
- ProtocolsConfigurationHandler.cs
- SafeLocalAllocation.cs
- QueryableDataSourceHelper.cs
- PrimitiveXmlSerializers.cs
- TreeNodeBinding.cs
- ContentTextAutomationPeer.cs
- FileUtil.cs
- DateTimeParse.cs
- DataTrigger.cs
- SiteMapHierarchicalDataSourceView.cs
- TableDesigner.cs
- AutoFocusStyle.xaml.cs
- ByeMessage11.cs
- MetadataCacheItem.cs
- translator.cs
- TableAutomationPeer.cs
- XmlRawWriter.cs
- AttributeCollection.cs
- CodeDirectionExpression.cs
- ButtonField.cs
- SystemBrushes.cs
- QilCloneVisitor.cs
- ComponentEditorPage.cs
- RegistryPermission.cs
- PreviewPageInfo.cs
- BindingGroup.cs
- WebPartAddingEventArgs.cs
- ToolBarButton.cs
- BrowserCapabilitiesCompiler.cs
- RadioButtonFlatAdapter.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- ObjectListSelectEventArgs.cs
- OleDbParameter.cs
- X509CertificateTrustedIssuerElementCollection.cs
- CssStyleCollection.cs
- SqlRowUpdatingEvent.cs
- DeclaredTypeElementCollection.cs
- XmlUnspecifiedAttribute.cs
- XmlImplementation.cs
- LineServicesRun.cs
- HtmlToClrEventProxy.cs
- NativeMethods.cs
- InertiaTranslationBehavior.cs
- CodePrimitiveExpression.cs
- ItemContainerProviderWrapper.cs
- StrongNameIdentityPermission.cs
- LoadedOrUnloadedOperation.cs
- Privilege.cs
- IncrementalReadDecoders.cs
- BindingNavigator.cs
- SingleKeyFrameCollection.cs
- ZoomingMessageFilter.cs
- XmlExpressionDumper.cs
- SharedPersonalizationStateInfo.cs
- DesignTimeTemplateParser.cs
- TcpHostedTransportConfiguration.cs
- TransformGroup.cs
- UnorderedHashRepartitionStream.cs
- SplitterEvent.cs
- LocalizationParserHooks.cs
- ErrorRuntimeConfig.cs
- AsyncResult.cs
- Rotation3D.cs
- SubclassTypeValidatorAttribute.cs
- SecurityUtils.cs
- PropertyRecord.cs
- ComplexObject.cs
- TableRowGroup.cs
- XmlDataSourceDesigner.cs
- followingsibling.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- ButtonFieldBase.cs
- ReliableSessionElement.cs
- _ConnectionGroup.cs
- DbTransaction.cs
- WindowsSecurityTokenAuthenticator.cs
- EditorZoneAutoFormat.cs
- AttributeUsageAttribute.cs