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
- ProfileSettingsCollection.cs
- HttpProfileBase.cs
- Argument.cs
- Helper.cs
- ButtonBase.cs
- MaskedTextBox.cs
- DuplexChannelFactory.cs
- WebRequestModuleElement.cs
- HttpBrowserCapabilitiesWrapper.cs
- EntitySet.cs
- TemplateBamlRecordReader.cs
- GridViewEditEventArgs.cs
- ObjectSecurity.cs
- BindingsCollection.cs
- Shape.cs
- ListBoxAutomationPeer.cs
- NullExtension.cs
- messageonlyhwndwrapper.cs
- IriParsingElement.cs
- InvokeBase.cs
- ItemMap.cs
- WindowCollection.cs
- RegexCapture.cs
- StylusDevice.cs
- FileVersionInfo.cs
- TypedRowHandler.cs
- PrefixQName.cs
- EntityContainerEntitySetDefiningQuery.cs
- TheQuery.cs
- NumberSubstitution.cs
- SecurityElementBase.cs
- StaticSiteMapProvider.cs
- HttpServerUtilityWrapper.cs
- DrawingServices.cs
- FunctionQuery.cs
- CompilerTypeWithParams.cs
- GradientBrush.cs
- BinaryWriter.cs
- DefaultBindingPropertyAttribute.cs
- CacheDict.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ConnectionConsumerAttribute.cs
- BinaryParser.cs
- FrameworkElementFactoryMarkupObject.cs
- ExpressionBuilder.cs
- keycontainerpermission.cs
- XmlSchemaAny.cs
- QueryPageSettingsEventArgs.cs
- HashRepartitionStream.cs
- DependencyObject.cs
- DataSetUtil.cs
- SqlDataReaderSmi.cs
- CategoryGridEntry.cs
- CommonObjectSecurity.cs
- MetabaseSettingsIis7.cs
- CodeDirectiveCollection.cs
- DeleteHelper.cs
- FakeModelPropertyImpl.cs
- SecurityElement.cs
- PrimitiveXmlSerializers.cs
- InputProcessorProfilesLoader.cs
- Misc.cs
- BinarySerializer.cs
- DocumentViewerBaseAutomationPeer.cs
- ISAPIRuntime.cs
- CommandExpr.cs
- WindowsFormsHost.cs
- RuleValidation.cs
- HttpConfigurationSystem.cs
- EntityDescriptor.cs
- ChangesetResponse.cs
- PerfCounterSection.cs
- EncryptedPackageFilter.cs
- BitVector32.cs
- MobileTextWriter.cs
- ValidationSummary.cs
- AssemblyHash.cs
- HebrewCalendar.cs
- TableParagraph.cs
- Buffer.cs
- ClientSettings.cs
- WmfPlaceableFileHeader.cs
- FixedSOMGroup.cs
- Validator.cs
- OdbcPermission.cs
- NavigatorInput.cs
- behaviorssection.cs
- NCryptNative.cs
- TextDecorationUnitValidation.cs
- RtfNavigator.cs
- BrowsableAttribute.cs
- DoubleLinkListEnumerator.cs
- BezierSegment.cs
- FormatterConverter.cs
- EntityKey.cs
- GridView.cs
- ShutDownListener.cs
- SQLCharsStorage.cs
- ClientSponsor.cs
- Journaling.cs