Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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. // Copyright (c) Microsoft Corporation. All rights reserved./// 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
- InheritanceContextChangedEventManager.cs
- WebSysDescriptionAttribute.cs
- Site.cs
- XslCompiledTransform.cs
- HtmlControl.cs
- COAUTHIDENTITY.cs
- WpfPayload.cs
- GlyphRunDrawing.cs
- DrawingAttributeSerializer.cs
- Compiler.cs
- ServiceParser.cs
- OdbcDataReader.cs
- WizardForm.cs
- ControlBuilderAttribute.cs
- EntitySetBase.cs
- HttpCapabilitiesEvaluator.cs
- GifBitmapDecoder.cs
- PenThreadWorker.cs
- X509InitiatorCertificateServiceElement.cs
- ChannelToken.cs
- ProgressPage.cs
- TextOptionsInternal.cs
- HttpProfileGroupBase.cs
- LocalizationComments.cs
- SocketException.cs
- AnnotationObservableCollection.cs
- GraphicsPath.cs
- RegexBoyerMoore.cs
- ScalarConstant.cs
- ViewStateException.cs
- StrokeSerializer.cs
- AssemblyInfo.cs
- ToolStripComboBox.cs
- PaperSize.cs
- OutOfProcStateClientManager.cs
- CallbackHandler.cs
- _TransmitFileOverlappedAsyncResult.cs
- InvalidPrinterException.cs
- OutOfMemoryException.cs
- CollectionViewGroupInternal.cs
- DataServices.cs
- TextBoxRenderer.cs
- LocalizableAttribute.cs
- DataGridViewCellStyleConverter.cs
- RegexMatch.cs
- HelpKeywordAttribute.cs
- _LoggingObject.cs
- ModelVisual3D.cs
- WebHeaderCollection.cs
- FileDialog.cs
- MemoryRecordBuffer.cs
- LinqDataView.cs
- TCEAdapterGenerator.cs
- PointConverter.cs
- AsyncOperationLifetimeManager.cs
- RenderDataDrawingContext.cs
- DocComment.cs
- documentation.cs
- DockProviderWrapper.cs
- QilExpression.cs
- BuildResultCache.cs
- MemoryMappedViewAccessor.cs
- RewritingValidator.cs
- BoundingRectTracker.cs
- TransactionInterop.cs
- Region.cs
- GeneralTransform.cs
- SmiEventSink_Default.cs
- SimpleTypeResolver.cs
- CSharpCodeProvider.cs
- AuthStoreRoleProvider.cs
- DesignerDataConnection.cs
- ParenthesizePropertyNameAttribute.cs
- MatrixAnimationUsingKeyFrames.cs
- ExceptionRoutedEventArgs.cs
- BehaviorEditorPart.cs
- rsa.cs
- XmlnsCache.cs
- Timer.cs
- RankException.cs
- EastAsianLunisolarCalendar.cs
- RequiredFieldValidator.cs
- DataControlCommands.cs
- IgnoreSectionHandler.cs
- ListViewAutomationPeer.cs
- SqlComparer.cs
- MediaScriptCommandRoutedEventArgs.cs
- TypeListConverter.cs
- MediaElementAutomationPeer.cs
- EntityException.cs
- DiscoveryClientBindingElement.cs
- SharedConnectionWorkflowTransactionService.cs
- StatusBarPanelClickEvent.cs
- RoleGroupCollection.cs
- CustomGrammar.cs
- SecurityImpersonationBehavior.cs
- FormViewInsertedEventArgs.cs
- WebScriptServiceHost.cs
- SystemIcmpV4Statistics.cs
- NamedPermissionSet.cs