Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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(); } } }/// Overrides object's ToString(). /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EpmCustomContentSerializer.cs
- FilterQueryOptionExpression.cs
- XmlBinaryReader.cs
- SymDocumentType.cs
- EmissiveMaterial.cs
- PersianCalendar.cs
- DataViewSetting.cs
- DesignerDataSchemaClass.cs
- SimpleType.cs
- ChangePassword.cs
- RepeaterCommandEventArgs.cs
- HandleRef.cs
- Brush.cs
- ReflectionUtil.cs
- DispatchChannelSink.cs
- DecimalAverageAggregationOperator.cs
- TypeDependencyAttribute.cs
- EventTask.cs
- SharedUtils.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- RegexRunner.cs
- SpecialFolderEnumConverter.cs
- XmlSerializationReader.cs
- ExpressionReplacer.cs
- WebMessageEncodingElement.cs
- FixedSOMFixedBlock.cs
- OperationContext.cs
- SqlDataSourceSelectingEventArgs.cs
- DomainUpDown.cs
- coordinatorfactory.cs
- DesignerSerializerAttribute.cs
- RegexWorker.cs
- WebEventTraceProvider.cs
- SqlUtils.cs
- TransformBlockRequest.cs
- ObjectDataSourceSelectingEventArgs.cs
- SqlNodeAnnotations.cs
- Calendar.cs
- CheckBoxBaseAdapter.cs
- SqlProviderManifest.cs
- ExpressionBinding.cs
- RepeaterItemCollection.cs
- DaylightTime.cs
- TreeViewImageKeyConverter.cs
- WebServicesDescriptionAttribute.cs
- SiteMapSection.cs
- PropertyChangedEventArgs.cs
- DependencyProperty.cs
- DbgCompiler.cs
- DelegateBodyWriter.cs
- SingleAnimationBase.cs
- QualifiedCellIdBoolean.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- GuidelineSet.cs
- CounterCreationDataCollection.cs
- CacheRequest.cs
- LinearKeyFrames.cs
- KeyboardDevice.cs
- ThicknessKeyFrameCollection.cs
- HttpCacheParams.cs
- QueryCorrelationInitializer.cs
- RectangleHotSpot.cs
- XmlArrayItemAttribute.cs
- FlowDocumentReaderAutomationPeer.cs
- Setter.cs
- LabelEditEvent.cs
- AssemblyCollection.cs
- SafeRegistryHandle.cs
- SpeechRecognizer.cs
- XPathParser.cs
- Span.cs
- rsa.cs
- PropertyEmitter.cs
- WebConfigurationHost.cs
- StreamingContext.cs
- CompilerHelpers.cs
- FromReply.cs
- httpapplicationstate.cs
- CodePropertyReferenceExpression.cs
- InsufficientMemoryException.cs
- CLSCompliantAttribute.cs
- PatternMatcher.cs
- Attributes.cs
- FormViewUpdateEventArgs.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- XpsFixedPageReaderWriter.cs
- SecurityValidationBehavior.cs
- SQLDoubleStorage.cs
- XLinq.cs
- QueryExtender.cs
- HostSecurityManager.cs
- RegexWriter.cs
- UnsafeNativeMethods.cs
- XmlEnumAttribute.cs
- RTLAwareMessageBox.cs
- DataSourceGroupCollection.cs
- MergePropertyDescriptor.cs
- WebScriptServiceHostFactory.cs
- DataGridViewTextBoxEditingControl.cs
- EllipseGeometry.cs