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
- Expression.cs
- TemplateBindingExpressionConverter.cs
- ControlDesigner.cs
- ButtonChrome.cs
- UnsafeNativeMethods.cs
- ApplicationManager.cs
- CompilerParameters.cs
- MaterialCollection.cs
- DebuggerAttributes.cs
- ConfigurationLocation.cs
- ExpressionsCollectionConverter.cs
- DataPager.cs
- Native.cs
- PictureBox.cs
- UpDownEvent.cs
- RectConverter.cs
- IHttpResponseInternal.cs
- NetworkAddressChange.cs
- ObjectIDGenerator.cs
- DeclarationUpdate.cs
- Geometry.cs
- DeferredElementTreeState.cs
- HttpListenerRequestUriBuilder.cs
- LoginNameDesigner.cs
- ObjectStateEntry.cs
- KnownTypesProvider.cs
- COM2IPerPropertyBrowsingHandler.cs
- ToolboxItemCollection.cs
- CachedPathData.cs
- ViewValidator.cs
- SmtpNtlmAuthenticationModule.cs
- MailHeaderInfo.cs
- CompiledXpathExpr.cs
- OleDbConnectionInternal.cs
- InvariantComparer.cs
- ComponentChangingEvent.cs
- HyperLinkDataBindingHandler.cs
- ClearTypeHintValidation.cs
- DataRowChangeEvent.cs
- FlowNode.cs
- DBSqlParser.cs
- QueryStringParameter.cs
- DataGridColumn.cs
- propertyentry.cs
- SqlGenerator.cs
- EllipticalNodeOperations.cs
- MethodMessage.cs
- ListDictionaryInternal.cs
- VirtualizedItemProviderWrapper.cs
- Completion.cs
- DefaultPropertyAttribute.cs
- QueryPrefixOp.cs
- WorkflowOperationInvoker.cs
- WorkflowWebService.cs
- Shape.cs
- ObjectCloneHelper.cs
- ApplicationFileParser.cs
- IItemContainerGenerator.cs
- RenameRuleObjectDialog.Designer.cs
- WithStatement.cs
- Int64Storage.cs
- DataGridColumnHeader.cs
- BitmapEffectState.cs
- VoiceInfo.cs
- WebDescriptionAttribute.cs
- DataBinding.cs
- NativeRecognizer.cs
- SocketInformation.cs
- XPathPatternParser.cs
- StylusLogic.cs
- CustomErrorCollection.cs
- AvtEvent.cs
- KeyProperty.cs
- Stacktrace.cs
- ErrorHandler.cs
- Int16AnimationUsingKeyFrames.cs
- Peer.cs
- IntegerValidator.cs
- ObjectSelectorEditor.cs
- GridViewDesigner.cs
- GridViewEditEventArgs.cs
- EntityDataSourceDesignerHelper.cs
- TimerEventSubscription.cs
- TypeDescriptionProvider.cs
- TriggerAction.cs
- SQLBytes.cs
- WindowsGraphics.cs
- translator.cs
- DateTimeOffsetStorage.cs
- OperationGenerator.cs
- Switch.cs
- TableAdapterManagerMethodGenerator.cs
- ControlCollection.cs
- DetailsViewRow.cs
- TextSelectionProcessor.cs
- ReceiveDesigner.xaml.cs
- DataSourceProvider.cs
- WebPartVerbsEventArgs.cs
- FrameworkContentElement.cs
- InheritanceContextHelper.cs