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
- COMException.cs
- EntityTypeBase.cs
- BaseTemplateParser.cs
- HtmlTernaryTree.cs
- ContentAlignmentEditor.cs
- COM2ComponentEditor.cs
- DataKeyCollection.cs
- ProcessStartInfo.cs
- TableMethodGenerator.cs
- SocketException.cs
- DataGridViewComboBoxColumn.cs
- SrgsElementFactory.cs
- XmlSchemaNotation.cs
- ExeContext.cs
- TemplateColumn.cs
- X509CertificateValidationMode.cs
- XmlElementList.cs
- LocatorPartList.cs
- DataBoundControlAdapter.cs
- PerformanceCounterCategory.cs
- TextEffectResolver.cs
- SectionVisual.cs
- IISMapPath.cs
- SystemException.cs
- SamlAction.cs
- QuaternionKeyFrameCollection.cs
- UriWriter.cs
- SchemaHelper.cs
- BuiltInExpr.cs
- ByteAnimationBase.cs
- WindowVisualStateTracker.cs
- IdentityManager.cs
- StringFormat.cs
- FileDialogCustomPlace.cs
- XmlBinaryReaderSession.cs
- SingleAnimation.cs
- PropertyValueUIItem.cs
- ArithmeticLiteral.cs
- PointAnimationUsingPath.cs
- OleDbInfoMessageEvent.cs
- RegisteredArrayDeclaration.cs
- PhotoPrintingIntent.cs
- TypographyProperties.cs
- mansign.cs
- ProfileSettingsCollection.cs
- PenThread.cs
- Random.cs
- WebPartAuthorizationEventArgs.cs
- TrustSection.cs
- BaseComponentEditor.cs
- DeferrableContent.cs
- Cursors.cs
- SymbolEqualComparer.cs
- OperationResponse.cs
- InkPresenterAutomationPeer.cs
- BrushMappingModeValidation.cs
- TransformGroup.cs
- MaxMessageSizeStream.cs
- AliasGenerator.cs
- CommonObjectSecurity.cs
- MailWebEventProvider.cs
- RunInstallerAttribute.cs
- PanelStyle.cs
- TreeNodeConverter.cs
- AutoGeneratedFieldProperties.cs
- FunctionDescription.cs
- CompiledQueryCacheKey.cs
- IdnMapping.cs
- StringFreezingAttribute.cs
- XmlAttributeCache.cs
- NavigationProperty.cs
- SQLBinaryStorage.cs
- DocumentSchemaValidator.cs
- SqlDataSourceCache.cs
- SqlNodeTypeOperators.cs
- Rotation3D.cs
- CodeConditionStatement.cs
- ClientTargetSection.cs
- Fx.cs
- Mutex.cs
- URLEditor.cs
- NamedPipeConnectionPool.cs
- Rect.cs
- Polyline.cs
- UpdateException.cs
- AxHostDesigner.cs
- BitmapEffectGroup.cs
- ColorDialog.cs
- Int64Converter.cs
- EntityCommand.cs
- XmlSerializerVersionAttribute.cs
- DataPagerFieldCommandEventArgs.cs
- DBPropSet.cs
- WorkflowRuntimeService.cs
- ByteConverter.cs
- BindingOperations.cs
- UnsafeNativeMethods.cs
- GeneralTransform.cs
- DesignerGenericWebPart.cs
- Scalars.cs