Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / Design / DesignerVerb.cs / 1 / 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(); } } }/// Overrides object's ToString(). /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MailDefinition.cs
- StylusPointProperties.cs
- sqlpipe.cs
- ValidatorCollection.cs
- AttributeUsageAttribute.cs
- DataGridCommandEventArgs.cs
- ConsumerConnectionPoint.cs
- InternalConfigSettingsFactory.cs
- MD5CryptoServiceProvider.cs
- processwaithandle.cs
- ProcessModule.cs
- DbXmlEnabledProviderManifest.cs
- _AuthenticationState.cs
- __Error.cs
- ProviderUtil.cs
- WebProxyScriptElement.cs
- XmlCustomFormatter.cs
- ToolboxBitmapAttribute.cs
- SimpleRecyclingCache.cs
- QuadTree.cs
- PostBackTrigger.cs
- XmlBoundElement.cs
- EdmItemCollection.cs
- ZoneIdentityPermission.cs
- X509CertificateValidator.cs
- PagerSettings.cs
- DataViewManagerListItemTypeDescriptor.cs
- GrammarBuilderRuleRef.cs
- oledbconnectionstring.cs
- CompatibleComparer.cs
- OperatingSystem.cs
- NetTcpSecurityElement.cs
- AuthenticationModulesSection.cs
- OperandQuery.cs
- StrokeSerializer.cs
- ModelPropertyImpl.cs
- DataGridColumnStyleMappingNameEditor.cs
- XPathScanner.cs
- PersonalizationStateQuery.cs
- EraserBehavior.cs
- ViewManagerAttribute.cs
- TypeUsageBuilder.cs
- TextureBrush.cs
- HttpHandlerActionCollection.cs
- EnumBuilder.cs
- ViewGenerator.cs
- BaseDataList.cs
- Stacktrace.cs
- PermissionSetEnumerator.cs
- WSHttpBindingBase.cs
- DataGridViewAccessibleObject.cs
- SiteMapNodeCollection.cs
- AudioException.cs
- Substitution.cs
- Matrix3DValueSerializer.cs
- Signature.cs
- AncestorChangedEventArgs.cs
- RawStylusActions.cs
- UInt32.cs
- RedirectionProxy.cs
- ByteStack.cs
- PaintValueEventArgs.cs
- XmlWellformedWriter.cs
- ObjectListFieldsPage.cs
- AttributeData.cs
- OLEDB_Enum.cs
- ToolBar.cs
- MultilineStringConverter.cs
- EntityFunctions.cs
- RuntimeWrappedException.cs
- Effect.cs
- CDSsyncETWBCLProvider.cs
- StringCollection.cs
- BasicViewGenerator.cs
- WebGetAttribute.cs
- DataGridColumnHeader.cs
- ViewSimplifier.cs
- StyleXamlParser.cs
- ThemeDictionaryExtension.cs
- ScrollBarRenderer.cs
- ExtractedStateEntry.cs
- CaseStatementSlot.cs
- ServiceProviders.cs
- GregorianCalendar.cs
- _NestedMultipleAsyncResult.cs
- storepermissionattribute.cs
- SingleStorage.cs
- PermissionListSet.cs
- CodeSnippetExpression.cs
- DefaultPrintController.cs
- DataControlPagerLinkButton.cs
- PropertyInformation.cs
- DetailsViewUpdatedEventArgs.cs
- LiteralSubsegment.cs
- FieldNameLookup.cs
- EventSourceCreationData.cs
- SecurityUtils.cs
- PolyBezierSegment.cs
- ListCommandEventArgs.cs
- TextDecorationCollection.cs