Code:
/ DotNET / DotNET / 8.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
- RegexMatch.cs
- ActiveDesignSurfaceEvent.cs
- ImageFormat.cs
- AspNetSynchronizationContext.cs
- DodSequenceMerge.cs
- graph.cs
- OutputCacheSettings.cs
- HMAC.cs
- DataGridRowHeaderAutomationPeer.cs
- X509SecurityToken.cs
- CatalogPartChrome.cs
- MonthChangedEventArgs.cs
- NetworkAddressChange.cs
- WebPartConnectionsCloseVerb.cs
- ThousandthOfEmRealDoubles.cs
- AppDomainInfo.cs
- XmlValidatingReaderImpl.cs
- OpCodes.cs
- HttpWebResponse.cs
- WindowsIdentity.cs
- XsltInput.cs
- MenuItemBinding.cs
- DelegateSerializationHolder.cs
- MediaTimeline.cs
- WebBrowserNavigatingEventHandler.cs
- MenuItem.cs
- CustomValidator.cs
- ListViewInsertionMark.cs
- BamlRecords.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- InfocardChannelParameter.cs
- FtpWebRequest.cs
- DiscreteKeyFrames.cs
- Membership.cs
- StatusBar.cs
- Baml2006KnownTypes.cs
- FontNamesConverter.cs
- VerificationAttribute.cs
- CompensatableTransactionScopeActivity.cs
- ExceptionUtil.cs
- Membership.cs
- Brush.cs
- WebPartMovingEventArgs.cs
- TypeToken.cs
- DataGridDetailsPresenterAutomationPeer.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- CorrelationManager.cs
- HtmlObjectListAdapter.cs
- GuidelineSet.cs
- ProtocolInformationReader.cs
- SortAction.cs
- SecurityTokenAuthenticator.cs
- ProfileSettings.cs
- CharAnimationBase.cs
- Model3DGroup.cs
- StatusBarPanelClickEvent.cs
- ObfuscateAssemblyAttribute.cs
- PerformanceCounterNameAttribute.cs
- PropVariant.cs
- GACIdentityPermission.cs
- GeneralTransformCollection.cs
- ProfileServiceManager.cs
- SecurityCapabilities.cs
- AccessDataSourceWizardForm.cs
- WpfSharedXamlSchemaContext.cs
- PageBuildProvider.cs
- FastPropertyAccessor.cs
- ZipIOCentralDirectoryFileHeader.cs
- FormsAuthenticationTicket.cs
- LinkClickEvent.cs
- FamilyMap.cs
- validationstate.cs
- SortableBindingList.cs
- ExceptionUtil.cs
- PropertySourceInfo.cs
- BinaryReader.cs
- DoneReceivingAsyncResult.cs
- SqlDataSourceQuery.cs
- Transform3DGroup.cs
- RuntimeCompatibilityAttribute.cs
- IsolationInterop.cs
- DispatcherFrame.cs
- GenericTextProperties.cs
- LinqDataSourceInsertEventArgs.cs
- VersionedStream.cs
- ProcessHostConfigUtils.cs
- TrackBarRenderer.cs
- AnnotationAdorner.cs
- Animatable.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- XmlSchemaSimpleTypeUnion.cs
- DataGridTextBoxColumn.cs
- panel.cs
- CompilationSection.cs
- AnnotationResourceCollection.cs
- DataGridViewRow.cs
- TransformerTypeCollection.cs
- SqlNotificationEventArgs.cs
- ErrorFormatter.cs
- XamlToRtfWriter.cs