Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ItemContainerGenerator.cs
- WpfMemberInvoker.cs
- PriorityRange.cs
- VideoDrawing.cs
- HandlerMappingMemo.cs
- WebPartMinimizeVerb.cs
- PositiveTimeSpanValidatorAttribute.cs
- EventLogger.cs
- DataControlReferenceCollection.cs
- SamlConditions.cs
- DataFormat.cs
- Memoizer.cs
- RecognizerBase.cs
- PolyBezierSegment.cs
- DCSafeHandle.cs
- ProcessHostFactoryHelper.cs
- PointAnimationUsingPath.cs
- Mapping.cs
- serverconfig.cs
- TypeBinaryExpression.cs
- Serializer.cs
- InputLanguage.cs
- ShutDownListener.cs
- DataGridViewDataErrorEventArgs.cs
- Configuration.cs
- ScriptingProfileServiceSection.cs
- ScopelessEnumAttribute.cs
- SmiTypedGetterSetter.cs
- PointKeyFrameCollection.cs
- SQLBytes.cs
- PointCollection.cs
- ContextMenuAutomationPeer.cs
- Menu.cs
- PKCS1MaskGenerationMethod.cs
- AssemblyHash.cs
- ParameterBuilder.cs
- StrokeNodeOperations2.cs
- SynchronizingStream.cs
- HighContrastHelper.cs
- SafeCertificateStore.cs
- LogicalMethodInfo.cs
- SHA512Managed.cs
- FontDialog.cs
- SecurityRuntime.cs
- SqlInfoMessageEvent.cs
- AnimationClockResource.cs
- TextViewElement.cs
- File.cs
- ScriptingJsonSerializationSection.cs
- DictionaryEntry.cs
- Win32MouseDevice.cs
- RelationshipConverter.cs
- _NtlmClient.cs
- CheckBox.cs
- PermissionSetTriple.cs
- ScriptingWebServicesSectionGroup.cs
- CoordinationService.cs
- WebZone.cs
- DesignerExtenders.cs
- FlowLayout.cs
- AdjustableArrowCap.cs
- DoubleCollection.cs
- GridViewRowEventArgs.cs
- TextHidden.cs
- NamedObject.cs
- brushes.cs
- InstallerTypeAttribute.cs
- FormatterServices.cs
- WindowsIdentity.cs
- HWStack.cs
- PrtTicket_Public_Simple.cs
- ExpandCollapseProviderWrapper.cs
- FactorySettingsElement.cs
- EpmContentSerializer.cs
- OracleException.cs
- FloaterBaseParagraph.cs
- OneOf.cs
- AnnotationAuthorChangedEventArgs.cs
- ContentPropertyAttribute.cs
- SqlCommandSet.cs
- RC2CryptoServiceProvider.cs
- EdmItemError.cs
- RemotingConfigParser.cs
- DataRowCollection.cs
- ComplexType.cs
- CodeVariableDeclarationStatement.cs
- URLMembershipCondition.cs
- StickyNoteHelper.cs
- Documentation.cs
- IncrementalCompileAnalyzer.cs
- FaultContractAttribute.cs
- TextElementEnumerator.cs
- NativeMethods.cs
- CodeAssignStatement.cs
- Sql8ConformanceChecker.cs
- SynchronizationLockException.cs
- NativeMethods.cs
- NativeObjectSecurity.cs
- ListControlConvertEventArgs.cs
- Propagator.Evaluator.cs