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
- TextBlockAutomationPeer.cs
- _Win32.cs
- HealthMonitoringSection.cs
- Visual3D.cs
- SelectorAutomationPeer.cs
- OperationCanceledException.cs
- OdbcConnectionPoolProviderInfo.cs
- ConfigurationProperty.cs
- translator.cs
- mil_commands.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ConfigurationException.cs
- TableLayoutStyleCollection.cs
- OdbcRowUpdatingEvent.cs
- SpellCheck.cs
- OracleSqlParser.cs
- RegionInfo.cs
- ProofTokenCryptoHandle.cs
- ServiceObjectContainer.cs
- HtmlElementEventArgs.cs
- ReflectionUtil.cs
- TreeNodeStyleCollection.cs
- XmlSignificantWhitespace.cs
- OpenTypeLayout.cs
- SAPICategories.cs
- FormatSettings.cs
- Int16Storage.cs
- Unit.cs
- DecimalSumAggregationOperator.cs
- TypeSystem.cs
- SemanticValue.cs
- PseudoWebRequest.cs
- PropertyValueChangedEvent.cs
- Rule.cs
- PrintDialogDesigner.cs
- TemplateControlParser.cs
- ColorBlend.cs
- NativeWindow.cs
- AppearanceEditorPart.cs
- Imaging.cs
- ServiceMemoryGates.cs
- XAMLParseException.cs
- PolicyStatement.cs
- X509IssuerSerialKeyIdentifierClause.cs
- SafePEFileHandle.cs
- NamespaceInfo.cs
- DirectoryObjectSecurity.cs
- ClientData.cs
- TripleDESCryptoServiceProvider.cs
- InvokeHandlers.cs
- ObjectStateEntryDbDataRecord.cs
- LayoutTable.cs
- ViewCellRelation.cs
- StylusPlugin.cs
- SmiEventSink_Default.cs
- StylusPointProperty.cs
- WindowsListViewGroupHelper.cs
- SqlRecordBuffer.cs
- AspCompat.cs
- TransformCollection.cs
- XmlSchemaAll.cs
- ErrorWrapper.cs
- WebPartCatalogAddVerb.cs
- HtmlAnchor.cs
- ControlAdapter.cs
- ScaleTransform3D.cs
- CompModSwitches.cs
- ExitEventArgs.cs
- SiteMapSection.cs
- XamlNamespaceHelper.cs
- XmlMemberMapping.cs
- ActiveDocumentEvent.cs
- MultiTouchSystemGestureLogic.cs
- ComboBox.cs
- RegexCode.cs
- ReversePositionQuery.cs
- AmbientProperties.cs
- EntityConnectionStringBuilder.cs
- RealizationContext.cs
- _OverlappedAsyncResult.cs
- SqlNotificationEventArgs.cs
- SafeCryptoHandles.cs
- relpropertyhelper.cs
- Vector.cs
- ContravarianceAdapter.cs
- OperatingSystem.cs
- PrinterUnitConvert.cs
- XamlPointCollectionSerializer.cs
- ApplicationSettingsBase.cs
- RuleCache.cs
- HashAlgorithm.cs
- SerializationSectionGroup.cs
- PeerNameRecordCollection.cs
- ListControl.cs
- PageDeviceFont.cs
- MarginsConverter.cs
- MetafileHeader.cs
- NotifyCollectionChangedEventArgs.cs
- WorkItem.cs
- ListViewTableRow.cs