Code:
/ FX-1434 / FX-1434 / 1.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
- ComplexType.cs
- GPStream.cs
- XmlQueryRuntime.cs
- EntityDataSourceDesignerHelper.cs
- AppDomainUnloadedException.cs
- ISCIIEncoding.cs
- Ops.cs
- AmbientProperties.cs
- DataRow.cs
- GlobalizationAssembly.cs
- DataRecord.cs
- ActiveDesignSurfaceEvent.cs
- InstanceContextManager.cs
- ExpressionBindingsDialog.cs
- Selector.cs
- ContextDataSourceView.cs
- PlatformCulture.cs
- Compiler.cs
- FeatureSupport.cs
- BinaryKeyIdentifierClause.cs
- SecurityPermission.cs
- SplitterEvent.cs
- ConcurrencyBehavior.cs
- DataBoundControl.cs
- SmiEventSink.cs
- ProcessHostFactoryHelper.cs
- PackUriHelper.cs
- TypeBrowserDialog.cs
- ExpiredSecurityTokenException.cs
- RC2CryptoServiceProvider.cs
- WebRequestModuleElement.cs
- InvalidPrinterException.cs
- PaintEvent.cs
- ResourceCategoryAttribute.cs
- ProfilePropertyMetadata.cs
- documentsequencetextpointer.cs
- ViewBase.cs
- NameValuePair.cs
- QuestionEventArgs.cs
- WeakEventManager.cs
- WebFormsRootDesigner.cs
- RenderDataDrawingContext.cs
- Console.cs
- ParameterCollection.cs
- DecoratedNameAttribute.cs
- AccessViolationException.cs
- XmlAnyElementAttributes.cs
- DispatcherEventArgs.cs
- AttributeUsageAttribute.cs
- SafeCryptoHandles.cs
- SingletonChannelAcceptor.cs
- BitmapSizeOptions.cs
- RedirectionProxy.cs
- SynchronizationContext.cs
- SharedDp.cs
- SimpleBitVector32.cs
- NamedElement.cs
- GeometryCombineModeValidation.cs
- Variant.cs
- TabItem.cs
- ClipboardProcessor.cs
- SmiEventSink.cs
- BooleanConverter.cs
- StandardBindingImporter.cs
- SafePEFileHandle.cs
- MethodToken.cs
- XmlSchemaDocumentation.cs
- ExpressionConverter.cs
- ClientFormsAuthenticationMembershipProvider.cs
- CodeCompileUnit.cs
- EventRoute.cs
- IdnMapping.cs
- WaitForChangedResult.cs
- Style.cs
- ToolStripLocationCancelEventArgs.cs
- DateTimeStorage.cs
- DisplayNameAttribute.cs
- ChildChangedEventArgs.cs
- WebBrowserBase.cs
- HandlerFactoryCache.cs
- ConsoleKeyInfo.cs
- WebPartConnectionsConnectVerb.cs
- LabelAutomationPeer.cs
- AutomationProperty.cs
- ArrayExtension.cs
- WebBrowserNavigatedEventHandler.cs
- FileUtil.cs
- ColorConvertedBitmapExtension.cs
- ZipFileInfoCollection.cs
- AsyncPostBackTrigger.cs
- TripleDES.cs
- PolyLineSegment.cs
- AsyncCodeActivityContext.cs
- HttpPostLocalhostServerProtocol.cs
- TableLayoutColumnStyleCollection.cs
- FaultConverter.cs
- ImageFormat.cs
- Rights.cs
- EntityDataSourceContextCreatingEventArgs.cs
- SoapExtensionStream.cs