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
- CapabilitiesPattern.cs
- Properties.cs
- ExclusiveTcpListener.cs
- HttpFileCollection.cs
- ADConnectionHelper.cs
- DrawingVisual.cs
- EdmMember.cs
- NavigationPropertySingletonExpression.cs
- ExpressionConverter.cs
- TransformPatternIdentifiers.cs
- FieldAccessException.cs
- StructuralType.cs
- OrderedDictionaryStateHelper.cs
- XNodeNavigator.cs
- Oci.cs
- DecimalKeyFrameCollection.cs
- InternalControlCollection.cs
- PopupRootAutomationPeer.cs
- DockPanel.cs
- SystemException.cs
- CompiledRegexRunner.cs
- WpfMemberInvoker.cs
- LinqToSqlWrapper.cs
- PeerContact.cs
- ToggleButtonAutomationPeer.cs
- AlphaSortedEnumConverter.cs
- Substitution.cs
- ToolBarTray.cs
- WizardStepCollectionEditor.cs
- PersonalizationProvider.cs
- ObjectAnimationUsingKeyFrames.cs
- DataObjectAttribute.cs
- SystemThemeKey.cs
- TracingConnectionInitiator.cs
- XmlArrayItemAttribute.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- HyperLink.cs
- SecurityPolicySection.cs
- WhitespaceRule.cs
- ZipFileInfoCollection.cs
- VirtualizedItemPattern.cs
- FilterQueryOptionExpression.cs
- AutomationIdentifier.cs
- MouseGestureConverter.cs
- ReliableInputConnection.cs
- FlowLayoutPanelDesigner.cs
- MulticastDelegate.cs
- ProfilePropertySettings.cs
- CfgArc.cs
- NavigationFailedEventArgs.cs
- GroupJoinQueryOperator.cs
- ButtonPopupAdapter.cs
- DrawingVisual.cs
- HelpProvider.cs
- QueueProcessor.cs
- CodeExpressionCollection.cs
- Config.cs
- Pen.cs
- TableLayoutSettingsTypeConverter.cs
- DataBindingCollection.cs
- EventSetterHandlerConverter.cs
- OracleRowUpdatingEventArgs.cs
- Polygon.cs
- GroupBoxAutomationPeer.cs
- SessionEndedEventArgs.cs
- HuffModule.cs
- XmlElementCollection.cs
- PropertyStore.cs
- Control.cs
- RepeatInfo.cs
- CharacterBufferReference.cs
- Transform3DGroup.cs
- ListViewCommandEventArgs.cs
- DesignerTransaction.cs
- PeerFlooder.cs
- EventProperty.cs
- GridViewCellAutomationPeer.cs
- LinkedResourceCollection.cs
- ErrorHandlerModule.cs
- EncryptedReference.cs
- CallbackValidatorAttribute.cs
- URI.cs
- PagesChangedEventArgs.cs
- DNS.cs
- GetIndexBinder.cs
- SqlClientWrapperSmiStreamChars.cs
- TrackingValidationObjectDictionary.cs
- SrgsRule.cs
- TogglePattern.cs
- WorkflowOwnerAsyncResult.cs
- SourceLineInfo.cs
- FixedPageStructure.cs
- TraceLog.cs
- ScrollProviderWrapper.cs
- SettingsPropertyWrongTypeException.cs
- StringDictionaryCodeDomSerializer.cs
- SecurityCookieModeValidator.cs
- EntityCommandExecutionException.cs
- AudioLevelUpdatedEventArgs.cs
- MultiBindingExpression.cs