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
- Screen.cs
- ProcessModuleDesigner.cs
- ImageMap.cs
- WindowsListViewScroll.cs
- FontWeights.cs
- WebPartChrome.cs
- EventsTab.cs
- TcpProcessProtocolHandler.cs
- XmlSerializer.cs
- OleDbError.cs
- PenThreadPool.cs
- CalendarButtonAutomationPeer.cs
- SafeLocalMemHandle.cs
- HtmlInputButton.cs
- DockAndAnchorLayout.cs
- CalendarDateChangedEventArgs.cs
- HttpProfileGroupBase.cs
- oledbmetadatacollectionnames.cs
- Condition.cs
- RelatedCurrencyManager.cs
- AssemblyHash.cs
- ConfigurationPropertyCollection.cs
- CustomAttributeFormatException.cs
- DataGridColumnHeaderCollection.cs
- DataExpression.cs
- SecurityTokenRequirement.cs
- TypeNameHelper.cs
- OneWayBindingElement.cs
- WebPartManager.cs
- FontStyle.cs
- ContainerSelectorGlyph.cs
- CompilerScopeManager.cs
- NeutralResourcesLanguageAttribute.cs
- DateBoldEvent.cs
- SchemaConstraints.cs
- MouseOverProperty.cs
- MarkupCompilePass2.cs
- BatchParser.cs
- BaseDataBoundControl.cs
- XmlSchemaImporter.cs
- TimerTable.cs
- SpecularMaterial.cs
- ComNativeDescriptor.cs
- ConnectivityStatus.cs
- AssemblyResourceLoader.cs
- DataGridRow.cs
- Rect3D.cs
- LongValidator.cs
- XmlDomTextWriter.cs
- TextElement.cs
- FileAuthorizationModule.cs
- BuildResultCache.cs
- OperationPerformanceCounters.cs
- PropertyChangedEventArgs.cs
- _NtlmClient.cs
- RelativeSource.cs
- CommandBindingCollection.cs
- VirtualPathUtility.cs
- SharedPerformanceCounter.cs
- ButtonBase.cs
- LinkAreaEditor.cs
- connectionpool.cs
- DirectoryGroupQuery.cs
- VersionConverter.cs
- FormatConvertedBitmap.cs
- DataSourceView.cs
- PersonalizationEntry.cs
- DBConnection.cs
- RepeaterItemCollection.cs
- LineBreakRecord.cs
- __Error.cs
- SizeLimitedCache.cs
- TabPageDesigner.cs
- TcpClientSocketManager.cs
- ClientData.cs
- MappingException.cs
- ModulesEntry.cs
- StackBuilderSink.cs
- TableRowGroup.cs
- ListInitExpression.cs
- State.cs
- WebPartConnectVerb.cs
- BookmarkWorkItem.cs
- GridSplitterAutomationPeer.cs
- lengthconverter.cs
- WebBrowserBase.cs
- WaitForChangedResult.cs
- assertwrapper.cs
- CapiSymmetricAlgorithm.cs
- IisTraceListener.cs
- QueryInterceptorAttribute.cs
- VisualTreeUtils.cs
- SapiRecognizer.cs
- XmlWrappingReader.cs
- HttpCachePolicyElement.cs
- AnnotationComponentChooser.cs
- CodeCommentStatement.cs
- OperationResponse.cs
- WebPartConnectionsConfigureVerb.cs
- _BufferOffsetSize.cs