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
- HyperLinkStyle.cs
- GuidelineCollection.cs
- remotingproxy.cs
- StatusStrip.cs
- Internal.cs
- ServicesExceptionNotHandledEventArgs.cs
- GenericTypeParameterBuilder.cs
- AssemblyName.cs
- PublisherIdentityPermission.cs
- TrackingProfileCache.cs
- Util.cs
- AnimationClockResource.cs
- NullReferenceException.cs
- XmlComplianceUtil.cs
- BitStack.cs
- BooleanConverter.cs
- XmlSerializerAssemblyAttribute.cs
- TextParagraph.cs
- DeleteWorkflowOwnerCommand.cs
- ISO2022Encoding.cs
- BitmapEffectvisualstate.cs
- GridToolTip.cs
- ExeConfigurationFileMap.cs
- RegexRunner.cs
- MessageSmuggler.cs
- ConditionalBranch.cs
- TextRunTypographyProperties.cs
- GACIdentityPermission.cs
- NGCSerializationManagerAsync.cs
- StackOverflowException.cs
- DataBindingList.cs
- SiteMapNode.cs
- RegistrySecurity.cs
- FontDialog.cs
- Size.cs
- WorkflowQueueInfo.cs
- CommentEmitter.cs
- ResourcesGenerator.cs
- TableCell.cs
- SystemIPGlobalProperties.cs
- Rules.cs
- InternalConfigConfigurationFactory.cs
- SiteOfOriginPart.cs
- MsmqBindingBase.cs
- Image.cs
- ErrorFormatter.cs
- BindingMemberInfo.cs
- RegexCompilationInfo.cs
- PathGeometry.cs
- Button.cs
- WebPartTransformerAttribute.cs
- NetSectionGroup.cs
- EventLogPermissionEntry.cs
- BitmapEffectInputConnector.cs
- RemoteTokenFactory.cs
- XmlSchemaInfo.cs
- DataRelation.cs
- AdornerDecorator.cs
- FixUp.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- DoubleLinkListEnumerator.cs
- SystemWebSectionGroup.cs
- XmlSchemaAttributeGroup.cs
- SoapExtensionTypeElement.cs
- PaperSource.cs
- ResourceFallbackManager.cs
- RelationshipConverter.cs
- CompositionCommandSet.cs
- PersonalizationStateInfo.cs
- BoundColumn.cs
- Grid.cs
- CssStyleCollection.cs
- SafeRightsManagementPubHandle.cs
- SiteMapProvider.cs
- GenericFlowSwitchHelper.cs
- SiteMapSection.cs
- DrawingGroupDrawingContext.cs
- SystemResourceKey.cs
- PenContext.cs
- PerfCounterSection.cs
- figurelengthconverter.cs
- GrammarBuilderDictation.cs
- Listbox.cs
- ByteAnimationBase.cs
- MsmqDiagnostics.cs
- CombinedGeometry.cs
- MessageDescriptionCollection.cs
- XhtmlBasicSelectionListAdapter.cs
- _FtpControlStream.cs
- ILGen.cs
- Context.cs
- ParallelForEach.cs
- ColumnMap.cs
- QuotedPairReader.cs
- SslStream.cs
- WorkflowCommandExtensionItem.cs
- TypeGeneratedEventArgs.cs
- TouchPoint.cs
- IntegerValidatorAttribute.cs
- XPathNodeInfoAtom.cs