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
- OrderedDictionaryStateHelper.cs
- FixedPosition.cs
- SymbolDocumentInfo.cs
- LinqToSqlWrapper.cs
- ListViewInsertedEventArgs.cs
- CroppedBitmap.cs
- SafeNativeMemoryHandle.cs
- ProfileGroupSettingsCollection.cs
- DisplayInformation.cs
- SubpageParagraph.cs
- MailWriter.cs
- ApplicationTrust.cs
- FixedBufferAttribute.cs
- SqlDependency.cs
- SchemaTableOptionalColumn.cs
- HtmlInputPassword.cs
- SmtpFailedRecipientException.cs
- XmlExtensionFunction.cs
- Slider.cs
- TimeSpanStorage.cs
- EntityTypeBase.cs
- CompiledRegexRunner.cs
- TextParagraph.cs
- ColumnMapTranslator.cs
- ProviderMetadataCachedInformation.cs
- OperationResponse.cs
- odbcmetadatacollectionnames.cs
- log.cs
- ReflectionPermission.cs
- RuleSettingsCollection.cs
- DbProviderFactories.cs
- AccessibleObject.cs
- ExtendedTransformFactory.cs
- ElementsClipboardData.cs
- XmlToDatasetMap.cs
- PeerPresenceInfo.cs
- RepeatButtonAutomationPeer.cs
- HebrewNumber.cs
- SessionSwitchEventArgs.cs
- GifBitmapDecoder.cs
- SynchronizationScope.cs
- _StreamFramer.cs
- Tokenizer.cs
- PagedDataSource.cs
- DateTimeOffset.cs
- LogManagementAsyncResult.cs
- TraceData.cs
- HtmlSelect.cs
- IriParsingElement.cs
- WebControlToolBoxItem.cs
- ObjRef.cs
- DataRowView.cs
- SQLMoneyStorage.cs
- SourceElementsCollection.cs
- TablePatternIdentifiers.cs
- UIElementParaClient.cs
- FileDataSource.cs
- IteratorFilter.cs
- CodeGroup.cs
- InheritanceRules.cs
- SQLByteStorage.cs
- ModuleBuilder.cs
- Renderer.cs
- InplaceBitmapMetadataWriter.cs
- ColumnCollection.cs
- ToolZone.cs
- QueryMatcher.cs
- ListDictionary.cs
- WebPartZoneCollection.cs
- AdCreatedEventArgs.cs
- UriExt.cs
- XmlIncludeAttribute.cs
- PageHandlerFactory.cs
- FunctionDescription.cs
- TextTrailingWordEllipsis.cs
- TripleDES.cs
- XmlKeywords.cs
- DataGridViewButtonCell.cs
- JsonObjectDataContract.cs
- AsyncWaitHandle.cs
- MethodCallTranslator.cs
- SystemException.cs
- NoneExcludedImageIndexConverter.cs
- LockCookie.cs
- FontFamily.cs
- WebPartDisplayMode.cs
- ConnectionModeReader.cs
- CustomValidator.cs
- KnownTypesHelper.cs
- DataServiceOperationContext.cs
- EntityDesignerUtils.cs
- TryLoadRunnableWorkflowCommand.cs
- WebPartExportVerb.cs
- InputMethod.cs
- AssemblyInfo.cs
- DeclarativeCatalogPart.cs
- RedistVersionInfo.cs
- AttributeConverter.cs
- Border.cs
- MenuItem.cs