Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- EntityDataSourceEntityTypeFilterConverter.cs
- SqlCacheDependency.cs
- TextWriterTraceListener.cs
- BitmapFrameDecode.cs
- CommonDialog.cs
- LineInfo.cs
- Configuration.cs
- SqlPersonalizationProvider.cs
- RotateTransform.cs
- MILUtilities.cs
- StateMachineAction.cs
- FeedUtils.cs
- SmtpCommands.cs
- MeshGeometry3D.cs
- Section.cs
- PlanCompiler.cs
- StorageMappingItemCollection.cs
- ToolStripControlHost.cs
- ConnectionPoint.cs
- DrawingVisual.cs
- OperandQuery.cs
- WindowsIdentity.cs
- StrokeRenderer.cs
- InputLanguageProfileNotifySink.cs
- WebControl.cs
- SamlDelegatingWriter.cs
- RelationshipEnd.cs
- IOException.cs
- Operand.cs
- MouseActionValueSerializer.cs
- _ConnectStream.cs
- XsltArgumentList.cs
- BidOverLoads.cs
- RouteData.cs
- ConsumerConnectionPointCollection.cs
- RegexGroup.cs
- AssemblyAttributesGoHere.cs
- WebPartZoneBase.cs
- CounterSample.cs
- RootProfilePropertySettingsCollection.cs
- TableColumnCollectionInternal.cs
- QueryParameter.cs
- RecordBuilder.cs
- NamespaceEmitter.cs
- OleAutBinder.cs
- ScriptControl.cs
- StrokeNode.cs
- SoapUnknownHeader.cs
- Matrix3D.cs
- WebControlToolBoxItem.cs
- CompositeTypefaceMetrics.cs
- ParsedAttributeCollection.cs
- QuarticEase.cs
- DbConnectionStringCommon.cs
- CreateUserErrorEventArgs.cs
- QilXmlReader.cs
- PerformanceCounterLib.cs
- ListDictionaryInternal.cs
- XmlExtensionFunction.cs
- TextFormatterContext.cs
- DataServiceRequestOfT.cs
- FlowDocumentView.cs
- PixelFormats.cs
- BridgeDataRecord.cs
- DataGridCellItemAutomationPeer.cs
- DataGridColumnHeadersPresenter.cs
- ProfessionalColors.cs
- FtpWebResponse.cs
- WebPartDisplayMode.cs
- ColorAnimationUsingKeyFrames.cs
- updateconfighost.cs
- TableLayoutStyleCollection.cs
- RemotingException.cs
- UseLicense.cs
- _NegoState.cs
- JavaScriptString.cs
- DataGridViewCheckBoxColumn.cs
- InvalidChannelBindingException.cs
- AutomationEventArgs.cs
- XPathExpr.cs
- StylusPointPropertyInfoDefaults.cs
- Int32Converter.cs
- DrawingAttributeSerializer.cs
- DefaultMemberAttribute.cs
- ToolbarAUtomationPeer.cs
- BaseHashHelper.cs
- AppDomainAttributes.cs
- TextPenaltyModule.cs
- XmlSchemaSet.cs
- MetadataReference.cs
- StyleSheet.cs
- Menu.cs
- ListViewSelectEventArgs.cs
- DataGridViewColumnDesigner.cs
- OracleLob.cs
- Pkcs7Recipient.cs
- Rect3D.cs
- SettingsBindableAttribute.cs
- WCFModelStrings.Designer.cs
- BaseValidator.cs