Code:
/ FX-1434 / FX-1434 / 1.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
- FileCodeGroup.cs
- PageHandlerFactory.cs
- WebPartExportVerb.cs
- SettingsPropertyWrongTypeException.cs
- JournalEntryListConverter.cs
- CompoundFileStorageReference.cs
- ImportCatalogPart.cs
- SelectedGridItemChangedEvent.cs
- BitmapEffectInputData.cs
- SettingsPropertyWrongTypeException.cs
- ArrangedElement.cs
- ColorConverter.cs
- DataGridHelper.cs
- BinaryMethodMessage.cs
- RetrieveVirtualItemEventArgs.cs
- BmpBitmapEncoder.cs
- EntityProviderFactory.cs
- UrlMappingsSection.cs
- JournalEntryListConverter.cs
- TripleDES.cs
- EnumerableCollectionView.cs
- RuntimeConfig.cs
- TextRunProperties.cs
- FunctionUpdateCommand.cs
- SchemaImporterExtensionElement.cs
- CharUnicodeInfo.cs
- ValidationErrorCollection.cs
- WebSysDisplayNameAttribute.cs
- DecimalAnimationBase.cs
- OleStrCAMarshaler.cs
- XmlNullResolver.cs
- OrderedDictionary.cs
- RegistrationServices.cs
- ResourceManager.cs
- DataObjectFieldAttribute.cs
- OperationResponse.cs
- Messages.cs
- MouseButtonEventArgs.cs
- StrongTypingException.cs
- CodeRegionDirective.cs
- EqualityArray.cs
- SafeCryptContextHandle.cs
- PageRanges.cs
- ProcessHostConfigUtils.cs
- Adorner.cs
- KeyValueConfigurationElement.cs
- ApplicationManager.cs
- GestureRecognizer.cs
- HTTPNotFoundHandler.cs
- Line.cs
- arc.cs
- TypeBrowserDialog.cs
- CallbackValidatorAttribute.cs
- SetStoryboardSpeedRatio.cs
- ToolStripDropDownItem.cs
- MSAAWinEventWrap.cs
- ButtonBaseAutomationPeer.cs
- ContentElement.cs
- IdentitySection.cs
- MenuItemStyleCollection.cs
- SchemaImporterExtensionsSection.cs
- ClockController.cs
- DbParameterHelper.cs
- AppDomain.cs
- InvokePatternIdentifiers.cs
- Properties.cs
- PropertyDescriptor.cs
- WindowVisualStateTracker.cs
- ResourcePart.cs
- IssuanceTokenProviderBase.cs
- DataRecordInfo.cs
- PropertyDescriptorComparer.cs
- SafeHandle.cs
- Filter.cs
- PathSegmentCollection.cs
- DoubleAnimationBase.cs
- InlineUIContainer.cs
- PeerEndPoint.cs
- TransportChannelListener.cs
- QilBinary.cs
- XmlSortKey.cs
- MetafileHeader.cs
- PageContent.cs
- HtmlTextArea.cs
- Events.cs
- DataTableNewRowEvent.cs
- IsolatedStorageFilePermission.cs
- TransformPattern.cs
- DataRowView.cs
- TableRowCollection.cs
- AuthorizationRuleCollection.cs
- RenderingBiasValidation.cs
- PropertyDescriptorGridEntry.cs
- SchemaMerger.cs
- COM2PropertyDescriptor.cs
- Comparer.cs
- XmlnsDictionary.cs
- NavigationPropertyEmitter.cs
- KoreanLunisolarCalendar.cs
- TabletDevice.cs