Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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(); } } }/// Overrides object's ToString(). /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsScrollBar.cs
- Dynamic.cs
- IDictionary.cs
- MemberInfoSerializationHolder.cs
- ConfigXmlComment.cs
- SystemSounds.cs
- AlignmentXValidation.cs
- DataSetUtil.cs
- OperandQuery.cs
- QuotedPrintableStream.cs
- PrimarySelectionGlyph.cs
- Camera.cs
- NetworkInformationException.cs
- CapabilitiesPattern.cs
- DataReaderContainer.cs
- EnumValAlphaComparer.cs
- Expander.cs
- DataColumn.cs
- ProcessHostMapPath.cs
- RuntimeVariablesExpression.cs
- DataGridTemplateColumn.cs
- FirstMatchCodeGroup.cs
- LambdaCompiler.Address.cs
- Activator.cs
- DesignerActionGlyph.cs
- WebPageTraceListener.cs
- WebPartTransformer.cs
- TextRange.cs
- WinCategoryAttribute.cs
- SrgsDocument.cs
- DynamicRenderer.cs
- Icon.cs
- DbgUtil.cs
- EntityDataSourceDesigner.cs
- ActivityExecutorDelegateInfo.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- ToolConsole.cs
- DbBuffer.cs
- Baml2006KeyRecord.cs
- DigestComparer.cs
- LinkAreaEditor.cs
- EntityTypeBase.cs
- IntegerValidatorAttribute.cs
- DataGridViewRowPostPaintEventArgs.cs
- SRDisplayNameAttribute.cs
- CodeMemberMethod.cs
- RoleManagerModule.cs
- PtsCache.cs
- SystemBrushes.cs
- EntitySqlQueryCacheKey.cs
- WebReferencesBuildProvider.cs
- InheritanceContextHelper.cs
- SamlAuthenticationClaimResource.cs
- FontWeights.cs
- DesigntimeLicenseContext.cs
- DaylightTime.cs
- ColumnMapProcessor.cs
- ArrangedElement.cs
- ScriptControl.cs
- ObjectStateManager.cs
- WebPartChrome.cs
- ContractReference.cs
- SrgsNameValueTag.cs
- RegionInfo.cs
- SettingsPropertyWrongTypeException.cs
- NativeRightsManagementAPIsStructures.cs
- ContourSegment.cs
- RepeatButtonAutomationPeer.cs
- KnownBoxes.cs
- mactripleDES.cs
- LoadedOrUnloadedOperation.cs
- MethodExecutor.cs
- LongValidatorAttribute.cs
- DataGridViewCellValueEventArgs.cs
- ErrorFormatterPage.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- Vector3D.cs
- TextViewDesigner.cs
- CacheDependency.cs
- RegexGroup.cs
- DataDocumentXPathNavigator.cs
- TabRenderer.cs
- ToolTip.cs
- SymbolEqualComparer.cs
- XPathPatternParser.cs
- SqlPersonalizationProvider.cs
- SspiSecurityToken.cs
- securestring.cs
- AsymmetricSignatureDeformatter.cs
- BamlResourceContent.cs
- EventMappingSettingsCollection.cs
- CoreSwitches.cs
- ColumnResizeAdorner.cs
- SafeFileMappingHandle.cs
- OleDbWrapper.cs
- PriorityBinding.cs
- WebPartPersonalization.cs
- CookieHandler.cs
- ApplicationSecurityInfo.cs
- RuleRef.cs