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
- DecoderExceptionFallback.cs
- SoapBinding.cs
- UnSafeCharBuffer.cs
- TextBlockAutomationPeer.cs
- IListConverters.cs
- TransformGroup.cs
- SHA384Cng.cs
- TextEffect.cs
- TimeSpanOrInfiniteValidator.cs
- Sql8ConformanceChecker.cs
- TemplateBaseAction.cs
- ICollection.cs
- AuthStoreRoleProvider.cs
- GridViewAutomationPeer.cs
- IpcChannelHelper.cs
- XMLUtil.cs
- HttpModulesSection.cs
- ValidatorCollection.cs
- ScrollPattern.cs
- CodeDelegateCreateExpression.cs
- DecoratedNameAttribute.cs
- MsmqVerifier.cs
- BamlVersionHeader.cs
- XamlReader.cs
- Rights.cs
- FunctionDescription.cs
- SystemColors.cs
- ExpressionPrefixAttribute.cs
- Decoder.cs
- NetSectionGroup.cs
- GestureRecognizer.cs
- ObjectDataSourceDisposingEventArgs.cs
- HttpPostLocalhostServerProtocol.cs
- ValidationErrorEventArgs.cs
- DataTableClearEvent.cs
- TransportManager.cs
- DefaultValueAttribute.cs
- CodeCastExpression.cs
- DbConnectionPoolOptions.cs
- RegexBoyerMoore.cs
- BamlLocalizationDictionary.cs
- ReadWriteSpinLock.cs
- WorkflowApplicationAbortedException.cs
- MenuItemStyle.cs
- XmlAnyElementAttributes.cs
- InputBinder.cs
- ResourceProviderFactory.cs
- TransformerInfoCollection.cs
- BitmapFrame.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- GACIdentityPermission.cs
- LocalizabilityAttribute.cs
- followingquery.cs
- GlyphShapingProperties.cs
- ScopeCollection.cs
- WorkflowPrinting.cs
- FixedSOMFixedBlock.cs
- AssemblyBuilderData.cs
- ObjectPropertyMapping.cs
- PlacementWorkspace.cs
- DecimalAnimationUsingKeyFrames.cs
- DragEventArgs.cs
- ValueSerializerAttribute.cs
- COM2PropertyDescriptor.cs
- ZipArchive.cs
- ClientSettingsProvider.cs
- OutOfMemoryException.cs
- SqlDependencyListener.cs
- HwndSource.cs
- SequentialWorkflowHeaderFooter.cs
- LabelLiteral.cs
- AudioSignalProblemOccurredEventArgs.cs
- CompilerTypeWithParams.cs
- LocalizedNameDescriptionPair.cs
- NetDispatcherFaultException.cs
- MetadataPropertyvalue.cs
- ToolStripOverflow.cs
- ScaleTransform3D.cs
- DesignerFrame.cs
- PackWebRequest.cs
- CustomWebEventKey.cs
- ParallelEnumerable.cs
- ConfigurationLockCollection.cs
- ScopelessEnumAttribute.cs
- InternalUserCancelledException.cs
- basecomparevalidator.cs
- SqlAggregateChecker.cs
- StylusShape.cs
- StorageMappingFragment.cs
- InputLanguage.cs
- ViewGenerator.cs
- ListBoxChrome.cs
- Site.cs
- xmlglyphRunInfo.cs
- WebConvert.cs
- HtmlElementErrorEventArgs.cs
- XmlSerializerSection.cs
- DesignSurfaceManager.cs
- NaturalLanguageHyphenator.cs
- DataBoundLiteralControl.cs