Code:
/ DotNET / DotNET / 8.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
- HttpAsyncResult.cs
- xdrvalidator.cs
- HtmlMeta.cs
- RowBinding.cs
- DefaultHttpHandler.cs
- DebugView.cs
- DependencyObject.cs
- DragDropManager.cs
- WebEvents.cs
- BypassElement.cs
- CodeTypeDelegate.cs
- TypeToken.cs
- RoutedEventArgs.cs
- LookupBindingPropertiesAttribute.cs
- RelationshipFixer.cs
- NativeMethods.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- DesignerListAdapter.cs
- XPathAncestorIterator.cs
- ValidationSummary.cs
- SqlGatherConsumedAliases.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- ComponentDispatcher.cs
- httpapplicationstate.cs
- StringAnimationUsingKeyFrames.cs
- EmbeddedMailObjectsCollection.cs
- SolidBrush.cs
- RegexStringValidator.cs
- LinqDataSourceValidationException.cs
- ServiceAuthorizationElement.cs
- SmiContextFactory.cs
- PopOutPanel.cs
- LinearGradientBrush.cs
- ServicePointManagerElement.cs
- WpfGeneratedKnownProperties.cs
- Binding.cs
- MarginsConverter.cs
- Tablet.cs
- ResourceDescriptionAttribute.cs
- CardSpacePolicyElement.cs
- PointCollectionValueSerializer.cs
- UserControlCodeDomTreeGenerator.cs
- ModelUIElement3D.cs
- webeventbuffer.cs
- EntityContainerEmitter.cs
- CodeParameterDeclarationExpression.cs
- UserControlParser.cs
- PageHandlerFactory.cs
- ClientRoleProvider.cs
- PeerNameRecord.cs
- MatrixTransform3D.cs
- WebProxyScriptElement.cs
- VisualStyleRenderer.cs
- SoapEnumAttribute.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ProcessHost.cs
- DynamicObject.cs
- X509Certificate2Collection.cs
- CalculatedColumn.cs
- SqlStatistics.cs
- AnimatedTypeHelpers.cs
- MissingSatelliteAssemblyException.cs
- DoubleAnimationBase.cs
- DataGridViewEditingControlShowingEventArgs.cs
- Int16Converter.cs
- ScrollItemPattern.cs
- ButtonColumn.cs
- CheckableControlBaseAdapter.cs
- AssociationSetEnd.cs
- BamlResourceSerializer.cs
- DbProviderFactoriesConfigurationHandler.cs
- GuidConverter.cs
- SizeValueSerializer.cs
- SqlBuilder.cs
- ElementAction.cs
- AdornerHitTestResult.cs
- LoadRetryConstantStrategy.cs
- PrivacyNoticeBindingElement.cs
- GridPattern.cs
- MatchingStyle.cs
- DayRenderEvent.cs
- EventRecord.cs
- StubHelpers.cs
- EntityKeyElement.cs
- DrawingContextWalker.cs
- printdlgexmarshaler.cs
- HttpApplicationFactory.cs
- TypeValidationEventArgs.cs
- PassportAuthenticationEventArgs.cs
- TableCell.cs
- DataControlPagerLinkButton.cs
- GeometryConverter.cs
- TableCellsCollectionEditor.cs
- RtType.cs
- IImplicitResourceProvider.cs
- _BaseOverlappedAsyncResult.cs
- HashJoinQueryOperatorEnumerator.cs
- GenericIdentity.cs
- SetterBase.cs
- LastQueryOperator.cs