Code:
/ 4.0 / 4.0 / untmp / 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(). /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpClientCertificate.cs
- EdmProviderManifest.cs
- WorkflowServiceNamespace.cs
- EDesignUtil.cs
- DispatcherOperation.cs
- ObjectListCommandCollection.cs
- DataGridCellInfo.cs
- SwitchLevelAttribute.cs
- SoapSchemaImporter.cs
- ReadOnlyHierarchicalDataSourceView.cs
- MatrixIndependentAnimationStorage.cs
- ReadWriteControlDesigner.cs
- WsdlBuildProvider.cs
- DBConnectionString.cs
- WaitingCursor.cs
- ErrorTableItemStyle.cs
- EventSetter.cs
- ControlTemplate.cs
- DaylightTime.cs
- ToolboxItem.cs
- UpdateProgress.cs
- IdleTimeoutMonitor.cs
- ResourceExpressionBuilder.cs
- ImageBrush.cs
- Privilege.cs
- Stream.cs
- StringUtil.cs
- XmlParser.cs
- ImmutableDispatchRuntime.cs
- AssociatedControlConverter.cs
- PageBuildProvider.cs
- PropertyToken.cs
- EntityTransaction.cs
- EventsTab.cs
- BufferedWebEventProvider.cs
- ResourcesGenerator.cs
- XmlnsCache.cs
- DataContract.cs
- TdsEnums.cs
- ApplicationServiceManager.cs
- CodeIdentifier.cs
- ClientSponsor.cs
- PeerResolver.cs
- ObjectParameter.cs
- CreateUserErrorEventArgs.cs
- CompilerGlobalScopeAttribute.cs
- ObjectMemberMapping.cs
- Int16Storage.cs
- HtmlTable.cs
- ThreadStaticAttribute.cs
- ComPlusTraceRecord.cs
- DataGridItem.cs
- TextComposition.cs
- WebPartMinimizeVerb.cs
- ControlBuilderAttribute.cs
- SourceInterpreter.cs
- RequestCacheEntry.cs
- XsdCachingReader.cs
- TransactionState.cs
- FormConverter.cs
- wpf-etw.cs
- IdnMapping.cs
- DebugControllerThread.cs
- ExpressionPrinter.cs
- XmlFormatWriterGenerator.cs
- _SSPIWrapper.cs
- AmbientLight.cs
- NullableDecimalAverageAggregationOperator.cs
- _SslState.cs
- ScriptingScriptResourceHandlerSection.cs
- SqlClientFactory.cs
- MetabaseServerConfig.cs
- SQLInt64.cs
- WebHeaderCollection.cs
- MimeImporter.cs
- Registry.cs
- PagedDataSource.cs
- ValueUtilsSmi.cs
- EnumerableCollectionView.cs
- ThumbButtonInfoCollection.cs
- EditingCommands.cs
- WindowsStatic.cs
- PackageStore.cs
- DbConnectionPoolGroupProviderInfo.cs
- XmlAttributeCache.cs
- DecimalAverageAggregationOperator.cs
- OdbcDataReader.cs
- TransformedBitmap.cs
- FontFamily.cs
- RuntimeCompatibilityAttribute.cs
- Adorner.cs
- ThreadPool.cs
- JsonSerializer.cs
- TextLine.cs
- PolicyStatement.cs
- UrlMappingsSection.cs
- WebZone.cs
- BCLDebug.cs
- AppDomainUnloadedException.cs
- ClrPerspective.cs