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
- CqlLexerHelpers.cs
- MappingException.cs
- CategoryAttribute.cs
- InputLanguageCollection.cs
- NTAccount.cs
- SuspendDesigner.cs
- WebBrowserContainer.cs
- WorkerRequest.cs
- DiscoveryClient.cs
- DiscoveryExceptionDictionary.cs
- JoinTreeNode.cs
- LogRestartAreaEnumerator.cs
- TextTreeTextElementNode.cs
- StorageScalarPropertyMapping.cs
- SecurityElement.cs
- HwndAppCommandInputProvider.cs
- DataServiceHostFactory.cs
- FormsAuthenticationModule.cs
- TextContainer.cs
- StylusPointProperties.cs
- FilteredXmlReader.cs
- WebPartConnectionsDisconnectVerb.cs
- UndoEngine.cs
- AdjustableArrowCap.cs
- DataTableExtensions.cs
- InstanceData.cs
- X509Extension.cs
- QuaternionValueSerializer.cs
- SoapHeaderAttribute.cs
- DataControlFieldCollection.cs
- Component.cs
- StoreItemCollection.Loader.cs
- oledbconnectionstring.cs
- InkCanvasSelectionAdorner.cs
- NetCodeGroup.cs
- ProfileSection.cs
- Int32CollectionConverter.cs
- ControlPaint.cs
- DataServiceHostWrapper.cs
- Marshal.cs
- ChoiceConverter.cs
- SqlAggregateChecker.cs
- PenLineCapValidation.cs
- XmlStreamStore.cs
- SiteMap.cs
- X509Utils.cs
- TemplateXamlParser.cs
- CompositeActivityTypeDescriptorProvider.cs
- KnownBoxes.cs
- CodeSubDirectory.cs
- IndexOutOfRangeException.cs
- SafeFileMappingHandle.cs
- EventLogRecord.cs
- AssemblyBuilder.cs
- HttpRuntime.cs
- WindowPatternIdentifiers.cs
- RequestBringIntoViewEventArgs.cs
- TextEditorSelection.cs
- DbConnectionPool.cs
- ToolStripDropDown.cs
- DockPatternIdentifiers.cs
- Trace.cs
- OpenTypeCommon.cs
- StackBuilderSink.cs
- Lasso.cs
- HtmlControlDesigner.cs
- TextBoxAutoCompleteSourceConverter.cs
- PermissionSetTriple.cs
- DataSetSchema.cs
- DataViewSetting.cs
- BitmapCacheBrush.cs
- RuntimeTrackingProfile.cs
- SqlConnectionManager.cs
- LowerCaseStringConverter.cs
- AnnotationAdorner.cs
- WindowsTokenRoleProvider.cs
- OracleEncoding.cs
- DateTime.cs
- EdmRelationshipRoleAttribute.cs
- UnSafeCharBuffer.cs
- GridToolTip.cs
- VisualTreeHelper.cs
- Quaternion.cs
- PageSetupDialog.cs
- ApplicationServicesHostFactory.cs
- LinqDataSourceDisposeEventArgs.cs
- MenuAdapter.cs
- TimestampInformation.cs
- Decoder.cs
- IItemContainerGenerator.cs
- XmlQueryContext.cs
- QilInvokeLateBound.cs
- NamedObject.cs
- Grammar.cs
- GeneralTransform3DCollection.cs
- AutoGeneratedField.cs
- SystemDiagnosticsSection.cs
- TraceContext.cs
- SetterBaseCollection.cs
- DiagnosticTraceRecords.cs