Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Design / DesignerVerb.cs / 1305376 / 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
- MDIControlStrip.cs
- DesignerSelectionListAdapter.cs
- DataPointer.cs
- DataTableNewRowEvent.cs
- DurationConverter.cs
- RtfToXamlLexer.cs
- MemberMemberBinding.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- SynchronizedInputAdaptor.cs
- UnknownBitmapEncoder.cs
- GridEntry.cs
- SafeCryptHandles.cs
- XmlCharCheckingReader.cs
- EventToken.cs
- _LazyAsyncResult.cs
- StringHandle.cs
- ElementHostAutomationPeer.cs
- ErrorRuntimeConfig.cs
- HeaderedContentControl.cs
- DataGridCommandEventArgs.cs
- InfiniteTimeSpanConverter.cs
- HttpGetServerProtocol.cs
- AsyncResult.cs
- WebPartConnectionsDisconnectVerb.cs
- CodeRemoveEventStatement.cs
- AncestorChangedEventArgs.cs
- WCFModelStrings.Designer.cs
- ICspAsymmetricAlgorithm.cs
- RectValueSerializer.cs
- ToolStripPanel.cs
- SelectorAutomationPeer.cs
- GregorianCalendarHelper.cs
- GridViewRowCollection.cs
- TdsParser.cs
- ParserContext.cs
- EntitySqlQueryState.cs
- FixedHighlight.cs
- TypeSystemProvider.cs
- Effect.cs
- ProtectedConfiguration.cs
- FrugalMap.cs
- ExpressionPrefixAttribute.cs
- LicenseContext.cs
- StateItem.cs
- DataTableTypeConverter.cs
- StrokeIntersection.cs
- PolyBezierSegment.cs
- StorageModelBuildProvider.cs
- ColorKeyFrameCollection.cs
- ParserContext.cs
- IERequestCache.cs
- StringOutput.cs
- ThemeDictionaryExtension.cs
- ClientFormsAuthenticationCredentials.cs
- ReachBasicContext.cs
- XmlArrayItemAttributes.cs
- PrintDocument.cs
- CreateUserWizardStep.cs
- ACL.cs
- ImageBrush.cs
- WorkflowTimerService.cs
- ComPlusInstanceProvider.cs
- SerialPinChanges.cs
- DirectionalLight.cs
- SiteMap.cs
- UnlockInstanceAsyncResult.cs
- ChangeToolStripParentVerb.cs
- TargetInvocationException.cs
- NotSupportedException.cs
- DataTable.cs
- Decoder.cs
- CommonDialog.cs
- NavigationProperty.cs
- HelloOperationAsyncResult.cs
- panel.cs
- AssociationSetEnd.cs
- DataGridViewLinkColumn.cs
- CodeDirectiveCollection.cs
- BitmapImage.cs
- XmlSchemaSearchPattern.cs
- listitem.cs
- CollectionDataContract.cs
- WebServiceClientProxyGenerator.cs
- Oid.cs
- MultiTargetingUtil.cs
- CancellationHandler.cs
- CompoundFileStreamReference.cs
- LogicalMethodInfo.cs
- ZipArchive.cs
- RijndaelManagedTransform.cs
- RemotingException.cs
- PerformanceCounterNameAttribute.cs
- CodeValidator.cs
- MatrixTransform3D.cs
- InputBindingCollection.cs
- XmlNodeComparer.cs
- TileBrush.cs
- SystemIcmpV6Statistics.cs
- HttpModulesSection.cs
- IdnMapping.cs