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
- SpellCheck.cs
- MetaModel.cs
- FocusChangedEventArgs.cs
- MaskedTextProvider.cs
- SemaphoreSecurity.cs
- SizeAnimationUsingKeyFrames.cs
- SignatureHelper.cs
- SHA512Managed.cs
- RuntimeDelegateArgument.cs
- UIElementHelper.cs
- QilName.cs
- FormViewPageEventArgs.cs
- SystemUdpStatistics.cs
- KeyInterop.cs
- CachedBitmap.cs
- XamlVector3DCollectionSerializer.cs
- TableLayoutCellPaintEventArgs.cs
- SHA256.cs
- DataGridViewRowEventArgs.cs
- RequestChannel.cs
- X509CertificateInitiatorServiceCredential.cs
- AutomationTextAttribute.cs
- SessionIDManager.cs
- DATA_BLOB.cs
- ChtmlTextWriter.cs
- controlskin.cs
- InstanceNormalEvent.cs
- DispatcherProcessingDisabled.cs
- QueryTreeBuilder.cs
- ButtonFieldBase.cs
- StandardMenuStripVerb.cs
- GlobalProxySelection.cs
- ToggleButton.cs
- IdentityNotMappedException.cs
- DataViewSetting.cs
- MergablePropertyAttribute.cs
- OutputCacheProfile.cs
- NetTcpSectionData.cs
- Util.cs
- CaseInsensitiveComparer.cs
- Classification.cs
- NumericUpDownAccelerationCollection.cs
- XMLSyntaxException.cs
- UnmanagedHandle.cs
- XsltLoader.cs
- ContentElement.cs
- DESCryptoServiceProvider.cs
- DocumentReference.cs
- ChtmlPageAdapter.cs
- StylusPlugInCollection.cs
- LayoutUtils.cs
- RequestCacheManager.cs
- UserControlDocumentDesigner.cs
- ModifierKeysValueSerializer.cs
- StructuredTypeInfo.cs
- IntPtr.cs
- ImmComposition.cs
- RoleBoolean.cs
- Parser.cs
- EntityDataSourceDesignerHelper.cs
- CodeGeneratorOptions.cs
- TypeResolvingOptions.cs
- DragStartedEventArgs.cs
- DateTimeOffset.cs
- SchemeSettingElement.cs
- XmlEventCache.cs
- _ConnectionGroup.cs
- ColumnMapProcessor.cs
- IsolatedStorageFileStream.cs
- SingleStorage.cs
- StorageConditionPropertyMapping.cs
- XMLUtil.cs
- SiteMapDataSource.cs
- PlainXmlSerializer.cs
- FixedFlowMap.cs
- FillBehavior.cs
- dtdvalidator.cs
- WhereQueryOperator.cs
- GeneratedView.cs
- ProcessStartInfo.cs
- TextElementCollectionHelper.cs
- IxmlLineInfo.cs
- ManifestBasedResourceGroveler.cs
- ColorDialog.cs
- SecurityVerifiedMessage.cs
- xamlnodes.cs
- DataGridViewHitTestInfo.cs
- TransformerConfigurationWizardBase.cs
- ResourceManager.cs
- PerformanceCounterLib.cs
- WebServiceClientProxyGenerator.cs
- MetaType.cs
- JsonStringDataContract.cs
- SmtpCommands.cs
- MeasureItemEvent.cs
- HandledMouseEvent.cs
- List.cs
- ValidationError.cs
- TraceEventCache.cs
- ContextStack.cs