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
- FontUnit.cs
- VisualBrush.cs
- GeneralTransform3DGroup.cs
- SpellerHighlightLayer.cs
- Message.cs
- KeyInfo.cs
- IxmlLineInfo.cs
- WebBrowser.cs
- Identifier.cs
- WebBaseEventKeyComparer.cs
- WorkflowRuntimeService.cs
- PointHitTestParameters.cs
- WebRequest.cs
- TemplateLookupAction.cs
- MissingManifestResourceException.cs
- WebRequest.cs
- WebConfigurationManager.cs
- EdmEntityTypeAttribute.cs
- SimpleWorkerRequest.cs
- IfJoinedCondition.cs
- Task.cs
- EdmProperty.cs
- StreamReader.cs
- xmlglyphRunInfo.cs
- PageWrapper.cs
- GenericEnumerator.cs
- TableItemPattern.cs
- ReceiveContextCollection.cs
- BamlCollectionHolder.cs
- VectorCollection.cs
- InputLangChangeEvent.cs
- CompileLiteralTextParser.cs
- InstanceData.cs
- BuildProvider.cs
- CategoryAttribute.cs
- RuleSettingsCollection.cs
- IdentitySection.cs
- PeerName.cs
- PageBuildProvider.cs
- PersonalizationProviderCollection.cs
- CodeNamespaceImportCollection.cs
- CollectionViewGroup.cs
- ModelPropertyCollectionImpl.cs
- ToolStripDropDownMenu.cs
- SectionRecord.cs
- CodeEventReferenceExpression.cs
- FlowDocumentReaderAutomationPeer.cs
- PolyQuadraticBezierSegment.cs
- Geometry.cs
- OdbcErrorCollection.cs
- ServiceSecurityContext.cs
- SqlFunctionAttribute.cs
- TypefaceMap.cs
- TableItemPattern.cs
- CodeSnippetStatement.cs
- HelpPage.cs
- CharEntityEncoderFallback.cs
- Vector3DAnimationBase.cs
- DrawingCollection.cs
- TreeChangeInfo.cs
- BasicBrowserDialog.cs
- DbResourceAllocator.cs
- Predicate.cs
- RoutingEndpointTrait.cs
- MruCache.cs
- MeasureItemEvent.cs
- SelectedCellsCollection.cs
- XmlReader.cs
- ByeMessage11.cs
- DoWorkEventArgs.cs
- Transform3DGroup.cs
- CommandBinding.cs
- DynamicPropertyReader.cs
- GeneratedCodeAttribute.cs
- XmlSignificantWhitespace.cs
- ComponentConverter.cs
- MenuItemCollectionEditor.cs
- CfgArc.cs
- ExtenderProviderService.cs
- SHA512Managed.cs
- RequestTimeoutManager.cs
- HebrewCalendar.cs
- BinaryObjectInfo.cs
- _ListenerResponseStream.cs
- Schema.cs
- Cursors.cs
- TypeBuilder.cs
- PictureBoxDesigner.cs
- CurrentChangingEventManager.cs
- Rfc2898DeriveBytes.cs
- ResourceCategoryAttribute.cs
- SchemaObjectWriter.cs
- PublisherIdentityPermission.cs
- DesignUtil.cs
- FtpWebRequest.cs
- ShapingWorkspace.cs
- UIntPtr.cs
- ImmutableCollection.cs
- AuthenticationModulesSection.cs
- ResourceExpressionBuilder.cs