Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CommonUI / System / Drawing / Printing / PaperSource.cs / 1305376 / 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. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeBlockBuilder.cs
- sqlpipe.cs
- BeginStoryboard.cs
- StylusPointProperties.cs
- SqlMetaData.cs
- IntSecurity.cs
- CopyOnWriteList.cs
- ExpressionList.cs
- ComplexBindingPropertiesAttribute.cs
- VBIdentifierName.cs
- ShapingEngine.cs
- DeclarationUpdate.cs
- Axis.cs
- ByteStack.cs
- PartialCachingControl.cs
- PageWrapper.cs
- ExtensionSimplifierMarkupObject.cs
- IndicFontClient.cs
- ProfileParameter.cs
- MatcherBuilder.cs
- BypassElement.cs
- StringAttributeCollection.cs
- PinnedBufferMemoryStream.cs
- NetStream.cs
- IdnElement.cs
- TableCell.cs
- ProcessThreadCollection.cs
- RegionIterator.cs
- ComponentEvent.cs
- ScopelessEnumAttribute.cs
- NavigationProperty.cs
- BaseDataBoundControl.cs
- Mutex.cs
- SafeLocalMemHandle.cs
- ContentFileHelper.cs
- DocumentPageView.cs
- OutputCacheProfile.cs
- CodeAttributeDeclarationCollection.cs
- RepeatButton.cs
- DependentList.cs
- PlainXmlDeserializer.cs
- KeyInstance.cs
- XmlExpressionDumper.cs
- CodeRemoveEventStatement.cs
- AutomationAttributeInfo.cs
- ConfigurationSectionGroupCollection.cs
- Base64Decoder.cs
- RuleDefinitions.cs
- UIHelper.cs
- SafeSecurityHelper.cs
- DefaultValidator.cs
- SchemaImporter.cs
- ReadContentAsBinaryHelper.cs
- ProcessHostConfigUtils.cs
- EventLogConfiguration.cs
- ImpersonateTokenRef.cs
- CorrelationHandle.cs
- XamlWrapperReaders.cs
- Emitter.cs
- TypeConstant.cs
- OdbcEnvironmentHandle.cs
- Comparer.cs
- LabelEditEvent.cs
- ParamArrayAttribute.cs
- SafeBitVector32.cs
- ControlValuePropertyAttribute.cs
- FunctionQuery.cs
- XmlTextEncoder.cs
- SchemaTableOptionalColumn.cs
- Shape.cs
- NamedPipeWorkerProcess.cs
- _Events.cs
- StoreItemCollection.Loader.cs
- Table.cs
- ContextItem.cs
- ConnectionStringsExpressionBuilder.cs
- WebHttpDispatchOperationSelectorData.cs
- _Connection.cs
- PointLightBase.cs
- AsymmetricKeyExchangeDeformatter.cs
- MarkupCompilePass2.cs
- PathGradientBrush.cs
- XPathBuilder.cs
- OutgoingWebResponseContext.cs
- MasterPageCodeDomTreeGenerator.cs
- HtmlInputHidden.cs
- KeyToListMap.cs
- OleDbStruct.cs
- KeyFrames.cs
- ObjectDataSourceView.cs
- Perspective.cs
- DataRelation.cs
- ToolStripContentPanel.cs
- DockPattern.cs
- CultureTable.cs
- Set.cs
- ObjectRef.cs
- XhtmlConformanceSection.cs
- XPathPatternParser.cs
- RijndaelManagedTransform.cs