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
- CodeValidator.cs
- MSAAEventDispatcher.cs
- exports.cs
- SymbolDocumentGenerator.cs
- ReflectionServiceProvider.cs
- ByteConverter.cs
- LogEntryDeserializer.cs
- InstanceView.cs
- SymbolUsageManager.cs
- CellConstantDomain.cs
- Tokenizer.cs
- DateTimeOffsetConverter.cs
- ToolStripOverflowButton.cs
- COM2ICategorizePropertiesHandler.cs
- XmlSchemaInfo.cs
- XmlSchemaChoice.cs
- COM2FontConverter.cs
- shaperfactory.cs
- autovalidator.cs
- SqlNotificationEventArgs.cs
- SystemDropShadowChrome.cs
- TableLayoutPanel.cs
- DataBoundLiteralControl.cs
- StorageInfo.cs
- HitTestResult.cs
- ImageSource.cs
- VisualBrush.cs
- SimpleHandlerBuildProvider.cs
- CharEntityEncoderFallback.cs
- DefaultCompensation.cs
- ListArgumentProvider.cs
- SingleResultAttribute.cs
- CodeArgumentReferenceExpression.cs
- MediaContext.cs
- ReliableMessagingVersionConverter.cs
- LocatorPart.cs
- base64Transforms.cs
- AuthStoreRoleProvider.cs
- RuntimeIdentifierPropertyAttribute.cs
- CoreSwitches.cs
- QilReference.cs
- ViewStateModeByIdAttribute.cs
- ChannelManager.cs
- CustomWebEventKey.cs
- Variable.cs
- HttpException.cs
- XmlTypeAttribute.cs
- MetabaseServerConfig.cs
- EnvironmentPermission.cs
- TimeStampChecker.cs
- MdiWindowListStrip.cs
- AddInProcess.cs
- SecurityResources.cs
- WindowVisualStateTracker.cs
- StreamGeometryContext.cs
- KeyValueSerializer.cs
- CurrentTimeZone.cs
- AnnotationHelper.cs
- Clock.cs
- PrincipalPermission.cs
- UidManager.cs
- BitmapEffectGroup.cs
- SerializerProvider.cs
- ProfileService.cs
- HandleCollector.cs
- RuntimeComponentFilter.cs
- ClaimComparer.cs
- ReachUIElementCollectionSerializerAsync.cs
- EntityDataSourceContextCreatedEventArgs.cs
- SwitchDesigner.xaml.cs
- ChangePassword.cs
- cookieexception.cs
- XmlQueryOutput.cs
- EmptyWithCancelationCheckWorkItem.cs
- RepeatInfo.cs
- ErrorFormatterPage.cs
- MetafileHeaderWmf.cs
- BeginSelectCardRequest.cs
- ProvidePropertyAttribute.cs
- MethodResolver.cs
- OwnerDrawPropertyBag.cs
- XPathDocumentBuilder.cs
- NativeRecognizer.cs
- MappedMetaModel.cs
- StrokeCollectionDefaultValueFactory.cs
- TagMapCollection.cs
- FakeModelPropertyImpl.cs
- Error.cs
- DefaultHttpHandler.cs
- DataChangedEventManager.cs
- EndEvent.cs
- DefaultPropertyAttribute.cs
- AmbientProperties.cs
- HandlerBase.cs
- TerminateWorkflow.cs
- HttpWebResponse.cs
- FrameworkContentElement.cs
- SafeFileMapViewHandle.cs
- TcpConnectionPoolSettings.cs
- CharacterHit.cs