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
- DesignBindingValueUIHandler.cs
- SafeFreeMibTable.cs
- MD5.cs
- ErrorActivity.cs
- ISAPIRuntime.cs
- InputLanguageEventArgs.cs
- DayRenderEvent.cs
- LessThanOrEqual.cs
- DataControlField.cs
- NoResizeHandleGlyph.cs
- SafeHandles.cs
- OdbcTransaction.cs
- LocalizableResourceBuilder.cs
- DataGridViewColumnCollection.cs
- AuthenticationModulesSection.cs
- ToolStripSeparatorRenderEventArgs.cs
- fixedPageContentExtractor.cs
- ProfileInfo.cs
- Control.cs
- DataServiceQueryOfT.cs
- DataServiceQueryException.cs
- RoleGroupCollection.cs
- QueueProcessor.cs
- HighContrastHelper.cs
- StrokeNodeEnumerator.cs
- SimpleBitVector32.cs
- AppLevelCompilationSectionCache.cs
- SafeLocalAllocation.cs
- FilterElement.cs
- XhtmlTextWriter.cs
- DynamicContractTypeBuilder.cs
- AllMembershipCondition.cs
- DLinqDataModelProvider.cs
- BaseAddressElement.cs
- IconHelper.cs
- InheritablePropertyChangeInfo.cs
- MessageSecurityOverHttp.cs
- CapabilitiesRule.cs
- XmlValueConverter.cs
- ClientConvert.cs
- XpsImageSerializationService.cs
- RequestCachePolicyConverter.cs
- ServiceMetadataBehavior.cs
- CharKeyFrameCollection.cs
- SoapIgnoreAttribute.cs
- Config.cs
- SystemWebExtensionsSectionGroup.cs
- WorkflowApplicationUnhandledExceptionEventArgs.cs
- ServiceObjectContainer.cs
- DataSetMappper.cs
- PageAsyncTaskManager.cs
- SafeProcessHandle.cs
- RequestSecurityTokenSerializer.cs
- FileUtil.cs
- ThreadPool.cs
- InstanceDescriptor.cs
- XmlSchemaGroup.cs
- ListView.cs
- XPathQilFactory.cs
- EditingMode.cs
- VirtualStackFrame.cs
- MaskDescriptor.cs
- NamespaceList.cs
- DesigntimeLicenseContextSerializer.cs
- UdpDiscoveryMessageFilter.cs
- EmbeddedMailObjectsCollection.cs
- LayoutEditorPart.cs
- ErasingStroke.cs
- Operator.cs
- SqlUserDefinedAggregateAttribute.cs
- DataShape.cs
- AsyncOperation.cs
- XmlQueryType.cs
- HorizontalAlignConverter.cs
- ClientFormsAuthenticationCredentials.cs
- XmlLoader.cs
- SessionState.cs
- PolicyLevel.cs
- QilPatternFactory.cs
- ContentOperations.cs
- TableChangeProcessor.cs
- _NegoState.cs
- SqlNotificationRequest.cs
- RegexCompilationInfo.cs
- CaseInsensitiveComparer.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- CompareInfo.cs
- httpstaticobjectscollection.cs
- HttpWriter.cs
- TypedTableGenerator.cs
- ImageMap.cs
- Propagator.Evaluator.cs
- FileLogRecordHeader.cs
- DirectoryGroupQuery.cs
- ConfigurationLockCollection.cs
- OdbcUtils.cs
- SqlMetaData.cs
- AssociatedControlConverter.cs
- XPathMultyIterator.cs
- TransformerInfo.cs