Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- WindowsGrip.cs
- HotSpot.cs
- MeshGeometry3D.cs
- ChooseAction.cs
- _BufferOffsetSize.cs
- Span.cs
- LiteralLink.cs
- SemanticValue.cs
- LostFocusEventManager.cs
- SyndicationFeed.cs
- CssClassPropertyAttribute.cs
- TextTreeRootNode.cs
- Reference.cs
- InvariantComparer.cs
- SerializationFieldInfo.cs
- PropertyDescriptorComparer.cs
- FixedSOMTable.cs
- PeerToPeerException.cs
- SchemaMerger.cs
- AuthStoreRoleProvider.cs
- CacheHelper.cs
- UnsafePeerToPeerMethods.cs
- ListDictionary.cs
- LocalBuilder.cs
- CurrencyManager.cs
- DbConnectionHelper.cs
- CapiSymmetricAlgorithm.cs
- ServiceHttpHandlerFactory.cs
- MultiAsyncResult.cs
- CredentialCache.cs
- TypeLibConverter.cs
- ProcessModelInfo.cs
- PartitionResolver.cs
- SynchronizationFilter.cs
- DetailsView.cs
- NamedPipeConnectionPoolSettings.cs
- DataControlButton.cs
- TransformerInfoCollection.cs
- EntityContainerEntitySetDefiningQuery.cs
- PropertyPushdownHelper.cs
- XmlNodeChangedEventManager.cs
- RangeBaseAutomationPeer.cs
- ParameterBuilder.cs
- BindToObject.cs
- VisualStyleRenderer.cs
- PrimitiveSchema.cs
- DbProviderSpecificTypePropertyAttribute.cs
- GreenMethods.cs
- RowTypeElement.cs
- FixedDocumentSequencePaginator.cs
- RayHitTestParameters.cs
- XmlText.cs
- MasterPageParser.cs
- ActionFrame.cs
- ColumnPropertiesGroup.cs
- TreeBuilderBamlTranslator.cs
- Point3DKeyFrameCollection.cs
- LineServicesRun.cs
- SQLInt64Storage.cs
- TreeNodeEventArgs.cs
- SecurityChannelFaultConverter.cs
- XMLUtil.cs
- FlowNode.cs
- SQLStringStorage.cs
- TrustManager.cs
- DetailsViewCommandEventArgs.cs
- EnumType.cs
- TemplateBindingExpressionConverter.cs
- SiteMapPath.cs
- CorrelationResolver.cs
- HandlerWithFactory.cs
- FontSource.cs
- ReflectionPermission.cs
- InvalidOleVariantTypeException.cs
- SqlDataSourceCustomCommandEditor.cs
- AddressHeader.cs
- TaskFileService.cs
- MachineKeySection.cs
- MethodBuilderInstantiation.cs
- StyleBamlRecordReader.cs
- XmlWriterSettings.cs
- ProjectionCamera.cs
- NullableConverter.cs
- SynchronizingStream.cs
- EntityContainerRelationshipSet.cs
- NumericUpDown.cs
- MetadataException.cs
- CredentialCache.cs
- XmlSecureResolver.cs
- SqlProcedureAttribute.cs
- WorkerRequest.cs
- ColorMap.cs
- FormViewPageEventArgs.cs
- SymLanguageVendor.cs
- Button.cs
- FigureParaClient.cs
- odbcmetadatacollectionnames.cs
- PropertyStore.cs
- SupportsEventValidationAttribute.cs
- AspNetSynchronizationContext.cs