Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / DesignerVerbToolStripMenuItem.cs / 1 / DesignerVerbToolStripMenuItem.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms.Design { using System.Design; using System.ComponentModel; using System.Diagnostics; using System; using System.Security; using System.Security.Permissions; using System.ComponentModel.Design; using System.Windows.Forms; using System.Drawing; using System.Drawing.Design; using System.Windows.Forms.Design.Behavior; using System.Runtime.InteropServices; using System.Drawing.Drawing2D; ////// /// Associates DesignerVerb with ToolStripMenuItem. /// ///internal class DesignerVerbToolStripMenuItem : ToolStripMenuItem { DesignerVerb verb; // Text is a virtual method on the base class, but since we don't override it we should be okay. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public DesignerVerbToolStripMenuItem(DesignerVerb verb) { this.verb = verb; this.Text = verb.Text; RefreshItem(); } public void RefreshItem() { if (verb != null) { this.Visible = verb.Visible; this.Enabled = verb.Enabled; this.Checked = verb.Checked; } } protected override void OnClick(System.EventArgs e) { if (verb != null) { verb.Invoke(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FontSource.cs
- ProxyWebPart.cs
- ClipboardProcessor.cs
- PropertiesTab.cs
- DbInsertCommandTree.cs
- diagnosticsswitches.cs
- FormViewUpdateEventArgs.cs
- ELinqQueryState.cs
- WebBrowser.cs
- UserInitiatedNavigationPermission.cs
- RSAOAEPKeyExchangeFormatter.cs
- DecoderReplacementFallback.cs
- DataControlField.cs
- SqlReferenceCollection.cs
- FactoryGenerator.cs
- ActivityInstanceReference.cs
- XmlSchemas.cs
- CustomPopupPlacement.cs
- ConfigUtil.cs
- AttributeEmitter.cs
- DataGridViewCellStyleEditor.cs
- Rotation3D.cs
- CharacterBufferReference.cs
- SoapInteropTypes.cs
- CloseCryptoHandleRequest.cs
- TextServicesDisplayAttribute.cs
- _ConnectionGroup.cs
- BindableAttribute.cs
- SmiConnection.cs
- QuaternionAnimation.cs
- DataSvcMapFile.cs
- RoamingStoreFile.cs
- complextypematerializer.cs
- IdentityReference.cs
- MemberInfoSerializationHolder.cs
- Rectangle.cs
- MediaPlayer.cs
- ProfileSettings.cs
- IssuedTokenClientBehaviorsElement.cs
- ContentValidator.cs
- ChangePassword.cs
- SqlInternalConnectionSmi.cs
- CoTaskMemHandle.cs
- RenderTargetBitmap.cs
- Maps.cs
- DataAdapter.cs
- DocobjHost.cs
- ResXResourceReader.cs
- PersonalizationEntry.cs
- EllipseGeometry.cs
- SqlExpander.cs
- DbConnectionPoolIdentity.cs
- ListBoxItem.cs
- AssemblyBuilder.cs
- UpdateProgress.cs
- EditorZoneAutoFormat.cs
- SqlConnectionPoolProviderInfo.cs
- DesignTable.cs
- CheckBox.cs
- QilName.cs
- LinqDataSourceView.cs
- SchemaElement.cs
- TextServicesLoader.cs
- ComPlusAuthorization.cs
- StringHandle.cs
- Double.cs
- RightsManagementEncryptedStream.cs
- FrameworkPropertyMetadata.cs
- InternalTypeHelper.cs
- LineSegment.cs
- ObjectSecurity.cs
- M3DUtil.cs
- BooleanAnimationUsingKeyFrames.cs
- DropSource.cs
- Action.cs
- WindowsScrollBar.cs
- parserscommon.cs
- DataGridViewButtonColumn.cs
- IntAverageAggregationOperator.cs
- ActivityCodeDomSerializer.cs
- DSASignatureFormatter.cs
- FullTrustAssembly.cs
- FactoryGenerator.cs
- ADRoleFactory.cs
- Queue.cs
- SoapSchemaImporter.cs
- SqlCommandSet.cs
- VBCodeProvider.cs
- HttpVersion.cs
- LinqToSqlWrapper.cs
- PointConverter.cs
- ReflectEventDescriptor.cs
- Int16AnimationUsingKeyFrames.cs
- ObjectStateManager.cs
- OracleParameterCollection.cs
- DetailsViewModeEventArgs.cs
- ObjectAnimationBase.cs
- Error.cs
- XmlSchemaSubstitutionGroup.cs
- ErrorRuntimeConfig.cs