Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- InternalBase.cs
- AtlasWeb.Designer.cs
- CodeGenerator.cs
- RegexParser.cs
- LineServices.cs
- SwitchLevelAttribute.cs
- DependentList.cs
- IndicShape.cs
- CriticalExceptions.cs
- ErasingStroke.cs
- HandlerWithFactory.cs
- AttributedMetaModel.cs
- UpdateEventArgs.cs
- GetTokenRequest.cs
- FontDialog.cs
- TypedDatasetGenerator.cs
- ScrollChrome.cs
- ObsoleteAttribute.cs
- DataGridViewComponentPropertyGridSite.cs
- ConfigurationSectionHelper.cs
- DropSourceBehavior.cs
- FontSourceCollection.cs
- SymDocumentType.cs
- QueryStack.cs
- VirtualDirectoryMapping.cs
- RenderData.cs
- CaseCqlBlock.cs
- DiscoveryRequestHandler.cs
- XsdBuildProvider.cs
- BStrWrapper.cs
- FullTrustAssembly.cs
- DataBindEngine.cs
- MatrixAnimationUsingPath.cs
- Vector3DAnimationBase.cs
- lengthconverter.cs
- DbXmlEnabledProviderManifest.cs
- ProjectionPlan.cs
- XmlLanguage.cs
- StreamInfo.cs
- IProducerConsumerCollection.cs
- DeflateStream.cs
- GradientStopCollection.cs
- ColorAnimationBase.cs
- AppSettingsSection.cs
- CodeNamespaceImportCollection.cs
- Int16KeyFrameCollection.cs
- StreamResourceInfo.cs
- ReadOnlyDictionary.cs
- FirewallWrapper.cs
- EdmItemError.cs
- XmlSchemaImport.cs
- Content.cs
- DynamicILGenerator.cs
- AddInToken.cs
- TypeExtensionSerializer.cs
- XmlAttributeOverrides.cs
- CapiNative.cs
- ButtonChrome.cs
- XmlSchemaSimpleTypeRestriction.cs
- TraceContext.cs
- CustomTypeDescriptor.cs
- SafeCertificateContext.cs
- XmlSchemaFacet.cs
- SQLByteStorage.cs
- UnsafeNativeMethods.cs
- DataSourceDesigner.cs
- ClickablePoint.cs
- DbProviderFactory.cs
- MenuItemStyle.cs
- SqlDataSourceEnumerator.cs
- XmlDocument.cs
- MouseGestureConverter.cs
- UnknownBitmapEncoder.cs
- XPathNavigatorKeyComparer.cs
- Compiler.cs
- PasswordDeriveBytes.cs
- DetailsViewDeletedEventArgs.cs
- XmlQueryRuntime.cs
- ExtendedPropertyDescriptor.cs
- FormsAuthenticationModule.cs
- MetabaseSettingsIis7.cs
- Ipv6Element.cs
- ScriptManager.cs
- Translator.cs
- DbDataRecord.cs
- EntityWrapperFactory.cs
- GiveFeedbackEvent.cs
- MultitargetUtil.cs
- BindingManagerDataErrorEventArgs.cs
- NetWebProxyFinder.cs
- SafeJobHandle.cs
- UMPAttributes.cs
- DrawItemEvent.cs
- BulletedListEventArgs.cs
- XslTransform.cs
- PropertyDescriptor.cs
- GrammarBuilder.cs
- LinkedList.cs
- ResourceExpressionBuilder.cs
- IdentitySection.cs