Code:
/ 4.0 / 4.0 / untmp / 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(). /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AccessDataSourceView.cs
- RuntimeArgumentHandle.cs
- PropertyItemInternal.cs
- WebPartDescriptionCollection.cs
- ExtensionFile.cs
- X509DefaultServiceCertificateElement.cs
- GeneralTransform3D.cs
- ExpressionBuilder.cs
- ParsedAttributeCollection.cs
- File.cs
- PartialTrustVisibleAssemblyCollection.cs
- KerberosRequestorSecurityToken.cs
- Material.cs
- HttpCookiesSection.cs
- RC2.cs
- SqlInternalConnection.cs
- ListViewAutomationPeer.cs
- BounceEase.cs
- XamlSerializationHelper.cs
- SQLInt64.cs
- NavigationExpr.cs
- SystemBrushes.cs
- BinaryParser.cs
- WebBaseEventKeyComparer.cs
- TypeConverterAttribute.cs
- ImageSourceValueSerializer.cs
- elementinformation.cs
- FixedHyperLink.cs
- SupportingTokenChannel.cs
- EdmTypeAttribute.cs
- Utils.cs
- RoleManagerModule.cs
- NamespaceListProperty.cs
- UnsafeNativeMethods.cs
- ObjectDataSourceDesigner.cs
- CatalogPartCollection.cs
- DataSourceUtil.cs
- MessagePartProtectionMode.cs
- IProvider.cs
- _Rfc2616CacheValidators.cs
- XmlReaderSettings.cs
- GeometryDrawing.cs
- SemaphoreFullException.cs
- SoapObjectInfo.cs
- InvokeWebService.cs
- QilInvokeLateBound.cs
- Renderer.cs
- DBCommandBuilder.cs
- SmiSettersStream.cs
- UnsafeNativeMethods.cs
- MimeMultiPart.cs
- XsltContext.cs
- AuthenticatingEventArgs.cs
- DataGridViewCellValidatingEventArgs.cs
- PageBreakRecord.cs
- UTF32Encoding.cs
- FixedHyperLink.cs
- CacheManager.cs
- SignatureDescription.cs
- XmlILModule.cs
- SoapCommonClasses.cs
- ProfileSection.cs
- SimpleHandlerBuildProvider.cs
- GradientStop.cs
- ObjectTokenCategory.cs
- PolyLineSegment.cs
- TraceHwndHost.cs
- EntityChangedParams.cs
- DrawingContextDrawingContextWalker.cs
- Literal.cs
- AssociationTypeEmitter.cs
- ResourceCategoryAttribute.cs
- EncryptedData.cs
- QuaternionValueSerializer.cs
- DataServiceException.cs
- SystemColors.cs
- UInt16.cs
- FormViewUpdatedEventArgs.cs
- RC2.cs
- InstanceLockedException.cs
- XmlSchemaInferenceException.cs
- SupportsEventValidationAttribute.cs
- UnmanagedMemoryAccessor.cs
- SecurityDescriptor.cs
- ItemContainerGenerator.cs
- RunClient.cs
- SizeFConverter.cs
- IpcClientManager.cs
- sqlinternaltransaction.cs
- Vector3DConverter.cs
- ParsedAttributeCollection.cs
- ControlAdapter.cs
- ElementNotAvailableException.cs
- ControlBindingsCollection.cs
- MatchingStyle.cs
- PartialCachingAttribute.cs
- ContentPropertyAttribute.cs
- ObservableDictionary.cs
- TagNameToTypeMapper.cs
- FormViewPagerRow.cs