Code:
/ FX-1434 / FX-1434 / 1.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
- SystemIPv4InterfaceProperties.cs
- TextRenderer.cs
- SoapObjectInfo.cs
- EventlogProvider.cs
- ComboBox.cs
- SystemNetHelpers.cs
- RedistVersionInfo.cs
- DoubleCollectionValueSerializer.cs
- OSFeature.cs
- DoubleLinkList.cs
- OdbcConnectionFactory.cs
- PriorityQueue.cs
- COM2TypeInfoProcessor.cs
- BinarySerializer.cs
- PageWrapper.cs
- AppearanceEditorPart.cs
- ConfigurationStrings.cs
- HtmlInputReset.cs
- ResolveCriteria.cs
- DataGrid.cs
- Grid.cs
- IndexerNameAttribute.cs
- HMAC.cs
- TableHeaderCell.cs
- EntityContainerEntitySetDefiningQuery.cs
- AsmxEndpointPickerExtension.cs
- XmlCharCheckingWriter.cs
- SmiXetterAccessMap.cs
- MediaElement.cs
- Attributes.cs
- XmlCharacterData.cs
- TagPrefixCollection.cs
- Logging.cs
- ResourcePool.cs
- GridItem.cs
- FolderBrowserDialog.cs
- StylusButton.cs
- CustomAttributeBuilder.cs
- NativeObjectSecurity.cs
- ExeContext.cs
- DataServiceExpressionVisitor.cs
- TcpClientSocketManager.cs
- SequentialUshortCollection.cs
- HttpPostedFile.cs
- XmlAttributeCollection.cs
- EncodingNLS.cs
- UserPersonalizationStateInfo.cs
- CompilerParameters.cs
- OpenFileDialog.cs
- WindowsScrollBarBits.cs
- AssociationSetMetadata.cs
- QilTypeChecker.cs
- Tile.cs
- ScriptControl.cs
- OracleFactory.cs
- QuaternionConverter.cs
- DesignerLabelAdapter.cs
- CacheMemory.cs
- OpCodes.cs
- FrameAutomationPeer.cs
- returneventsaver.cs
- httpapplicationstate.cs
- Triplet.cs
- RegionInfo.cs
- RectConverter.cs
- QueryCacheEntry.cs
- SettingsContext.cs
- CodeTypeReference.cs
- DocumentViewerBaseAutomationPeer.cs
- ByteStreamMessage.cs
- StyleBamlRecordReader.cs
- DoubleCollectionValueSerializer.cs
- BoundsDrawingContextWalker.cs
- EnumType.cs
- CmsInterop.cs
- COM2IDispatchConverter.cs
- EventLogStatus.cs
- FragmentQueryKB.cs
- ObjectListItem.cs
- TimeStampChecker.cs
- AsymmetricAlgorithm.cs
- SecurityTokenSpecification.cs
- OdbcConnectionHandle.cs
- FrugalList.cs
- GlobalizationAssembly.cs
- CalendarDateRange.cs
- ListViewItemMouseHoverEvent.cs
- DataListItemCollection.cs
- EmptyControlCollection.cs
- PropertyItemInternal.cs
- Pair.cs
- DocumentViewerAutomationPeer.cs
- dataprotectionpermission.cs
- XmlSerializerOperationBehavior.cs
- SmtpException.cs
- HttpSysSettings.cs
- SizeLimitedCache.cs
- GroupJoinQueryOperator.cs
- ShapeTypeface.cs
- StringUtil.cs