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
- LayoutEvent.cs
- PropertyOverridesTypeEditor.cs
- OutputCacheProfileCollection.cs
- SiteOfOriginPart.cs
- DataSourceControl.cs
- _IPv6Address.cs
- Page.cs
- AnonymousIdentificationModule.cs
- DataControlImageButton.cs
- GroupBoxRenderer.cs
- SelectedGridItemChangedEvent.cs
- RbTree.cs
- SafeNativeMethods.cs
- Soap12ServerProtocol.cs
- ColumnHeader.cs
- ConnectionPointConverter.cs
- WorkflowPersistenceService.cs
- SecurityStateEncoder.cs
- StrokeNodeOperations2.cs
- IndexingContentUnit.cs
- COSERVERINFO.cs
- InstanceStoreQueryResult.cs
- ConsumerConnectionPointCollection.cs
- SmiMetaDataProperty.cs
- ExtendedPropertyDescriptor.cs
- _OSSOCK.cs
- CheckBoxList.cs
- XmlSchemaInclude.cs
- COM2ExtendedUITypeEditor.cs
- ListControl.cs
- SecurityTokenAuthenticator.cs
- TypeToArgumentTypeConverter.cs
- PassportIdentity.cs
- MatrixStack.cs
- MultipartContentParser.cs
- ToolStripSplitStackLayout.cs
- Debug.cs
- TypeBrowserDialog.cs
- RoutedPropertyChangedEventArgs.cs
- StopStoryboard.cs
- DesignerVerbCollection.cs
- AcceleratedTokenAuthenticator.cs
- GeneralTransform3D.cs
- BitmapEffectOutputConnector.cs
- COM2IDispatchConverter.cs
- CommandField.cs
- DataGridViewTopLeftHeaderCell.cs
- SafeEventLogWriteHandle.cs
- LongAverageAggregationOperator.cs
- _TransmitFileOverlappedAsyncResult.cs
- PeerInvitationResponse.cs
- DoubleConverter.cs
- DbConnectionPoolCounters.cs
- FocusManager.cs
- ListControl.cs
- SqlClientFactory.cs
- CodeSnippetCompileUnit.cs
- remotingproxy.cs
- ParenthesizePropertyNameAttribute.cs
- StylusButtonCollection.cs
- ReflectPropertyDescriptor.cs
- SharedStatics.cs
- SHA1Managed.cs
- ContextProperty.cs
- PropertyGridEditorPart.cs
- ModelFactory.cs
- Command.cs
- DbCommandTree.cs
- Roles.cs
- InternalResources.cs
- SHA256CryptoServiceProvider.cs
- EditingCoordinator.cs
- PointCollectionValueSerializer.cs
- ImmutableObjectAttribute.cs
- OracleCommand.cs
- SQLMoney.cs
- HttpChannelBindingToken.cs
- StartUpEventArgs.cs
- HandlerMappingMemo.cs
- DBConcurrencyException.cs
- CodeMethodInvokeExpression.cs
- LockCookie.cs
- SettingsAttributes.cs
- DbConnectionOptions.cs
- StringFreezingAttribute.cs
- StaticContext.cs
- ListSortDescription.cs
- SafeLibraryHandle.cs
- ClientFormsAuthenticationCredentials.cs
- RSAOAEPKeyExchangeDeformatter.cs
- WindowsAuthenticationModule.cs
- RegisteredHiddenField.cs
- XmlWriter.cs
- TextRunCacheImp.cs
- DataGridViewHeaderCell.cs
- SmiXetterAccessMap.cs
- DesignTimeTemplateParser.cs
- StructuredProperty.cs
- JpegBitmapDecoder.cs
- versioninfo.cs