Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- HttpListenerPrefixCollection.cs
- QilGenerator.cs
- SqlConnectionStringBuilder.cs
- DataGridPagingPage.cs
- QueryLifecycle.cs
- NavigationService.cs
- DependencySource.cs
- UserPersonalizationStateInfo.cs
- _AutoWebProxyScriptEngine.cs
- RtfNavigator.cs
- FilteredAttributeCollection.cs
- StateElementCollection.cs
- PenThreadWorker.cs
- HttpApplicationFactory.cs
- AmbiguousMatchException.cs
- _HTTPDateParse.cs
- ToolStripRendererSwitcher.cs
- ClaimComparer.cs
- BaseUriWithWildcard.cs
- DataGridViewTextBoxCell.cs
- RoleService.cs
- PageFunction.cs
- MediaContextNotificationWindow.cs
- SystemIPInterfaceProperties.cs
- ContentDisposition.cs
- SecurityBindingElement.cs
- BitSet.cs
- WebPartHelpVerb.cs
- ObjectListGeneralPage.cs
- XmlSubtreeReader.cs
- CharacterString.cs
- LogoValidationException.cs
- BitmapEffectrendercontext.cs
- TimeIntervalCollection.cs
- Latin1Encoding.cs
- NamespaceQuery.cs
- NoClickablePointException.cs
- SpecularMaterial.cs
- WebPartMenu.cs
- FunctionCommandText.cs
- BindToObject.cs
- DataTemplate.cs
- Matrix.cs
- IconConverter.cs
- ExpandedWrapper.cs
- CalendarData.cs
- InstalledVoice.cs
- Preprocessor.cs
- DataGridViewRowsRemovedEventArgs.cs
- WsatTransactionHeader.cs
- TableRow.cs
- DesignerForm.cs
- ContentControl.cs
- ipaddressinformationcollection.cs
- KeyBinding.cs
- PassportPrincipal.cs
- ExpressionBindingsDialog.cs
- Rotation3DAnimationBase.cs
- DeferredBinaryDeserializerExtension.cs
- RecipientInfo.cs
- CompoundFileDeflateTransform.cs
- SharedDp.cs
- ResourceManagerWrapper.cs
- ReaderWriterLock.cs
- DropShadowBitmapEffect.cs
- ConnectionStringsExpressionBuilder.cs
- StyleXamlParser.cs
- UnsafeNativeMethods.cs
- LZCodec.cs
- UInt32Storage.cs
- Registration.cs
- ConstraintCollection.cs
- SamlAuthorityBinding.cs
- CellConstantDomain.cs
- SocketException.cs
- BuildManager.cs
- HighlightVisual.cs
- ServicePointManager.cs
- WebServiceErrorEvent.cs
- DrawingCollection.cs
- DataService.cs
- DataGridViewLinkColumn.cs
- ModelProperty.cs
- LabelExpression.cs
- XmlSerializer.cs
- AssemblyEvidenceFactory.cs
- ListViewDataItem.cs
- ThreadAttributes.cs
- BehaviorEditorPart.cs
- DataSourceXmlClassAttribute.cs
- TriggerCollection.cs
- HttpRawResponse.cs
- WizardForm.cs
- WebPartCatalogCloseVerb.cs
- PackageRelationshipCollection.cs
- ExpressionVisitor.cs
- EventArgs.cs
- AddInAdapter.cs
- ModelTreeEnumerator.cs
- CleanUpVirtualizedItemEventArgs.cs