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
- FieldNameLookup.cs
- ProcessHost.cs
- SemanticBasicElement.cs
- Pkcs7Recipient.cs
- IImplicitResourceProvider.cs
- ProtocolsConfigurationEntry.cs
- BuilderInfo.cs
- SoapSchemaMember.cs
- InteropBitmapSource.cs
- ContentAlignmentEditor.cs
- DataGridHelper.cs
- FontStyles.cs
- DeleteStoreRequest.cs
- EtwTrace.cs
- assertwrapper.cs
- PropertyGroupDescription.cs
- UpdatePanelControlTrigger.cs
- EncryptedReference.cs
- PropertyConverter.cs
- EntityParameter.cs
- GlobalEventManager.cs
- FragmentQuery.cs
- IISMapPath.cs
- TriState.cs
- XamlPathDataSerializer.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ObjectDisposedException.cs
- SecurityUtils.cs
- DataContractSerializer.cs
- MultilineStringEditor.cs
- GeometryCollection.cs
- TypeDefinition.cs
- WebServiceParameterData.cs
- PermissionRequestEvidence.cs
- ThreadSafeList.cs
- SaveFileDialog.cs
- TransformerInfoCollection.cs
- WinFormsComponentEditor.cs
- panel.cs
- Attributes.cs
- TimeoutException.cs
- MetadataArtifactLoader.cs
- HtmlControlPersistable.cs
- DrawingVisual.cs
- Translator.cs
- TextContainerChangedEventArgs.cs
- RectangleConverter.cs
- TextTreeInsertElementUndoUnit.cs
- BreakRecordTable.cs
- ClientRoleProvider.cs
- EllipseGeometry.cs
- ScriptReference.cs
- XamlTemplateSerializer.cs
- ResumeStoryboard.cs
- base64Transforms.cs
- Ref.cs
- CharacterBuffer.cs
- XPathDocumentIterator.cs
- IInstanceTable.cs
- InkCanvasSelection.cs
- SrgsElement.cs
- TreePrinter.cs
- NumberSubstitution.cs
- ThreadStateException.cs
- Parameter.cs
- SqlProviderUtilities.cs
- CompletionCallbackWrapper.cs
- UpDownBase.cs
- xmlfixedPageInfo.cs
- SchemaEntity.cs
- NodeLabelEditEvent.cs
- SharedUtils.cs
- UpdateTranslator.cs
- NullReferenceException.cs
- ClientBuildManagerCallback.cs
- _CacheStreams.cs
- DataServiceHostFactory.cs
- MetadataItemCollectionFactory.cs
- ObjectDisposedException.cs
- ItemType.cs
- PrimitiveRenderer.cs
- XmlSchemaParticle.cs
- SystemWebSectionGroup.cs
- Animatable.cs
- WebPartEditVerb.cs
- OdbcEnvironmentHandle.cs
- OperationAbortedException.cs
- ZipIOExtraFieldZip64Element.cs
- DataGrid.cs
- BitmapScalingModeValidation.cs
- DataGridAddNewRow.cs
- DataRowExtensions.cs
- TabItemWrapperAutomationPeer.cs
- ExpressionBuilderCollection.cs
- ListViewTableRow.cs
- ToolStripContentPanelRenderEventArgs.cs
- DrawListViewSubItemEventArgs.cs
- SerialPinChanges.cs
- SecuritySessionFilter.cs
- DesignerCatalogPartChrome.cs