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
- DependencyPropertyChangedEventArgs.cs
- WindowsHyperlink.cs
- TextElementEnumerator.cs
- ObjectQueryProvider.cs
- SystemWebExtensionsSectionGroup.cs
- Latin1Encoding.cs
- TransformerTypeCollection.cs
- RegexCode.cs
- PageRequestManager.cs
- Visual3DCollection.cs
- PeerPresenceInfo.cs
- DateTimeSerializationSection.cs
- EdmToObjectNamespaceMap.cs
- DataGridViewRowStateChangedEventArgs.cs
- PersonalizationEntry.cs
- WindowsImpersonationContext.cs
- BinaryConverter.cs
- TextTrailingCharacterEllipsis.cs
- SqlConnectionFactory.cs
- Substitution.cs
- ResourceKey.cs
- OpCodes.cs
- XamlToRtfWriter.cs
- WebBrowserEvent.cs
- SqlXml.cs
- ExplicitDiscriminatorMap.cs
- WebPartAuthorizationEventArgs.cs
- RequestCacheValidator.cs
- DataGridCellAutomationPeer.cs
- LayoutEditorPart.cs
- _UriSyntax.cs
- PackageDigitalSignature.cs
- FileDialogCustomPlacesCollection.cs
- TcpSocketManager.cs
- PackageRelationshipCollection.cs
- SatelliteContractVersionAttribute.cs
- WindowsTokenRoleProvider.cs
- MultilineStringEditor.cs
- SpanIndex.cs
- TreeViewCancelEvent.cs
- StateFinalizationActivity.cs
- RadioButtonAutomationPeer.cs
- DataGridViewButtonCell.cs
- _NegoStream.cs
- TraceSection.cs
- CodeSubDirectory.cs
- PasswordDeriveBytes.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- DataGridViewAdvancedBorderStyle.cs
- Debug.cs
- ResourcesChangeInfo.cs
- DiffuseMaterial.cs
- MaskedTextProvider.cs
- BitmapCodecInfo.cs
- MediaElementAutomationPeer.cs
- Debug.cs
- RowUpdatingEventArgs.cs
- Utils.cs
- CapabilitiesState.cs
- XmlSchemaObject.cs
- JsonEnumDataContract.cs
- ADMembershipProvider.cs
- DecoratedNameAttribute.cs
- DirectionalLight.cs
- SafeFileMappingHandle.cs
- MainMenu.cs
- WebReference.cs
- AnnouncementInnerClient11.cs
- ReadOnlyDictionary.cs
- MethodAccessException.cs
- TypeCodeDomSerializer.cs
- FreezableCollection.cs
- IISMapPath.cs
- WebPart.cs
- __FastResourceComparer.cs
- TextElementEnumerator.cs
- OleDbPermission.cs
- XmlSchemaComplexType.cs
- DesignerValidatorAdapter.cs
- UrlPath.cs
- CssStyleCollection.cs
- HttpProfileGroupBase.cs
- MatchAttribute.cs
- MaterialCollection.cs
- JapaneseLunisolarCalendar.cs
- CodeConditionStatement.cs
- LayoutEditorPart.cs
- StringCollection.cs
- ApplicationSecurityInfo.cs
- SoapObjectWriter.cs
- XamlReader.cs
- cookiecontainer.cs
- DataGridViewUtilities.cs
- _HTTPDateParse.cs
- ByteStreamGeometryContext.cs
- GridView.cs
- SpinLock.cs
- HtmlShim.cs
- CookieParameter.cs
- FormatConvertedBitmap.cs