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
- DefaultPrintController.cs
- FigureParaClient.cs
- XNodeNavigator.cs
- GenerateScriptTypeAttribute.cs
- SystemIPv6InterfaceProperties.cs
- AliasedExpr.cs
- InternalReceiveMessage.cs
- KeyEventArgs.cs
- isolationinterop.cs
- XsltArgumentList.cs
- JulianCalendar.cs
- PolygonHotSpot.cs
- figurelength.cs
- FormatStringEditor.cs
- DecoderFallback.cs
- InternalResources.cs
- SecurityException.cs
- ExtenderProvidedPropertyAttribute.cs
- StateManager.cs
- OutputCacheSection.cs
- QueryOpcode.cs
- EntityDesignerBuildProvider.cs
- SqlWebEventProvider.cs
- X509CertificateCollection.cs
- TrustManager.cs
- contentDescriptor.cs
- COAUTHIDENTITY.cs
- X509Chain.cs
- XmlQueryRuntime.cs
- SafeViewOfFileHandle.cs
- ImageCodecInfo.cs
- SoapSchemaImporter.cs
- securitycriticaldataClass.cs
- FileUtil.cs
- ExpressionDumper.cs
- BadImageFormatException.cs
- ProfileEventArgs.cs
- ExpressionBindingCollection.cs
- SafeProcessHandle.cs
- DocumentPageTextView.cs
- MailSettingsSection.cs
- LinqDataSourceUpdateEventArgs.cs
- SqlMethodAttribute.cs
- MaskInputRejectedEventArgs.cs
- ExeContext.cs
- RegexStringValidator.cs
- ModifiableIteratorCollection.cs
- DetailsViewPageEventArgs.cs
- FontStyles.cs
- BevelBitmapEffect.cs
- TypeHelpers.cs
- DecoderExceptionFallback.cs
- PhysicalAddress.cs
- AppSettingsSection.cs
- FlagPanel.cs
- XPathDocumentIterator.cs
- ProfileBuildProvider.cs
- TrimSurroundingWhitespaceAttribute.cs
- LookupBindingPropertiesAttribute.cs
- DoubleLinkList.cs
- HashRepartitionEnumerator.cs
- PasswordRecoveryAutoFormat.cs
- Border.cs
- FeedUtils.cs
- RequestQueue.cs
- TimeSpanSecondsConverter.cs
- EditorBrowsableAttribute.cs
- ObfuscateAssemblyAttribute.cs
- UIElementParaClient.cs
- ListenerUnsafeNativeMethods.cs
- HTMLTextWriter.cs
- ComponentFactoryHelpers.cs
- WarningException.cs
- FaultFormatter.cs
- ConnectivityStatus.cs
- SchemaCollectionCompiler.cs
- LocalTransaction.cs
- MexServiceChannelBuilder.cs
- AssemblyName.cs
- SemanticBasicElement.cs
- TypeListConverter.cs
- HtmlInputText.cs
- TimeSpanValidatorAttribute.cs
- DataPagerFieldCommandEventArgs.cs
- RegularExpressionValidator.cs
- TableStyle.cs
- UnsafeNativeMethods.cs
- OpenFileDialog.cs
- MultiBinding.cs
- ObjectDataProvider.cs
- BaseTemplateCodeDomTreeGenerator.cs
- TimeoutValidationAttribute.cs
- AppSettingsReader.cs
- SettingsBindableAttribute.cs
- MultiBindingExpression.cs
- CellTreeNode.cs
- NumericUpDownAcceleration.cs
- OdbcPermission.cs
- XPathConvert.cs
- WebPartZone.cs