Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- StyleBamlTreeBuilder.cs
- TrackingValidationObjectDictionary.cs
- StaticSiteMapProvider.cs
- DrawingAttributesDefaultValueFactory.cs
- FrugalMap.cs
- TypeKeyValue.cs
- DesignTimeParseData.cs
- CookieProtection.cs
- IdentityVerifier.cs
- ClusterRegistryConfigurationProvider.cs
- SafeBitVector32.cs
- Timer.cs
- TreeNodeBinding.cs
- WpfSharedBamlSchemaContext.cs
- WebPartZoneBase.cs
- SHA512CryptoServiceProvider.cs
- ExpressionWriter.cs
- DetailsViewAutoFormat.cs
- FontFaceLayoutInfo.cs
- ClientType.cs
- RtfControls.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- Assembly.cs
- XsltSettings.cs
- CacheRequest.cs
- ItemsControlAutomationPeer.cs
- BoundPropertyEntry.cs
- HttpListener.cs
- PrintDialog.cs
- XmlAggregates.cs
- TransformerInfoCollection.cs
- ManagedFilter.cs
- WorkflowRuntimeService.cs
- ActivityExecutorOperation.cs
- WorkflowInstanceSuspendedRecord.cs
- SmtpFailedRecipientsException.cs
- TreeIterator.cs
- ConfigurationValue.cs
- NativeCppClassAttribute.cs
- SqlUtil.cs
- ToggleButton.cs
- XmlEntityReference.cs
- TableHeaderCell.cs
- BackEase.cs
- DirtyTextRange.cs
- ControlIdConverter.cs
- CreateUserErrorEventArgs.cs
- ComboBoxRenderer.cs
- DrawingGroup.cs
- CFStream.cs
- SkewTransform.cs
- OdbcFactory.cs
- MimeTypeMapper.cs
- _AutoWebProxyScriptHelper.cs
- AlignmentYValidation.cs
- PropertyFilterAttribute.cs
- StreamGeometry.cs
- DateTimeOffsetAdapter.cs
- WebRequestModuleElement.cs
- DefaultTextStoreTextComposition.cs
- ConditionalDesigner.cs
- StyleCollection.cs
- JsonServiceDocumentSerializer.cs
- AssertUtility.cs
- DelegateBodyWriter.cs
- VisualBasicSettings.cs
- ExeContext.cs
- RequestCachePolicy.cs
- CodeSubDirectoriesCollection.cs
- StickyNote.cs
- ImageProxy.cs
- EmissiveMaterial.cs
- QuadraticBezierSegment.cs
- RecognitionEventArgs.cs
- ScriptMethodAttribute.cs
- DictionaryContent.cs
- SchemaImporter.cs
- Latin1Encoding.cs
- FontTypeConverter.cs
- WorkflowApplicationCompletedEventArgs.cs
- TextTreeRootNode.cs
- FieldAccessException.cs
- XmlSchemaImporter.cs
- DbConnectionInternal.cs
- ScriptingJsonSerializationSection.cs
- XmlUnspecifiedAttribute.cs
- DataSourceHelper.cs
- ConvertTextFrag.cs
- nulltextnavigator.cs
- BinaryWriter.cs
- OperatingSystem.cs
- ProvidePropertyAttribute.cs
- StaticSiteMapProvider.cs
- SQLBinary.cs
- FileLogRecord.cs
- ApplyTemplatesAction.cs
- DESCryptoServiceProvider.cs
- _UncName.cs
- Funcletizer.cs
- Metadata.cs