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
- DiscreteKeyFrames.cs
- FrameworkRichTextComposition.cs
- StateRuntime.cs
- BooleanKeyFrameCollection.cs
- XmlHierarchicalEnumerable.cs
- LocatorManager.cs
- FontFamilyConverter.cs
- XmlAttributeOverrides.cs
- TransformerConfigurationWizardBase.cs
- ThicknessKeyFrameCollection.cs
- RtfControls.cs
- StatusBar.cs
- AutomationProperties.cs
- Int16.cs
- UpdateCompiler.cs
- BinaryUtilClasses.cs
- iisPickupDirectory.cs
- Queue.cs
- RegularExpressionValidator.cs
- UriTemplateVariableQueryValue.cs
- NetworkInterface.cs
- CapacityStreamGeometryContext.cs
- GridViewDeleteEventArgs.cs
- FaultCallbackWrapper.cs
- AuthorizationRule.cs
- OLEDB_Util.cs
- ControlDesignerState.cs
- BamlWriter.cs
- XmlValueConverter.cs
- ResourcePart.cs
- SmiEventStream.cs
- PackagePartCollection.cs
- CalculatedColumn.cs
- Repeater.cs
- DbProviderSpecificTypePropertyAttribute.cs
- RelationshipFixer.cs
- SqlProfileProvider.cs
- XmlSortKeyAccumulator.cs
- CriticalExceptions.cs
- EnumType.cs
- GraphicsPath.cs
- AdRotator.cs
- PrinterSettings.cs
- TemplateEditingFrame.cs
- UpdatePanel.cs
- SettingsPropertyValue.cs
- SurrogateEncoder.cs
- InfoCardSymmetricAlgorithm.cs
- MetadataPropertyvalue.cs
- CommonObjectSecurity.cs
- UnsafeNativeMethods.cs
- Table.cs
- InheritanceContextHelper.cs
- TextRangeSerialization.cs
- ClientProxyGenerator.cs
- AssociationEndMember.cs
- serverconfig.cs
- DataGridViewLayoutData.cs
- DocumentAutomationPeer.cs
- RoutingUtilities.cs
- XmlAutoDetectWriter.cs
- XmlExtensionFunction.cs
- DesignerSerializerAttribute.cs
- SplineKeyFrames.cs
- base64Transforms.cs
- BatchParser.cs
- ToolBarButton.cs
- ServiceHttpModule.cs
- MemberAssignmentAnalysis.cs
- BitmapCodecInfo.cs
- Utils.cs
- SqlRewriteScalarSubqueries.cs
- SystemIcmpV4Statistics.cs
- ServiceNameElement.cs
- AssemblyAttributes.cs
- OptimizedTemplateContent.cs
- NullableConverter.cs
- DesignTimeParseData.cs
- EntityDescriptor.cs
- TextRange.cs
- Maps.cs
- ProcessHostFactoryHelper.cs
- XmlnsPrefixAttribute.cs
- TextLineResult.cs
- SapiGrammar.cs
- XmlSerializerFormatAttribute.cs
- WebScriptServiceHost.cs
- VerificationAttribute.cs
- RegexStringValidatorAttribute.cs
- Grant.cs
- Compress.cs
- OrElse.cs
- LoadedOrUnloadedOperation.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- DbModificationClause.cs
- GridViewSelectEventArgs.cs
- StorageBasedPackageProperties.cs
- ListViewSortEventArgs.cs
- Int64AnimationBase.cs
- HtmlControl.cs