Code:
/ 4.0 / 4.0 / 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(). /// ///// 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
- DataGridViewColumnCollection.cs
- HtmlCalendarAdapter.cs
- PropertyValueChangedEvent.cs
- FixedSOMPageElement.cs
- OptionalMessageQuery.cs
- SessionEndingEventArgs.cs
- PocoPropertyAccessorStrategy.cs
- Exceptions.cs
- Enum.cs
- UnsafeNativeMethodsPenimc.cs
- MessageSecurityOverHttp.cs
- EventSetter.cs
- RawMouseInputReport.cs
- CommandLibraryHelper.cs
- ControlParameter.cs
- TextBox.cs
- QueryTaskGroupState.cs
- CultureSpecificStringDictionary.cs
- QuotedStringWriteStateInfo.cs
- SchemaComplexType.cs
- WebControlsSection.cs
- StackSpiller.cs
- XmlSignatureManifest.cs
- DataGridViewUtilities.cs
- ISFTagAndGuidCache.cs
- InstanceCompleteException.cs
- QilVisitor.cs
- SqlClientPermission.cs
- LogArchiveSnapshot.cs
- SafePEFileHandle.cs
- ControlIdConverter.cs
- InheritedPropertyChangedEventArgs.cs
- MasterPageBuildProvider.cs
- GPPOINT.cs
- ConfigurationStrings.cs
- TraceXPathNavigator.cs
- BamlBinaryReader.cs
- WebPartCloseVerb.cs
- DataTableClearEvent.cs
- BindingRestrictions.cs
- BitmapCacheBrush.cs
- ContentType.cs
- ConnectionConsumerAttribute.cs
- XmlSchemaAnyAttribute.cs
- DispatchWrapper.cs
- XPathPatternParser.cs
- IdentifierCollection.cs
- HyperLinkField.cs
- DefaultPrintController.cs
- DESCryptoServiceProvider.cs
- PerfCounterSection.cs
- PeerNameRegistration.cs
- TypeLibConverter.cs
- SyndicationSerializer.cs
- SByteStorage.cs
- ScriptBehaviorDescriptor.cs
- FileDialogPermission.cs
- MultiPageTextView.cs
- RegexCaptureCollection.cs
- RepeatBehavior.cs
- XmlDataFileEditor.cs
- GatewayDefinition.cs
- BaseResourcesBuildProvider.cs
- CodeRegionDirective.cs
- JpegBitmapDecoder.cs
- PathFigureCollection.cs
- ArgumentNullException.cs
- Int16Converter.cs
- Keywords.cs
- sitestring.cs
- Operand.cs
- RouteCollection.cs
- StandardCommands.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- DesigntimeLicenseContextSerializer.cs
- EntityType.cs
- WebPartsSection.cs
- PropertyReferenceExtension.cs
- ParallelLoopState.cs
- ArgumentValue.cs
- HostDesigntimeLicenseContext.cs
- QuaternionConverter.cs
- ExtensionsSection.cs
- ETagAttribute.cs
- OptimizerPatterns.cs
- PolygonHotSpot.cs
- DataGridViewRowCollection.cs
- WebPartConnectionCollection.cs
- PageThemeCodeDomTreeGenerator.cs
- dataobject.cs
- MatrixCamera.cs
- DataTableReader.cs
- TreeViewBindingsEditor.cs
- BmpBitmapEncoder.cs
- AuthenticationModulesSection.cs
- FamilyCollection.cs
- NoResizeHandleGlyph.cs
- StaticExtensionConverter.cs
- DataContractSet.cs
- TimeSpanValidator.cs