Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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(); } } } // 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
- MissingMemberException.cs
- Pick.cs
- Quaternion.cs
- MatrixAnimationUsingPath.cs
- GeometryCombineModeValidation.cs
- ExpressionLink.cs
- Track.cs
- Model3DGroup.cs
- ReplacementText.cs
- ExtentKey.cs
- IntSecurity.cs
- ProfileSettingsCollection.cs
- base64Transforms.cs
- CodeObject.cs
- SQLBoolean.cs
- AsyncOperationManager.cs
- XmlMessageFormatter.cs
- NativeMethods.cs
- ZoneButton.cs
- GenericXmlSecurityTokenAuthenticator.cs
- SizeChangedEventArgs.cs
- UnmanagedMarshal.cs
- Sorting.cs
- DataGridViewCellConverter.cs
- ParserHooks.cs
- FloaterBaseParaClient.cs
- _ScatterGatherBuffers.cs
- GradientSpreadMethodValidation.cs
- GraphicsContext.cs
- HotSpot.cs
- Internal.cs
- CompositionAdorner.cs
- DataGridAddNewRow.cs
- CatalogPartChrome.cs
- AssemblyContextControlItem.cs
- ping.cs
- HttpHostedTransportConfiguration.cs
- Formatter.cs
- DictionaryManager.cs
- NumberAction.cs
- SpecialFolderEnumConverter.cs
- ListControlStringCollectionEditor.cs
- AlphaSortedEnumConverter.cs
- SqlDataSource.cs
- ButtonBaseAutomationPeer.cs
- UnsafeNativeMethodsCLR.cs
- DragDropManager.cs
- InvalidProgramException.cs
- AppDomain.cs
- SerializationBinder.cs
- DBPropSet.cs
- SendMailErrorEventArgs.cs
- TypeElement.cs
- WsatServiceCertificate.cs
- _WebProxyDataBuilder.cs
- WebPartVerb.cs
- PrintPreviewDialog.cs
- TCEAdapterGenerator.cs
- XmlSerializerSection.cs
- RuleSettings.cs
- UserControl.cs
- ModuleBuilderData.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- XmlSchemaInferenceException.cs
- SQLSingle.cs
- QueryProcessor.cs
- SharedTcpTransportManager.cs
- ComponentEvent.cs
- MatrixTransform.cs
- BeginStoryboard.cs
- TextParaClient.cs
- SplineKeyFrames.cs
- TextEndOfSegment.cs
- SimpleExpression.cs
- TypeUtil.cs
- _Events.cs
- DateTimeConverter2.cs
- SrgsItemList.cs
- BaseAutoFormat.cs
- QuestionEventArgs.cs
- BulletedList.cs
- TraceUtils.cs
- CatalogPartChrome.cs
- DragStartedEventArgs.cs
- Directory.cs
- TabItem.cs
- FixedStringLookup.cs
- WsdlInspector.cs
- MachineKeyValidationConverter.cs
- ClassValidator.cs
- Logging.cs
- ObjectPersistData.cs
- DesignerAutoFormatStyle.cs
- AssemblySettingAttributes.cs
- SimpleMailWebEventProvider.cs
- BamlRecords.cs
- ToolStripControlHost.cs
- DataGridViewDesigner.cs
- FloaterBaseParagraph.cs
- SplashScreenNativeMethods.cs