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
- ConnectionStringsSection.cs
- PropertyGrid.cs
- PassportPrincipal.cs
- TextSelectionHelper.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- CrossContextChannel.cs
- UpDownBase.cs
- SpecularMaterial.cs
- DbMetaDataCollectionNames.cs
- ThreadExceptionDialog.cs
- XmlSchemaAttributeGroupRef.cs
- PackWebResponse.cs
- CompiledQueryCacheEntry.cs
- securitycriticaldataClass.cs
- Range.cs
- AddInControllerImpl.cs
- IPAddressCollection.cs
- TableRowCollection.cs
- ColumnHeaderConverter.cs
- ProgressBarAutomationPeer.cs
- safelink.cs
- MultiSelectRootGridEntry.cs
- StringBuilder.cs
- ConfigXmlReader.cs
- CheckedPointers.cs
- TraceContextRecord.cs
- GlobalProxySelection.cs
- SerializationAttributes.cs
- SiteMapDataSource.cs
- BaseComponentEditor.cs
- Lock.cs
- Error.cs
- DataGridTextBoxColumn.cs
- LogEntry.cs
- FormsAuthenticationConfiguration.cs
- ConfigPathUtility.cs
- QueryExecutionOption.cs
- BitmapPalettes.cs
- XmlSchemaDatatype.cs
- DescendantOverDescendantQuery.cs
- CallTemplateAction.cs
- ContextMenuStripActionList.cs
- MemoryMappedFileSecurity.cs
- DataGridViewToolTip.cs
- UnsafeNativeMethods.cs
- RequestQueryParser.cs
- SingleAnimation.cs
- Helper.cs
- _Connection.cs
- ETagAttribute.cs
- SiteMapNode.cs
- CompModSwitches.cs
- WindowsContainer.cs
- TemplateParser.cs
- ContainerActivationHelper.cs
- ClientUrlResolverWrapper.cs
- WsatTransactionHeader.cs
- VirtualizingPanel.cs
- TerminateSequence.cs
- XsltLibrary.cs
- __ConsoleStream.cs
- DataBoundControlAdapter.cs
- RemoteWebConfigurationHost.cs
- QuestionEventArgs.cs
- DPAPIProtectedConfigurationProvider.cs
- BaseDataList.cs
- QueueProcessor.cs
- DataGridTable.cs
- TextUtf8RawTextWriter.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- WebBrowserBase.cs
- XmlEventCache.cs
- DataRowView.cs
- DocumentXPathNavigator.cs
- followingsibling.cs
- RuntimeCompatibilityAttribute.cs
- KeySplineConverter.cs
- NavigationPropertyEmitter.cs
- SystemNetHelpers.cs
- MetadataCacheItem.cs
- Zone.cs
- OpacityConverter.cs
- EntityCodeGenerator.cs
- FontSource.cs
- FontEmbeddingManager.cs
- TaskFileService.cs
- ReadContentAsBinaryHelper.cs
- XmlEntityReference.cs
- unsafeIndexingFilterStream.cs
- ToolStripItemEventArgs.cs
- XmlWriterTraceListener.cs
- AppLevelCompilationSectionCache.cs
- ContentType.cs
- LocalFileSettingsProvider.cs
- SAPICategories.cs
- CodeVariableDeclarationStatement.cs
- DrawingImage.cs
- DesignTimeVisibleAttribute.cs
- WebServiceFault.cs
- DSASignatureDeformatter.cs