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
- DbTransaction.cs
- DesignTimeVisibleAttribute.cs
- NetworkInformationPermission.cs
- FrameworkElementFactory.cs
- FocusWithinProperty.cs
- SQLSingle.cs
- SR.cs
- Axis.cs
- AuthenticationService.cs
- TokenBasedSetEnumerator.cs
- DataGridColumnsPage.cs
- Context.cs
- OutputScopeManager.cs
- BitmapEffectInputData.cs
- HMACMD5.cs
- Geometry3D.cs
- ConnectionPoolManager.cs
- MissingMethodException.cs
- HyperLinkField.cs
- FamilyCollection.cs
- DateBoldEvent.cs
- DropDownList.cs
- LexicalChunk.cs
- EpmCustomContentWriterNodeData.cs
- DecimalConverter.cs
- AdornerLayer.cs
- SiteMapDesignerDataSourceView.cs
- MgmtConfigurationRecord.cs
- TraceContextRecord.cs
- lengthconverter.cs
- InputProviderSite.cs
- NopReturnReader.cs
- RightsManagementPermission.cs
- KeyboardNavigation.cs
- ArglessEventHandlerProxy.cs
- SoapAttributes.cs
- HttpListenerPrefixCollection.cs
- ParameterRetriever.cs
- SimpleBitVector32.cs
- FlowDocumentReaderAutomationPeer.cs
- SqlProfileProvider.cs
- Latin1Encoding.cs
- ObjectSet.cs
- TextTreeUndoUnit.cs
- MemberAccessException.cs
- AsyncOperation.cs
- DataKeyArray.cs
- ToolStripDropDownClosingEventArgs.cs
- TargetPerspective.cs
- HandlerFactoryWrapper.cs
- ContextMenuStripGroup.cs
- SplashScreenNativeMethods.cs
- HwndTarget.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- SystemIPInterfaceProperties.cs
- FlatButtonAppearance.cs
- CustomMenuItemCollection.cs
- LinkArea.cs
- EntryWrittenEventArgs.cs
- ModelPerspective.cs
- SpotLight.cs
- IntSecurity.cs
- HttpHandlerAction.cs
- sqlstateclientmanager.cs
- DesignerDataSourceView.cs
- AnnotationAdorner.cs
- AlignmentXValidation.cs
- WindowsTab.cs
- DashStyle.cs
- basevalidator.cs
- CounterSampleCalculator.cs
- WebPartActionVerb.cs
- TextTabProperties.cs
- FactoryRecord.cs
- TracingConnectionListener.cs
- AppModelKnownContentFactory.cs
- EntityParameter.cs
- ToolStripPanelRow.cs
- HttpRequestTraceRecord.cs
- HttpStreamXmlDictionaryWriter.cs
- ScaleTransform.cs
- XslTransform.cs
- XmlSerializerFactory.cs
- XmlSchemaInclude.cs
- ReflectTypeDescriptionProvider.cs
- PropertyDescriptor.cs
- Encoder.cs
- ColorPalette.cs
- Rethrow.cs
- PointUtil.cs
- GetResponse.cs
- SQLMembershipProvider.cs
- Environment.cs
- MouseCaptureWithinProperty.cs
- DocumentGridPage.cs
- TextMarkerSource.cs
- StringAnimationUsingKeyFrames.cs
- SendKeys.cs
- SwitchCase.cs
- Matrix.cs