Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Design / DesignerVerb.cs / 1305376 / DesignerVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using Microsoft.Win32; using System; using System.ComponentModel; using System.Diagnostics; using System.Security.Permissions; using System.Text.RegularExpressions; ////// [HostProtection(SharedState = true)] [System.Runtime.InteropServices.ComVisible(true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class DesignerVerb : MenuCommand { ///Represents a verb that can be executed by a component's designer. ////// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public DesignerVerb(string text, EventHandler handler) : base(handler, StandardCommands.VerbFirst) { Properties["Text"] = text == null ? null : Regex.Replace(text, @"\(\&.\)", ""); // VSWHIDBEY 485835 } ////// Initializes a new instance of the ///class. /// /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public DesignerVerb(string text, EventHandler handler, CommandID startCommandID) : base(handler, startCommandID) { Properties["Text"] = text == null ? null : Regex.Replace(text, @"\(\&.\)", "");// VSWHIDBEY 485835 } ////// Initializes a new instance of the ////// class. /// /// Gets or sets the description of the menu item for the verb. /// public string Description { get { object result = Properties["Description"]; if (result == null) { return String.Empty; } return (string)result; } set { Properties["Description"] = value; } } ////// public string Text { get { object result = Properties["Text"]; if (result == null) { return String.Empty; } return (string)result; } } ////// Gets or sets the text to show on the menu item for the verb. /// ////// public override string ToString() { return Text + " : " + base.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Overrides object's ToString(). /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using Microsoft.Win32; using System; using System.ComponentModel; using System.Diagnostics; using System.Security.Permissions; using System.Text.RegularExpressions; ////// [HostProtection(SharedState = true)] [System.Runtime.InteropServices.ComVisible(true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class DesignerVerb : MenuCommand { ///Represents a verb that can be executed by a component's designer. ////// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public DesignerVerb(string text, EventHandler handler) : base(handler, StandardCommands.VerbFirst) { Properties["Text"] = text == null ? null : Regex.Replace(text, @"\(\&.\)", ""); // VSWHIDBEY 485835 } ////// Initializes a new instance of the ///class. /// /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public DesignerVerb(string text, EventHandler handler, CommandID startCommandID) : base(handler, startCommandID) { Properties["Text"] = text == null ? null : Regex.Replace(text, @"\(\&.\)", "");// VSWHIDBEY 485835 } ////// Initializes a new instance of the ////// class. /// /// Gets or sets the description of the menu item for the verb. /// public string Description { get { object result = Properties["Description"]; if (result == null) { return String.Empty; } return (string)result; } set { Properties["Description"] = value; } } ////// public string Text { get { object result = Properties["Text"]; if (result == null) { return String.Empty; } return (string)result; } } ////// Gets or sets the text to show on the menu item for the verb. /// ////// public override string ToString() { return Text + " : " + base.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Overrides object's ToString(). /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UnsafeNativeMethods.cs
- MapPathBasedVirtualPathProvider.cs
- XamlSerializationHelper.cs
- HttpApplicationFactory.cs
- OdbcConnectionPoolProviderInfo.cs
- HttpAsyncResult.cs
- InertiaTranslationBehavior.cs
- AssociationSetEnd.cs
- FileDialog_Vista.cs
- UrlAuthFailedErrorFormatter.cs
- configsystem.cs
- BulletedList.cs
- EventManager.cs
- XsdDateTime.cs
- WebBrowserDesigner.cs
- LookupTables.cs
- CryptoApi.cs
- SQLInt64Storage.cs
- ServiceDebugBehavior.cs
- XmlAttributes.cs
- PlatformNotSupportedException.cs
- PageRouteHandler.cs
- CellRelation.cs
- SimpleApplicationHost.cs
- HighContrastHelper.cs
- DataGridView.cs
- Column.cs
- IISMapPath.cs
- BaseHashHelper.cs
- DataGridViewRowPrePaintEventArgs.cs
- CapabilitiesPattern.cs
- Translator.cs
- GridViewCommandEventArgs.cs
- WebPartUserCapability.cs
- SimpleHandlerFactory.cs
- Funcletizer.cs
- DataRelationPropertyDescriptor.cs
- ClientCredentials.cs
- UnmanagedHandle.cs
- PropertyNames.cs
- PhysicalFontFamily.cs
- CustomErrorCollection.cs
- BaseHashHelper.cs
- ApplicationActivator.cs
- ProfileManager.cs
- MorphHelper.cs
- CodeDomSerializationProvider.cs
- CreateUserWizardStep.cs
- FederatedMessageSecurityOverHttp.cs
- XmlIlVisitor.cs
- SeekStoryboard.cs
- Win32SafeHandles.cs
- BulletDecorator.cs
- _NetRes.cs
- HttpConfigurationContext.cs
- HandoffBehavior.cs
- Util.cs
- TokenizerHelper.cs
- Rotation3DAnimationUsingKeyFrames.cs
- GeometryModel3D.cs
- DetailsViewDeleteEventArgs.cs
- WebPartHelpVerb.cs
- WorkflowQueuingService.cs
- Item.cs
- BitmapDecoder.cs
- AssemblyNameUtility.cs
- ResourceDictionary.cs
- shaperfactoryquerycachekey.cs
- Compiler.cs
- CacheDependency.cs
- ExpressionVisitor.cs
- EncoderParameter.cs
- OleDbEnumerator.cs
- HttpListener.cs
- DbParameterCollection.cs
- SystemColors.cs
- XmlSchemaAttributeGroupRef.cs
- FactoryGenerator.cs
- WebPartDeleteVerb.cs
- SubstitutionResponseElement.cs
- BitConverter.cs
- MaskInputRejectedEventArgs.cs
- ToolStripLabel.cs
- ProfileGroupSettingsCollection.cs
- XmlSerializableWriter.cs
- RowVisual.cs
- DummyDataSource.cs
- XmlDomTextWriter.cs
- ExternalDataExchangeService.cs
- WeakEventManager.cs
- DPCustomTypeDescriptor.cs
- EventArgs.cs
- XmlFormatExtensionPrefixAttribute.cs
- PersonalizationProviderCollection.cs
- TypeDelegator.cs
- ToolStripTextBox.cs
- AliasGenerator.cs
- DynamicDataManager.cs
- TCEAdapterGenerator.cs
- ParserHooks.cs