Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / Design / WinFormsComponentEditor.cs / 1 / WinFormsComponentEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms.Design { using System.ComponentModel; using System.Diagnostics; using System; using System.Windows.Forms; using System.ComponentModel.Design; using System.Drawing; using Microsoft.Win32; ////// /// [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] public abstract class WindowsFormsComponentEditor : ComponentEditor { ///Provides a base class for editors that support any type /// of ////// objects. /// /// public override bool EditComponent(ITypeDescriptorContext context, object component){ return EditComponent(context, component, null); } ///Activates a UI used to edit the component. ////// /// public bool EditComponent(object component, IWin32Window owner) { return EditComponent(null, component, owner); } ////// Activates the advanced UI used to edit the component. ////// /// public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner) { bool changed = false; Type[] pageControlTypes = GetComponentEditorPages(); if ((pageControlTypes != null) && (pageControlTypes.Length != 0)) { ComponentEditorForm form = new ComponentEditorForm(component, pageControlTypes); if (form.ShowForm(owner, GetInitialComponentEditorPageIndex()) == DialogResult.OK) changed = true; } return changed; } ////// Activates the advanced UI used to edit the component. ////// /// protected virtual Type[] GetComponentEditorPages() { return null; } ///Gets the set of ///pages to be used. /// /// protected virtual int GetInitialComponentEditorPageIndex() { return 0; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Gets the index of the ///to be shown by default as the /// first active page. // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms.Design { using System.ComponentModel; using System.Diagnostics; using System; using System.Windows.Forms; using System.ComponentModel.Design; using System.Drawing; using Microsoft.Win32; ////// /// [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] public abstract class WindowsFormsComponentEditor : ComponentEditor { ///Provides a base class for editors that support any type /// of ////// objects. /// /// public override bool EditComponent(ITypeDescriptorContext context, object component){ return EditComponent(context, component, null); } ///Activates a UI used to edit the component. ////// /// public bool EditComponent(object component, IWin32Window owner) { return EditComponent(null, component, owner); } ////// Activates the advanced UI used to edit the component. ////// /// public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner) { bool changed = false; Type[] pageControlTypes = GetComponentEditorPages(); if ((pageControlTypes != null) && (pageControlTypes.Length != 0)) { ComponentEditorForm form = new ComponentEditorForm(component, pageControlTypes); if (form.ShowForm(owner, GetInitialComponentEditorPageIndex()) == DialogResult.OK) changed = true; } return changed; } ////// Activates the advanced UI used to edit the component. ////// /// protected virtual Type[] GetComponentEditorPages() { return null; } ///Gets the set of ///pages to be used. /// /// protected virtual int GetInitialComponentEditorPageIndex() { return 0; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Gets the index of the ///to be shown by default as the /// first active page.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpServerProtocol.cs
- DataProtection.cs
- TypeDescriptionProviderAttribute.cs
- ConfigurationElement.cs
- ping.cs
- FontInfo.cs
- MoveSizeWinEventHandler.cs
- StylusButtonEventArgs.cs
- NodeCounter.cs
- OracleColumn.cs
- ContextToken.cs
- BitmapSource.cs
- Int16Converter.cs
- MouseGesture.cs
- FileDialog_Vista.cs
- CompModSwitches.cs
- FieldBuilder.cs
- DelegateSerializationHolder.cs
- FixedSOMPageConstructor.cs
- diagnosticsswitches.cs
- XmlDataSourceDesigner.cs
- ClientSponsor.cs
- Block.cs
- GenericRootAutomationPeer.cs
- DataSourceNameHandler.cs
- CodeMemberMethod.cs
- Triangle.cs
- SetterBaseCollection.cs
- Utils.cs
- DateTimePickerDesigner.cs
- SQLDateTime.cs
- LocalizableAttribute.cs
- CompressionTransform.cs
- Utils.cs
- Odbc32.cs
- BuildProvider.cs
- ThreadInterruptedException.cs
- ClientUtils.cs
- SocketManager.cs
- HMACMD5.cs
- SByteConverter.cs
- LocationUpdates.cs
- EventHandlersStore.cs
- DataSysAttribute.cs
- Executor.cs
- FlowNode.cs
- RadioButton.cs
- DataControlField.cs
- HttpPostClientProtocol.cs
- itemelement.cs
- TrackingServices.cs
- XmlCharCheckingReader.cs
- KnownBoxes.cs
- WpfKnownType.cs
- HttpResponseHeader.cs
- PathGeometry.cs
- DataRowCollection.cs
- DrawingGroup.cs
- IdnMapping.cs
- KoreanCalendar.cs
- CssStyleCollection.cs
- SystemIPGlobalProperties.cs
- DoWorkEventArgs.cs
- BamlBinaryWriter.cs
- PackagingUtilities.cs
- BinHexEncoder.cs
- WebEvents.cs
- PriorityBindingExpression.cs
- SinglePhaseEnlistment.cs
- DataGridRowHeader.cs
- ColorContext.cs
- NegotiateStream.cs
- XmlSchemaDocumentation.cs
- DrawingDrawingContext.cs
- SchemaNames.cs
- GiveFeedbackEventArgs.cs
- XpsS0ValidatingLoader.cs
- DiscoveryDefaults.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- ThreadNeutralSemaphore.cs
- LicenseManager.cs
- SystemIPAddressInformation.cs
- StrokeNodeEnumerator.cs
- InternalConfigEventArgs.cs
- ColorContext.cs
- CharacterString.cs
- CustomWebEventKey.cs
- SQLSingleStorage.cs
- OutputCacheSettingsSection.cs
- SrgsDocumentParser.cs
- ContentPlaceHolder.cs
- SqlBuffer.cs
- PropertyChangedEventArgs.cs
- XPathItem.cs
- DateTimeOffsetConverter.cs
- RectIndependentAnimationStorage.cs
- StatusBarItemAutomationPeer.cs
- SamlAuthorizationDecisionClaimResource.cs
- ActivityBuilderXamlWriter.cs
- BuildProviderUtils.cs