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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SimpleFieldTemplateFactory.cs
- DbDataRecord.cs
- WaitingCursor.cs
- UpDownEvent.cs
- Delegate.cs
- TreeNode.cs
- PermissionListSet.cs
- ImageBrush.cs
- MemberCollection.cs
- EditingMode.cs
- VariableBinder.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ClockGroup.cs
- WhereQueryOperator.cs
- HashMembershipCondition.cs
- SmtpMail.cs
- SequentialWorkflowRootDesigner.cs
- CorrelationManager.cs
- ColorConverter.cs
- KoreanLunisolarCalendar.cs
- MarkupExtensionParser.cs
- BaseDataBoundControl.cs
- TreeNodeBinding.cs
- LabelDesigner.cs
- BindingNavigator.cs
- ListViewDesigner.cs
- NamedObjectList.cs
- ClientBuildManager.cs
- SessionStateSection.cs
- DtdParser.cs
- MsmqInputChannelListenerBase.cs
- InstanceLockQueryResult.cs
- TypedTableHandler.cs
- PseudoWebRequest.cs
- DataGridViewCellValidatingEventArgs.cs
- UrlMapping.cs
- InvalidTimeZoneException.cs
- StatusBarPanel.cs
- GenerateTemporaryAssemblyTask.cs
- ConfigXmlText.cs
- CriticalFileToken.cs
- DataGridViewElement.cs
- DurableInstanceProvider.cs
- DelegatingConfigHost.cs
- Menu.cs
- UpdateRecord.cs
- SignedXml.cs
- DataSvcMapFile.cs
- TimeSpanHelper.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- FormattedText.cs
- XmlEncodedRawTextWriter.cs
- SimpleLine.cs
- ValidationRuleCollection.cs
- PenLineJoinValidation.cs
- EventMappingSettings.cs
- ItemType.cs
- unsafenativemethodstextservices.cs
- VectorAnimation.cs
- PropertyTabChangedEvent.cs
- CategoryNameCollection.cs
- DbDataRecord.cs
- FormsAuthenticationEventArgs.cs
- InputMethodStateChangeEventArgs.cs
- RotateTransform3D.cs
- SecurityToken.cs
- ConvertBinder.cs
- ConnectionPoint.cs
- BindableTemplateBuilder.cs
- StringResourceManager.cs
- AsymmetricSignatureFormatter.cs
- WizardPanel.cs
- AssemblyFilter.cs
- SoapExtensionTypeElement.cs
- ListBox.cs
- RadioButtonRenderer.cs
- XmlParserContext.cs
- PropertyPathConverter.cs
- ConfigurationStrings.cs
- SHA256Managed.cs
- ModelChangedEventArgsImpl.cs
- XmlAnyElementAttributes.cs
- DBSchemaRow.cs
- HtmlControlAdapter.cs
- RuntimeConfigLKG.cs
- AsyncOperation.cs
- XamlDesignerSerializationManager.cs
- LockedActivityGlyph.cs
- DateTimePickerDesigner.cs
- HttpCapabilitiesEvaluator.cs
- SequenceDesignerAccessibleObject.cs
- DropDownButton.cs
- RowUpdatedEventArgs.cs
- XPathNodeList.cs
- DescriptionAttribute.cs
- AuthenticationException.cs
- DbDataAdapter.cs
- QilUnary.cs
- RangeValueProviderWrapper.cs
- Assert.cs