Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / Design / WinFormsComponentEditor.cs / 1305376 / 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
- ToolStripContentPanelDesigner.cs
- PrimarySelectionAdorner.cs
- XmlQueryStaticData.cs
- MetadataExporter.cs
- XPathDocumentIterator.cs
- SchemaElement.cs
- TextCompositionManager.cs
- DragDrop.cs
- TableItemPattern.cs
- FrameworkEventSource.cs
- ByteAnimationBase.cs
- SQLCharsStorage.cs
- XmlAttributeHolder.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- FormViewPagerRow.cs
- ConsumerConnectionPoint.cs
- SelectingProviderEventArgs.cs
- KeyManager.cs
- DelegateHelpers.cs
- namescope.cs
- TypeExtension.cs
- MenuItemStyleCollection.cs
- TypePresenter.xaml.cs
- TextLine.cs
- CompleteWizardStep.cs
- Odbc32.cs
- TextSelectionHelper.cs
- QueuedDeliveryRequirementsMode.cs
- AccessibleObject.cs
- ImageClickEventArgs.cs
- InputLanguage.cs
- ListItemParagraph.cs
- InputMethod.cs
- PresentationAppDomainManager.cs
- Parser.cs
- CharacterBufferReference.cs
- DescriptionAttribute.cs
- ServiceNameElement.cs
- ObjectView.cs
- TextParaLineResult.cs
- OleDbCommandBuilder.cs
- ListViewHitTestInfo.cs
- ColorAnimationUsingKeyFrames.cs
- CheckBoxField.cs
- TextClipboardData.cs
- WindowsGraphics.cs
- _Rfc2616CacheValidators.cs
- DataGridRelationshipRow.cs
- MemberAccessException.cs
- ProtocolImporter.cs
- Triplet.cs
- EventLogPermission.cs
- ListViewDeleteEventArgs.cs
- BindingNavigatorDesigner.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- GridViewColumnCollection.cs
- WorkerRequest.cs
- WsatServiceCertificate.cs
- Comparer.cs
- AtomicFile.cs
- SmtpTransport.cs
- coordinator.cs
- LoginCancelEventArgs.cs
- AuthenticateEventArgs.cs
- ScrollChrome.cs
- IISUnsafeMethods.cs
- HttpPostedFile.cs
- IIS7WorkerRequest.cs
- SimpleLine.cs
- StaticFileHandler.cs
- BindingOperations.cs
- ComplexBindingPropertiesAttribute.cs
- HotSpot.cs
- SQLDouble.cs
- ZipIOExtraFieldZip64Element.cs
- FileEnumerator.cs
- PersonalizationProviderCollection.cs
- WindowsListView.cs
- SafeNativeMethods.cs
- MenuItemStyle.cs
- _NativeSSPI.cs
- TransformedBitmap.cs
- TimeoutTimer.cs
- IERequestCache.cs
- ZoneButton.cs
- SchemaImporter.cs
- ExtensionCollection.cs
- Accessible.cs
- SystemIcmpV4Statistics.cs
- ResourceReader.cs
- MinMaxParagraphWidth.cs
- DataGridViewCell.cs
- AxHost.cs
- ManualWorkflowSchedulerService.cs
- CodeObject.cs
- DataStorage.cs
- CannotUnloadAppDomainException.cs
- ProvideValueServiceProvider.cs
- BlurEffect.cs
- DecoderFallback.cs