Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StateMachineAction.cs
- ScriptingJsonSerializationSection.cs
- NotifyParentPropertyAttribute.cs
- CoreChannel.cs
- PreservationFileReader.cs
- ButtonBase.cs
- TrackingDataItemValue.cs
- CurrentTimeZone.cs
- StateValidator.cs
- TemplateEditingFrame.cs
- DetailsViewRow.cs
- externdll.cs
- MailBnfHelper.cs
- EmptyEnumerator.cs
- DataGridViewRowEventArgs.cs
- ElementMarkupObject.cs
- ApplicationProxyInternal.cs
- StreamUpdate.cs
- XmlRawWriter.cs
- PageFunction.cs
- BooleanStorage.cs
- CompiledELinqQueryState.cs
- InputBinder.cs
- ReceiveCompletedEventArgs.cs
- GraphicsPathIterator.cs
- X509Certificate2.cs
- UpdatePanelControlTrigger.cs
- SizeLimitedCache.cs
- objectresult_tresulttype.cs
- PropertyGridCommands.cs
- LongTypeConverter.cs
- XmlProcessingInstruction.cs
- WindowsEditBoxRange.cs
- SQLResource.cs
- TextOnlyOutput.cs
- SQLDouble.cs
- _TLSstream.cs
- JpegBitmapDecoder.cs
- BufferedWebEventProvider.cs
- XsltConvert.cs
- XmlSerializer.cs
- WindowsFormsHelpers.cs
- ScrollProviderWrapper.cs
- InvalidComObjectException.cs
- DirectoryLocalQuery.cs
- StringAnimationUsingKeyFrames.cs
- Lease.cs
- SRGSCompiler.cs
- ListViewUpdateEventArgs.cs
- MultipartIdentifier.cs
- Misc.cs
- MDIClient.cs
- _AcceptOverlappedAsyncResult.cs
- ModelFactory.cs
- ComponentResourceKeyConverter.cs
- ConfigurationLocation.cs
- UserControlCodeDomTreeGenerator.cs
- XmlBoundElement.cs
- NonParentingControl.cs
- PagedDataSource.cs
- DataGridViewLinkColumn.cs
- InheritablePropertyChangeInfo.cs
- GridViewCommandEventArgs.cs
- TrailingSpaceComparer.cs
- ToolStripSeparator.cs
- ConcurrencyMode.cs
- TextEditorSpelling.cs
- SortedDictionary.cs
- ByteConverter.cs
- ObjectHelper.cs
- Scheduling.cs
- DragCompletedEventArgs.cs
- processwaithandle.cs
- CodeDefaultValueExpression.cs
- ReflectEventDescriptor.cs
- BitmapEffectDrawingContent.cs
- ManagedWndProcTracker.cs
- NumericUpDown.cs
- PathData.cs
- RenderCapability.cs
- DataGridViewCellStyleChangedEventArgs.cs
- TreeNodeStyle.cs
- ShutDownListener.cs
- MarshalDirectiveException.cs
- GraphicsPath.cs
- XmlSchemaCompilationSettings.cs
- HashSetEqualityComparer.cs
- RSAOAEPKeyExchangeDeformatter.cs
- TextEditorCharacters.cs
- MenuBindingsEditor.cs
- Policy.cs
- FontStretchConverter.cs
- Geometry3D.cs
- UnsafeNativeMethods.cs
- TextOutput.cs
- CLSCompliantAttribute.cs
- LightweightCodeGenerator.cs
- MergeFailedEvent.cs
- X509ChainElement.cs
- WsatTransactionFormatter.cs