Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Overrides object's ToString(). /// ///// 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
- ClientSection.cs
- DetailsViewModeEventArgs.cs
- Win32NamedPipes.cs
- DataComponentGenerator.cs
- X509Certificate2Collection.cs
- HttpCookiesSection.cs
- ReaderContextStackData.cs
- NativeMethods.cs
- VisualTarget.cs
- TextMarkerSource.cs
- HttpCachePolicy.cs
- WebPartMenu.cs
- DispatcherFrame.cs
- ConfigurationPropertyCollection.cs
- ModuleBuilderData.cs
- PriorityChain.cs
- RouteParameter.cs
- ProtocolsConfigurationEntry.cs
- shaperfactoryquerycachekey.cs
- ResXResourceWriter.cs
- Span.cs
- XmlSchemaAttribute.cs
- InvalidWMPVersionException.cs
- EditCommandColumn.cs
- MetadataItemEmitter.cs
- ServerValidateEventArgs.cs
- _NegoState.cs
- ManagedFilter.cs
- FastPropertyAccessor.cs
- StringKeyFrameCollection.cs
- HtmlElementCollection.cs
- UIElement.cs
- DataRowExtensions.cs
- ActionFrame.cs
- HyperLinkField.cs
- DecimalAverageAggregationOperator.cs
- AsymmetricKeyExchangeDeformatter.cs
- BamlTreeMap.cs
- Single.cs
- CharacterMetrics.cs
- WinCategoryAttribute.cs
- DbProviderManifest.cs
- UriTemplateClientFormatter.cs
- OutputWindow.cs
- StringAnimationUsingKeyFrames.cs
- TextProperties.cs
- EraserBehavior.cs
- ClientSettings.cs
- RegistryConfigurationProvider.cs
- EventProxy.cs
- XamlToRtfWriter.cs
- AnonymousIdentificationModule.cs
- WindowsStatusBar.cs
- DynamicDataRouteHandler.cs
- shaper.cs
- ConfigurationElementProperty.cs
- BitmapEffect.cs
- FileChangesMonitor.cs
- FontCacheUtil.cs
- XmlSerializationGeneratedCode.cs
- RectAnimationBase.cs
- WebPartTransformer.cs
- EventLogPermissionEntry.cs
- WsdlBuildProvider.cs
- CompilerLocalReference.cs
- DeclarationUpdate.cs
- ConditionCollection.cs
- BufferModesCollection.cs
- ImageListImage.cs
- ToolStripOverflowButton.cs
- HttpCapabilitiesBase.cs
- ScrollChangedEventArgs.cs
- MethodToken.cs
- PartitionResolver.cs
- HtmlMeta.cs
- WizardPanelChangingEventArgs.cs
- XmlDocumentType.cs
- AdjustableArrowCap.cs
- ViewPort3D.cs
- SocketInformation.cs
- ToggleButton.cs
- RegexParser.cs
- BuildProviderUtils.cs
- TextRangeEdit.cs
- SignerInfo.cs
- RoleGroup.cs
- OperandQuery.cs
- CaretElement.cs
- OpCodes.cs
- SectionRecord.cs
- Brush.cs
- LambdaCompiler.Logical.cs
- InheritanceAttribute.cs
- DataSet.cs
- DataBoundControlHelper.cs
- DataGridViewCellPaintingEventArgs.cs
- HotCommands.cs
- Wrapper.cs
- Pkcs7Signer.cs
- GatewayDefinition.cs