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
- ProfileInfo.cs
- Attributes.cs
- GraphicsContainer.cs
- HotCommands.cs
- HwndAppCommandInputProvider.cs
- Brush.cs
- BaseHashHelper.cs
- ServiceHostingEnvironment.cs
- ScrollItemPatternIdentifiers.cs
- ScrollChangedEventArgs.cs
- ChannelBinding.cs
- CommandManager.cs
- ToolStripGripRenderEventArgs.cs
- FixedHighlight.cs
- WindowsGrip.cs
- messageonlyhwndwrapper.cs
- Point4D.cs
- LoginName.cs
- IPCCacheManager.cs
- Visitors.cs
- LogicalExpr.cs
- BuildDependencySet.cs
- ViewCellRelation.cs
- ExcludePathInfo.cs
- PolyLineSegment.cs
- RelOps.cs
- XPathArrayIterator.cs
- PageCodeDomTreeGenerator.cs
- Wizard.cs
- VisualStyleTypesAndProperties.cs
- ItemList.cs
- DataSourceHelper.cs
- SynthesizerStateChangedEventArgs.cs
- Rect3DValueSerializer.cs
- ReliableMessagingVersionConverter.cs
- SortDescription.cs
- BaseValidator.cs
- FileSystemInfo.cs
- RegexCompilationInfo.cs
- DataGridViewColumnConverter.cs
- Model3DGroup.cs
- SessionIDManager.cs
- DictionaryContent.cs
- ImageField.cs
- X509Certificate.cs
- BoundField.cs
- KnownTypesProvider.cs
- CriticalFinalizerObject.cs
- CompiledIdentityConstraint.cs
- UIElementPropertyUndoUnit.cs
- ProcessProtocolHandler.cs
- StringDictionary.cs
- ObjectListDataBindEventArgs.cs
- DropShadowBitmapEffect.cs
- TextTreeInsertUndoUnit.cs
- FailedToStartupUIException.cs
- DefaultValidator.cs
- FormattedTextSymbols.cs
- SmtpNegotiateAuthenticationModule.cs
- ServiceTimeoutsElement.cs
- MarkupCompilePass2.cs
- TextRange.cs
- SystemUnicastIPAddressInformation.cs
- SimpleWorkerRequest.cs
- ConstraintStruct.cs
- CachedPathData.cs
- InkCanvasFeedbackAdorner.cs
- OdbcPermission.cs
- VectorKeyFrameCollection.cs
- CodeDomExtensionMethods.cs
- DelegateTypeInfo.cs
- TextSelectionHighlightLayer.cs
- Char.cs
- SqlSelectClauseBuilder.cs
- XmlStreamStore.cs
- DataColumnCollection.cs
- ServiceNotStartedException.cs
- LocationSectionRecord.cs
- InplaceBitmapMetadataWriter.cs
- WebPartTracker.cs
- CodeStatementCollection.cs
- GeometryCombineModeValidation.cs
- LongTypeConverter.cs
- SqlBulkCopyColumnMapping.cs
- PropertyTab.cs
- IteratorFilter.cs
- GeneralTransform2DTo3D.cs
- CompatibleComparer.cs
- StartUpEventArgs.cs
- MtomMessageEncoder.cs
- NetCodeGroup.cs
- ArraySortHelper.cs
- AdapterUtil.cs
- MetadataCollection.cs
- TraceContextRecord.cs
- RegexCapture.cs
- KeyValuePair.cs
- DataAdapter.cs
- IIS7WorkerRequest.cs
- RegexInterpreter.cs