Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- CellConstant.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- TimeEnumHelper.cs
- ReliabilityContractAttribute.cs
- TimelineGroup.cs
- SqlBulkCopyColumnMappingCollection.cs
- HttpDictionary.cs
- SecurityCapabilities.cs
- SharedStatics.cs
- HandlerBase.cs
- RequestTimeoutManager.cs
- ApplicationDirectoryMembershipCondition.cs
- SessionState.cs
- BitmapImage.cs
- ElementNotAvailableException.cs
- UserControlCodeDomTreeGenerator.cs
- ClockGroup.cs
- DeobfuscatingStream.cs
- Events.cs
- DurationConverter.cs
- XmlSchema.cs
- GraphicsContext.cs
- TemplateLookupAction.cs
- HyperLink.cs
- QilTypeChecker.cs
- SystemDropShadowChrome.cs
- Normalization.cs
- BookmarkList.cs
- PolyQuadraticBezierSegment.cs
- Vector3DIndependentAnimationStorage.cs
- GroupItemAutomationPeer.cs
- CTreeGenerator.cs
- SafeRegistryKey.cs
- _ListenerAsyncResult.cs
- DesignTimeParseData.cs
- SiteMapHierarchicalDataSourceView.cs
- PkcsUtils.cs
- EditorPart.cs
- UIntPtr.cs
- XmlHelper.cs
- BitmapEffectInputData.cs
- Win32PrintDialog.cs
- RTTypeWrapper.cs
- DynamicDocumentPaginator.cs
- FormsAuthenticationUserCollection.cs
- EntityProviderServices.cs
- SpecularMaterial.cs
- DataSourceCache.cs
- NotifyInputEventArgs.cs
- SqlErrorCollection.cs
- PropertySet.cs
- IPHostEntry.cs
- GZipDecoder.cs
- ImagingCache.cs
- Pool.cs
- OperatingSystem.cs
- SortedList.cs
- FormViewInsertedEventArgs.cs
- SetIndexBinder.cs
- _BufferOffsetSize.cs
- CLSCompliantAttribute.cs
- DataRowCollection.cs
- BitmapCacheBrush.cs
- UpdateProgress.cs
- SqlTopReducer.cs
- Repeater.cs
- PolyLineSegment.cs
- TextEndOfSegment.cs
- ArgumentValue.cs
- MailSettingsSection.cs
- ProgressPage.cs
- Drawing.cs
- RemoteWebConfigurationHostStream.cs
- Ops.cs
- DetailsViewInsertedEventArgs.cs
- SHA1Cng.cs
- WindowsServiceElement.cs
- SqlGenericUtil.cs
- validation.cs
- SecurityUtils.cs
- Html32TextWriter.cs
- EqualityComparer.cs
- CacheSection.cs
- RuntimeResourceSet.cs
- SerializationSectionGroup.cs
- RegistryPermission.cs
- QueryOutputWriterV1.cs
- WindowsFormsHost.cs
- RecommendedAsConfigurableAttribute.cs
- PerformanceCountersElement.cs
- InProcStateClientManager.cs
- EventMemberCodeDomSerializer.cs
- BulletDecorator.cs
- recordstatefactory.cs
- MetaTableHelper.cs
- ReaderWriterLockWrapper.cs
- DataTemplateSelector.cs
- ConnectionPoint.cs
- BuildDependencySet.cs
- StorageMappingFragment.cs