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
- Animatable.cs
- EventListenerClientSide.cs
- DbConnectionPoolOptions.cs
- UriSectionReader.cs
- PlatformCulture.cs
- EventBindingService.cs
- IdentityReference.cs
- ClientConfigPaths.cs
- GridEntryCollection.cs
- Repeater.cs
- ComplexPropertyEntry.cs
- PersonalizationStateInfo.cs
- SelectorItemAutomationPeer.cs
- GridViewColumnHeader.cs
- TCEAdapterGenerator.cs
- DependencyPropertyKind.cs
- UdpSocketReceiveManager.cs
- TextDecorationCollection.cs
- Geometry.cs
- PersonalizationAdministration.cs
- ContainerParaClient.cs
- precedingsibling.cs
- ProviderSettings.cs
- BooleanFacetDescriptionElement.cs
- CharStorage.cs
- DataGridPageChangedEventArgs.cs
- ControlPager.cs
- DictionaryChange.cs
- PriorityQueue.cs
- HtmlImage.cs
- XmlBindingWorker.cs
- AutomationTextAttribute.cs
- AutomationProperties.cs
- SettingsAttributes.cs
- XmlObjectSerializerWriteContext.cs
- PointHitTestParameters.cs
- DataGrid.cs
- ToolStripOverflow.cs
- PersonalizationProviderHelper.cs
- CompareValidator.cs
- XmlSchemaAny.cs
- ProfileSettingsCollection.cs
- ICspAsymmetricAlgorithm.cs
- IconConverter.cs
- Decoder.cs
- ClassImporter.cs
- ServiceBuildProvider.cs
- SqlClientMetaDataCollectionNames.cs
- BufferedStream.cs
- OracleMonthSpan.cs
- ImmutablePropertyDescriptorGridEntry.cs
- CollectionEditVerbManager.cs
- SmiXetterAccessMap.cs
- Utils.cs
- HtmlSelect.cs
- DetailsViewPageEventArgs.cs
- OutputWindow.cs
- WebPartConnectionsCloseVerb.cs
- Delay.cs
- Message.cs
- StatusBar.cs
- TextEncodedRawTextWriter.cs
- EventToken.cs
- BufferedStream2.cs
- DataRowExtensions.cs
- XmlValueConverter.cs
- RuntimeIdentifierPropertyAttribute.cs
- HttpBrowserCapabilitiesBase.cs
- CharacterHit.cs
- TextDocumentView.cs
- CodeChecksumPragma.cs
- OperationAbortedException.cs
- XmlFileEditor.cs
- AuthenticationConfig.cs
- SpanIndex.cs
- ToolStripHighContrastRenderer.cs
- HttpClientCertificate.cs
- FrugalMap.cs
- TextElementEnumerator.cs
- MetabaseSettingsIis7.cs
- ObjectListItem.cs
- GPStream.cs
- ConvertEvent.cs
- GridViewItemAutomationPeer.cs
- RightsManagementEncryptedStream.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- RelationshipWrapper.cs
- TextTreePropertyUndoUnit.cs
- OdbcCommand.cs
- TextSearch.cs
- FixedTextSelectionProcessor.cs
- CompositeCollectionView.cs
- NamedPipeAppDomainProtocolHandler.cs
- BuildDependencySet.cs
- CheckoutException.cs
- SqlCachedBuffer.cs
- FrugalMap.cs
- XmlSchemaSimpleTypeRestriction.cs
- DnsEndPoint.cs
- FileNotFoundException.cs