Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Vector.cs
- UpdateDelegates.Generated.cs
- PermissionSetEnumerator.cs
- XamlWriter.cs
- AnnouncementEndpointElement.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ClonableStack.cs
- ColorMatrix.cs
- ProcessModelSection.cs
- PropertyMappingExceptionEventArgs.cs
- OracleFactory.cs
- ObjectDataSource.cs
- LocalizableResourceBuilder.cs
- TransformPatternIdentifiers.cs
- BindingExpressionBase.cs
- TextBox.cs
- VisualStyleRenderer.cs
- MemoryRecordBuffer.cs
- ProcessHost.cs
- RemoteWebConfigurationHostServer.cs
- BinaryObjectInfo.cs
- ScalarRestriction.cs
- PolygonHotSpot.cs
- DynamicValidatorEventArgs.cs
- SetStoryboardSpeedRatio.cs
- RequestQueue.cs
- ExpressionConverter.cs
- SmtpTransport.cs
- PropertyItemInternal.cs
- ElementsClipboardData.cs
- BaseTemplateBuildProvider.cs
- EventProxy.cs
- ApplyImportsAction.cs
- XmlDocumentSerializer.cs
- DataGridViewImageColumn.cs
- IisHelper.cs
- Preprocessor.cs
- BitmapCodecInfoInternal.cs
- ResizeBehavior.cs
- XsdBuilder.cs
- XmlIlGenerator.cs
- WMIInterop.cs
- String.cs
- WebPartsSection.cs
- SchemaCollectionPreprocessor.cs
- JournalEntry.cs
- HealthMonitoringSection.cs
- XhtmlBasicTextBoxAdapter.cs
- CustomPopupPlacement.cs
- AQNBuilder.cs
- ProbeDuplexAsyncResult.cs
- DataGridViewIntLinkedList.cs
- Int32AnimationBase.cs
- EdmTypeAttribute.cs
- HttpModule.cs
- MenuItem.cs
- DateTimeConstantAttribute.cs
- InputEventArgs.cs
- XmlNodeList.cs
- FileLogRecordEnumerator.cs
- CssTextWriter.cs
- CustomErrorsSectionWrapper.cs
- DLinqDataModelProvider.cs
- HttpModuleActionCollection.cs
- ApplicationFileCodeDomTreeGenerator.cs
- _SslStream.cs
- MediaScriptCommandRoutedEventArgs.cs
- ReturnValue.cs
- Opcode.cs
- SqlRetyper.cs
- ClientSession.cs
- RSAOAEPKeyExchangeFormatter.cs
- PointLightBase.cs
- XmlWriterDelegator.cs
- SymmetricCryptoHandle.cs
- AutomationPattern.cs
- DeclarationUpdate.cs
- Rijndael.cs
- AttachedPropertyBrowsableAttribute.cs
- WebCategoryAttribute.cs
- BinaryKeyIdentifierClause.cs
- SchemaObjectWriter.cs
- ParallelDesigner.cs
- ConnectionOrientedTransportChannelListener.cs
- WebConfigurationManager.cs
- XmlQualifiedNameTest.cs
- WaitHandle.cs
- AtomMaterializerLog.cs
- Module.cs
- PointHitTestParameters.cs
- SystemIPInterfaceStatistics.cs
- ExpressionBindingCollection.cs
- WindowsGrip.cs
- WpfXamlMember.cs
- ProfileGroupSettings.cs
- ExtractorMetadata.cs
- Axis.cs
- FolderBrowserDialog.cs
- ZipIOExtraFieldElement.cs
- BindableTemplateBuilder.cs