Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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(); } } } // 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
- HorizontalAlignConverter.cs
- ImageList.cs
- XmlSchemaAttribute.cs
- UrlMapping.cs
- UInt16Converter.cs
- QueueException.cs
- ContextDataSourceView.cs
- SingleObjectCollection.cs
- storepermissionattribute.cs
- PublisherIdentityPermission.cs
- Action.cs
- ContextMenuService.cs
- ByteStack.cs
- FormatSettings.cs
- OleDbPropertySetGuid.cs
- CodeTypeReferenceCollection.cs
- RegexNode.cs
- SqlDataSourceConfigureFilterForm.cs
- WebReferencesBuildProvider.cs
- AppearanceEditorPart.cs
- ResourceProviderFactory.cs
- ConfigurationSectionHelper.cs
- QilStrConcat.cs
- ObsoleteAttribute.cs
- SecurityPolicySection.cs
- XPathNodeHelper.cs
- InternalRelationshipCollection.cs
- DynamicValueConverter.cs
- AxHost.cs
- AutoCompleteStringCollection.cs
- SessionState.cs
- TypeToStringValueConverter.cs
- PixelFormat.cs
- ProvideValueServiceProvider.cs
- ToolStripSplitButton.cs
- SocketElement.cs
- InheritanceContextChangedEventManager.cs
- TraceAsyncResult.cs
- HTMLTextWriter.cs
- BidirectionalDictionary.cs
- UIElementParagraph.cs
- GeometryGroup.cs
- XmlSchemaImporter.cs
- JoinElimination.cs
- BaseHashHelper.cs
- SmtpException.cs
- GradientStop.cs
- SystemIPv6InterfaceProperties.cs
- EventListenerClientSide.cs
- ContainerParaClient.cs
- AttributedMetaModel.cs
- Margins.cs
- StorageEntityTypeMapping.cs
- SoapAttributeAttribute.cs
- MouseButton.cs
- DataRowChangeEvent.cs
- IdleTimeoutMonitor.cs
- FontWeightConverter.cs
- FormattedText.cs
- SqlSelectStatement.cs
- Vector3DKeyFrameCollection.cs
- DecimalAnimation.cs
- FontInfo.cs
- ProviderConnectionPointCollection.cs
- TemplatePartAttribute.cs
- NativeMethods.cs
- ConfigurationCollectionAttribute.cs
- ConnectorDragDropGlyph.cs
- Message.cs
- AnnotationAdorner.cs
- NativeMethodsOther.cs
- StringBuilder.cs
- ContentControl.cs
- AttributeCollection.cs
- HandlerBase.cs
- MouseDevice.cs
- ObfuscateAssemblyAttribute.cs
- Item.cs
- ScrollChrome.cs
- ProfileGroupSettingsCollection.cs
- ImageCodecInfoPrivate.cs
- oledbconnectionstring.cs
- OpenTypeLayout.cs
- Missing.cs
- CollectionViewGroupInternal.cs
- FontSourceCollection.cs
- PenThreadPool.cs
- DocumentXmlWriter.cs
- ContentPathSegment.cs
- MexTcpBindingElement.cs
- AutoCompleteStringCollection.cs
- LineGeometry.cs
- TabControl.cs
- ToolboxBitmapAttribute.cs
- RadioButtonList.cs
- CapiSafeHandles.cs
- MetadataExporter.cs
- ClientBuildManager.cs
- ChameleonKey.cs
- RectangleConverter.cs