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
- XsltSettings.cs
- MissingMethodException.cs
- ListViewDeletedEventArgs.cs
- ListViewPagedDataSource.cs
- DocumentSchemaValidator.cs
- ErrorEventArgs.cs
- MetabaseReader.cs
- ContentElement.cs
- OracleTimeSpan.cs
- SafeEventLogWriteHandle.cs
- EntityDataReader.cs
- MonikerBuilder.cs
- ToolboxItemImageConverter.cs
- EnumerableRowCollection.cs
- ApplicationServiceHelper.cs
- Scene3D.cs
- ObfuscateAssemblyAttribute.cs
- PrintPreviewDialog.cs
- HttpCacheVaryByContentEncodings.cs
- EmptyImpersonationContext.cs
- WindowsRegion.cs
- RepeatInfo.cs
- ProtocolViolationException.cs
- _TimerThread.cs
- DependencyPropertyValueSerializer.cs
- ListViewGroupItemCollection.cs
- assemblycache.cs
- ObjectDataSourceChooseTypePanel.cs
- RoleGroupCollection.cs
- MimeMultiPart.cs
- RadioButtonAutomationPeer.cs
- filewebresponse.cs
- SqlTriggerAttribute.cs
- AutomationPatternInfo.cs
- DBSqlParserTable.cs
- BufferedReadStream.cs
- PositiveTimeSpanValidator.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- BindingManagerDataErrorEventArgs.cs
- FormsAuthenticationEventArgs.cs
- SecurityTokenProvider.cs
- GlyphRunDrawing.cs
- WriterOutput.cs
- ValidationHelpers.cs
- WpfPayload.cs
- ScrollPatternIdentifiers.cs
- SqlFunctions.cs
- TreeViewDataItemAutomationPeer.cs
- CodeMemberField.cs
- Itemizer.cs
- GreenMethods.cs
- CompoundFileStreamReference.cs
- ConsoleCancelEventArgs.cs
- ResourceDescriptionAttribute.cs
- MessageEncodingBindingElement.cs
- ErrorFormatter.cs
- CellRelation.cs
- SkewTransform.cs
- UntrustedRecipientException.cs
- MarginCollapsingState.cs
- RadioButton.cs
- DbFunctionCommandTree.cs
- SqlCacheDependencySection.cs
- GroupLabel.cs
- FixedHighlight.cs
- ColumnResult.cs
- ErrorProvider.cs
- TreeNodeEventArgs.cs
- TextServicesProperty.cs
- MessageBox.cs
- InternalSafeNativeMethods.cs
- XmlTextWriter.cs
- ProviderConnectionPoint.cs
- WebPartTracker.cs
- InstanceDescriptor.cs
- CharacterBuffer.cs
- XmlSecureResolver.cs
- XmlSchemaComplexContentExtension.cs
- QueryHandler.cs
- SwitchElementsCollection.cs
- ArgumentValueSerializer.cs
- RelatedView.cs
- MarkupCompilePass1.cs
- AppDomainShutdownMonitor.cs
- ProviderConnectionPoint.cs
- MsmqIntegrationReceiveParameters.cs
- ScrollProperties.cs
- SoapUnknownHeader.cs
- HtmlAnchor.cs
- ClientTargetSection.cs
- EncodingTable.cs
- Itemizer.cs
- XmlSchemaInfo.cs
- AssociationSet.cs
- DrawingState.cs
- SpellerError.cs
- PieceDirectory.cs
- CommonObjectSecurity.cs
- ProfileBuildProvider.cs
- Emitter.cs