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
- Registration.cs
- safex509handles.cs
- PermissionToken.cs
- KeyGesture.cs
- RegionIterator.cs
- MemberAccessException.cs
- ConfigurationStrings.cs
- ColorTranslator.cs
- CellTreeNodeVisitors.cs
- WaitForChangedResult.cs
- NoClickablePointException.cs
- Membership.cs
- RegexMatchCollection.cs
- OlePropertyStructs.cs
- Html32TextWriter.cs
- XmlnsCompatibleWithAttribute.cs
- MediaSystem.cs
- cookie.cs
- FunctionCommandText.cs
- HtmlWindow.cs
- LayoutEditorPart.cs
- NavigateUrlConverter.cs
- EncoderNLS.cs
- HTTPRemotingHandler.cs
- TemplateKeyConverter.cs
- SignatureConfirmations.cs
- BatchWriter.cs
- DispatchChannelSink.cs
- CodeTypeDeclarationCollection.cs
- IssuedTokenParametersEndpointAddressElement.cs
- TraceLog.cs
- LinkLabel.cs
- TargetInvocationException.cs
- XmlComment.cs
- SystemIPInterfaceStatistics.cs
- ItemDragEvent.cs
- Symbol.cs
- ClientSideProviderDescription.cs
- EventProxy.cs
- AccessDataSourceView.cs
- HitTestFilterBehavior.cs
- LifetimeServices.cs
- DataMisalignedException.cs
- WorkflowShape.cs
- MemberAccessException.cs
- ExtensionDataReader.cs
- ReachFixedPageSerializerAsync.cs
- BinHexDecoder.cs
- InputReportEventArgs.cs
- ConfigXmlCDataSection.cs
- XmlValueConverter.cs
- RotationValidation.cs
- XmlFormatReaderGenerator.cs
- XmlNamespaceManager.cs
- SecurityPolicySection.cs
- BamlLocalizableResource.cs
- ToolZone.cs
- ColorMap.cs
- Adorner.cs
- WindowsHyperlink.cs
- StrongTypingException.cs
- XmlQueryRuntime.cs
- DocumentViewer.cs
- ADConnectionHelper.cs
- __Filters.cs
- DataSourceView.cs
- XPathDocumentNavigator.cs
- BinaryMessageFormatter.cs
- TreeNodeCollection.cs
- ToolTip.cs
- CreateSequence.cs
- DataListCommandEventArgs.cs
- ListBindableAttribute.cs
- KeyValuePair.cs
- CompositeFontParser.cs
- GridItem.cs
- DrawingDrawingContext.cs
- ObjectCloneHelper.cs
- PrintPreviewDialog.cs
- RulePatternOps.cs
- DoubleAnimationUsingPath.cs
- BoundColumn.cs
- WebPartConnectionsCancelVerb.cs
- TokenizerHelper.cs
- ChtmlPhoneCallAdapter.cs
- MarkupCompilePass2.cs
- SystemResourceHost.cs
- OleDbDataAdapter.cs
- PersonalizationEntry.cs
- TemplateControlParser.cs
- ScrollBar.cs
- BinaryUtilClasses.cs
- SqlUserDefinedAggregateAttribute.cs
- EventWaitHandleSecurity.cs
- DocumentNUp.cs
- BamlLocalizableResourceKey.cs
- BamlLocalizer.cs
- SortAction.cs
- LinqDataSourceHelper.cs
- _NativeSSPI.cs