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
- WrappedKeySecurityTokenParameters.cs
- BindingSourceDesigner.cs
- SqlInfoMessageEvent.cs
- InstanceKeyCollisionException.cs
- RangeBase.cs
- PrinterSettings.cs
- WebReferenceCollection.cs
- _LazyAsyncResult.cs
- EdmError.cs
- DataPager.cs
- UpWmlMobileTextWriter.cs
- EntityUtil.cs
- CharacterBufferReference.cs
- Cell.cs
- Literal.cs
- OracleRowUpdatingEventArgs.cs
- Model3D.cs
- EpmSyndicationContentSerializer.cs
- RegexMatch.cs
- BigInt.cs
- regiisutil.cs
- UnknownWrapper.cs
- StorageConditionPropertyMapping.cs
- GuidelineCollection.cs
- ItemAutomationPeer.cs
- DictionaryBase.cs
- CodeAccessPermission.cs
- RootDesignerSerializerAttribute.cs
- ComponentConverter.cs
- SafeTokenHandle.cs
- RotateTransform3D.cs
- ComplexBindingPropertiesAttribute.cs
- BooleanStorage.cs
- DBCommand.cs
- SignatureGenerator.cs
- DataServiceRequestException.cs
- TranslateTransform3D.cs
- ImageMap.cs
- ServicePointManager.cs
- DispatcherProcessingDisabled.cs
- AutomationPattern.cs
- DataGridViewCellValueEventArgs.cs
- DbMetaDataCollectionNames.cs
- ReplyChannelBinder.cs
- MulticastDelegate.cs
- Calendar.cs
- CachedCompositeFamily.cs
- TextEffectCollection.cs
- QueryHandler.cs
- RolePrincipal.cs
- BinaryMethodMessage.cs
- MetricEntry.cs
- Schedule.cs
- ToolStripCustomTypeDescriptor.cs
- DeflateStream.cs
- SqlFunctionAttribute.cs
- TypeDescriptorContext.cs
- QueueException.cs
- lengthconverter.cs
- QueryContinueDragEvent.cs
- FileRegion.cs
- FontStretch.cs
- DoubleAnimationBase.cs
- CultureMapper.cs
- MailBnfHelper.cs
- TraceFilter.cs
- StateValidator.cs
- ObjectDataSourceEventArgs.cs
- CommonProperties.cs
- ScriptingProfileServiceSection.cs
- DashStyle.cs
- LabelEditEvent.cs
- EntityModelSchemaGenerator.cs
- TextureBrush.cs
- SatelliteContractVersionAttribute.cs
- OperationContext.cs
- ScrollProperties.cs
- ActionFrame.cs
- ParsedRoute.cs
- DocComment.cs
- documentsequencetextpointer.cs
- FullTextState.cs
- DrawingAttributes.cs
- XsdValidatingReader.cs
- SortQuery.cs
- InvariantComparer.cs
- VectorAnimationBase.cs
- MimeMultiPart.cs
- DialogResultConverter.cs
- UnmanagedMemoryStream.cs
- SynchronizationContext.cs
- CodeDirectiveCollection.cs
- ResolveNameEventArgs.cs
- DesignerVerbToolStripMenuItem.cs
- SqlBooleanizer.cs
- FlowDecision.cs
- ConfigurationLockCollection.cs
- FixedSOMPage.cs
- Crypto.cs
- JavaScriptSerializer.cs