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
- CombinedGeometry.cs
- ApplicationSecurityInfo.cs
- CommandLibraryHelper.cs
- PrintPreviewControl.cs
- remotingproxy.cs
- SeekStoryboard.cs
- RegexMatch.cs
- CutCopyPasteHelper.cs
- ColorDialog.cs
- JobInputBins.cs
- InkCanvasInnerCanvas.cs
- InheritanceRules.cs
- DataSourceGeneratorException.cs
- TreeWalkHelper.cs
- SecurityException.cs
- TextProperties.cs
- Int32Animation.cs
- PersonalizablePropertyEntry.cs
- HiddenFieldPageStatePersister.cs
- MobileCapabilities.cs
- TrackingProfileManager.cs
- Activation.cs
- SqlProcedureAttribute.cs
- SelectionPattern.cs
- VectorAnimationBase.cs
- UrlAuthFailedErrorFormatter.cs
- XmlSerializerSection.cs
- TcpChannelHelper.cs
- SchemaSetCompiler.cs
- MdImport.cs
- DataSourceConverter.cs
- ErrorFormatter.cs
- StateDesigner.TransitionInfo.cs
- UrlPath.cs
- SplitterPanel.cs
- PathSegmentCollection.cs
- CalendarItem.cs
- TemplateEditingVerb.cs
- DesignTimeTemplateParser.cs
- DescendentsWalker.cs
- SortedList.cs
- Relationship.cs
- XmlTextAttribute.cs
- StringCollection.cs
- PolicyException.cs
- ExpressionPrefixAttribute.cs
- CancellationToken.cs
- PlanCompiler.cs
- ToolStripItem.cs
- CryptoHandle.cs
- ArrangedElementCollection.cs
- ActivityCollectionMarkupSerializer.cs
- ParameterRetriever.cs
- EditableTreeList.cs
- DesignConnection.cs
- WinInet.cs
- CopyAttributesAction.cs
- TranslateTransform.cs
- FontDialog.cs
- designeractionbehavior.cs
- CodeTypeDelegate.cs
- WebBrowser.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- DefaultAssemblyResolver.cs
- CallInfo.cs
- PropertyConverter.cs
- WebPartZoneCollection.cs
- SspiSecurityToken.cs
- ValueUtilsSmi.cs
- WmiInstallComponent.cs
- DataServiceStreamResponse.cs
- DateTimeUtil.cs
- InkCanvasSelectionAdorner.cs
- BindingListCollectionView.cs
- IndexedWhereQueryOperator.cs
- Peer.cs
- AccessViolationException.cs
- XmlFormatWriterGenerator.cs
- MouseActionValueSerializer.cs
- RequiredAttributeAttribute.cs
- PenContext.cs
- TrackingMemoryStreamFactory.cs
- CriticalHandle.cs
- MulticastDelegate.cs
- ColumnHeader.cs
- TreeViewItemAutomationPeer.cs
- FixedBufferAttribute.cs
- EastAsianLunisolarCalendar.cs
- LayoutEditorPart.cs
- DashStyle.cs
- TemplateBamlRecordReader.cs
- FixedFlowMap.cs
- SourceLineInfo.cs
- TextDecorationLocationValidation.cs
- InlineUIContainer.cs
- BigInt.cs
- StreamGeometry.cs
- TraceListener.cs
- XpsTokenContext.cs
- PropertyValueUIItem.cs