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
- StyleCollection.cs
- Lazy.cs
- WebPartConnectionCollection.cs
- TimeSpanValidator.cs
- OpCodes.cs
- StatusBar.cs
- ReturnEventArgs.cs
- CreateUserErrorEventArgs.cs
- ViewGenerator.cs
- ThemeableAttribute.cs
- ViewEvent.cs
- SmtpLoginAuthenticationModule.cs
- EntityDataSourceState.cs
- RectAnimation.cs
- SqlProviderManifest.cs
- BinaryEditor.cs
- ModuleBuilder.cs
- XmlUtf8RawTextWriter.cs
- ComponentSerializationService.cs
- SelectionUIHandler.cs
- IDispatchConstantAttribute.cs
- ParentQuery.cs
- Rights.cs
- EditingCoordinator.cs
- _AutoWebProxyScriptEngine.cs
- IsolatedStorageFileStream.cs
- XmlSchemaComplexType.cs
- SourceItem.cs
- SelectedGridItemChangedEvent.cs
- UnsafeNativeMethodsTablet.cs
- UserControlParser.cs
- WorkflowClientDeliverMessageWrapper.cs
- CultureInfoConverter.cs
- ExpandableObjectConverter.cs
- IgnoreFlushAndCloseStream.cs
- HostedTcpTransportManager.cs
- TagMapCollection.cs
- DecodeHelper.cs
- TypeValidationEventArgs.cs
- followingquery.cs
- ScanQueryOperator.cs
- TextBoxLine.cs
- PackagePartCollection.cs
- DrawItemEvent.cs
- KeyValuePairs.cs
- DetailsViewDeletedEventArgs.cs
- WsatProxy.cs
- InvokeMethodActivity.cs
- CodeSubDirectoriesCollection.cs
- CaseInsensitiveHashCodeProvider.cs
- Trace.cs
- RuntimeArgument.cs
- ComponentResourceKey.cs
- CompositeDataBoundControl.cs
- FacetChecker.cs
- InternalDuplexBindingElement.cs
- MatrixUtil.cs
- Assembly.cs
- InputEventArgs.cs
- ParenthesizePropertyNameAttribute.cs
- HtmlListAdapter.cs
- TokenizerHelper.cs
- LinqDataSourceContextEventArgs.cs
- MenuCommandService.cs
- AttachmentCollection.cs
- ReceiveContent.cs
- ChannelSinkStacks.cs
- DiscardableAttribute.cs
- WebSysDescriptionAttribute.cs
- ArrayList.cs
- RegexNode.cs
- XmlDocumentViewSchema.cs
- Speller.cs
- DaylightTime.cs
- DbException.cs
- ObjectCacheHost.cs
- Single.cs
- StringFunctions.cs
- CatalogZoneBase.cs
- DataGridViewEditingControlShowingEventArgs.cs
- GeometryValueSerializer.cs
- EtwTrackingBehaviorElement.cs
- CalendarBlackoutDatesCollection.cs
- XamlToRtfWriter.cs
- LoginDesignerUtil.cs
- TextEffect.cs
- RTLAwareMessageBox.cs
- UInt16Storage.cs
- EdmProviderManifest.cs
- StorageMappingItemLoader.cs
- PeerCredential.cs
- Double.cs
- UIElementAutomationPeer.cs
- EventLogEntryCollection.cs
- WrappedKeySecurityTokenParameters.cs
- Constraint.cs
- Rectangle.cs
- WebResourceAttribute.cs
- WebPermission.cs
- GetPageNumberCompletedEventArgs.cs