Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / ComponentModel / COM2Interop / COM2ExtendedUITypeEditor.cs / 1 / COM2ExtendedUITypeEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Drawing.Design.Com2ExtendedUITypeEditor..ctor(System.Type)")] /* */ namespace System.Drawing.Design { using System.Diagnostics; using System.Collections; using Microsoft.Win32; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing; using System.Drawing.Design; ////// /// /// internal class Com2ExtendedUITypeEditor : UITypeEditor { private UITypeEditor innerEditor; public Com2ExtendedUITypeEditor(UITypeEditor baseTypeEditor) { this.innerEditor = baseTypeEditor; } public Com2ExtendedUITypeEditor(Type baseType) { this.innerEditor = (UITypeEditor)TypeDescriptor.GetEditor(baseType, typeof(UITypeEditor)); } public UITypeEditor InnerEditor { get { return innerEditor; } } ///Provides an editor that provides a way to visually edit the values of a COM2 /// type. ////// /// Edits the given object value using the editor style provided by /// GetEditorStyle. A service provider is provided so that any /// required editing services can be obtained. /// public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (innerEditor != null) { return innerEditor.EditValue(context, provider, value); } else { return base.EditValue(context, provider, value); } } ////// /// Determines if this editor supports the painting of a representation /// of an object's value. /// public override bool GetPaintValueSupported(ITypeDescriptorContext context) { if (innerEditor != null) { return innerEditor.GetPaintValueSupported(context); } return base.GetPaintValueSupported(context); } ////// /// Retrieves the editing style of the Edit method. If the method /// is not supported, this will return None. /// public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { if (innerEditor != null) { return innerEditor.GetEditStyle(context); } return base.GetEditStyle(context); } ////// /// Paints a representative value of the given object to the provided /// canvas. Painting should be done within the boundaries of the /// provided rectangle. /// public override void PaintValue(PaintValueEventArgs e) { if (innerEditor != null) { innerEditor.PaintValue(e); } base.PaintValue(e); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XsltLoader.cs
- EmissiveMaterial.cs
- ReadOnlyDictionary.cs
- DetailsViewModeEventArgs.cs
- CommandLibraryHelper.cs
- Timer.cs
- WindowsAuthenticationEventArgs.cs
- SettingsPropertyIsReadOnlyException.cs
- KeyboardDevice.cs
- initElementDictionary.cs
- StickyNoteContentControl.cs
- WebAdminConfigurationHelper.cs
- PolicyValidationException.cs
- CallbackException.cs
- TemplateXamlParser.cs
- TableCellCollection.cs
- VarInfo.cs
- InputMethodStateChangeEventArgs.cs
- WebPartsPersonalization.cs
- ReliabilityContractAttribute.cs
- RotateTransform.cs
- TextContainerChangedEventArgs.cs
- RequestStatusBarUpdateEventArgs.cs
- ISFClipboardData.cs
- CatalogZone.cs
- Int32CollectionConverter.cs
- SQLInt16Storage.cs
- InternalConfigConfigurationFactory.cs
- PageSetupDialog.cs
- XmlWrappingReader.cs
- base64Transforms.cs
- Rijndael.cs
- RichTextBoxAutomationPeer.cs
- SubMenuStyle.cs
- TypeUtil.cs
- XsdDuration.cs
- DeferredTextReference.cs
- DynamicAttribute.cs
- OutOfMemoryException.cs
- TextWriterEngine.cs
- TableRow.cs
- EncryptedPackage.cs
- HtmlInputHidden.cs
- WebEventTraceProvider.cs
- XmlCodeExporter.cs
- Listbox.cs
- BindingRestrictions.cs
- SessionPageStatePersister.cs
- SizeConverter.cs
- SizeConverter.cs
- ProcessHost.cs
- DescendantOverDescendantQuery.cs
- IntegerCollectionEditor.cs
- Clause.cs
- CodeDomLocalizationProvider.cs
- ByeOperationCD1AsyncResult.cs
- ConnectionPoint.cs
- XmlSchemaSimpleContent.cs
- ApplicationSettingsBase.cs
- MailSettingsSection.cs
- PropertyChangeTracker.cs
- TiffBitmapEncoder.cs
- AudioFormatConverter.cs
- MarkupExtensionReturnTypeAttribute.cs
- PtsHelper.cs
- AlternateViewCollection.cs
- OdbcStatementHandle.cs
- Attachment.cs
- PerspectiveCamera.cs
- FieldAccessException.cs
- TemplateContent.cs
- TransportChannelListener.cs
- EntityKeyElement.cs
- WebMessageEncodingElement.cs
- Evidence.cs
- StreamedFramingRequestChannel.cs
- LicenseContext.cs
- Inline.cs
- ToolStripItemClickedEventArgs.cs
- SizeChangedInfo.cs
- DependencySource.cs
- ListViewTableCell.cs
- WindowsHyperlink.cs
- TextFindEngine.cs
- TreeNodeStyle.cs
- Registry.cs
- LOSFormatter.cs
- HwndProxyElementProvider.cs
- COM2FontConverter.cs
- DrawingServices.cs
- XsltException.cs
- RtType.cs
- ExpressionBuilderContext.cs
- JournalEntry.cs
- DataShape.cs
- MediaEntryAttribute.cs
- RenderDataDrawingContext.cs
- Int64.cs
- TagPrefixCollection.cs
- StickyNoteContentControl.cs