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
- VersionedStream.cs
- DataPager.cs
- IssuerInformation.cs
- NumericUpDown.cs
- SessionParameter.cs
- SystemIcons.cs
- RegistryPermission.cs
- PaginationProgressEventArgs.cs
- ResourceKey.cs
- RegularExpressionValidator.cs
- CompositeFontInfo.cs
- StatusInfoItem.cs
- SizeLimitedCache.cs
- SmtpLoginAuthenticationModule.cs
- ReturnValue.cs
- DirectoryRootQuery.cs
- PageRequestManager.cs
- DataGridViewBindingCompleteEventArgs.cs
- CategoryAttribute.cs
- SqlUDTStorage.cs
- MarkerProperties.cs
- NotifyInputEventArgs.cs
- SettingsPropertyNotFoundException.cs
- StrongNameKeyPair.cs
- SqlDataSource.cs
- PassportIdentity.cs
- OrderToken.cs
- Typography.cs
- UrlPath.cs
- JsonSerializer.cs
- AcceleratedTokenProviderState.cs
- MethodImplAttribute.cs
- GregorianCalendarHelper.cs
- RtfToXamlLexer.cs
- ThemeableAttribute.cs
- ShutDownListener.cs
- TextViewBase.cs
- ModelItem.cs
- NativeRecognizer.cs
- EventMappingSettings.cs
- StrongNamePublicKeyBlob.cs
- ApplicationCommands.cs
- GenericPrincipal.cs
- PeerCollaborationPermission.cs
- ServiceEndpoint.cs
- DataGridViewRow.cs
- SafeNativeMethods.cs
- NativeMethods.cs
- StyleTypedPropertyAttribute.cs
- IntSecurity.cs
- Size3D.cs
- XamlReader.cs
- MatrixTransform3D.cs
- SchemaCreator.cs
- PasswordDeriveBytes.cs
- CachedBitmap.cs
- WorkflowRequestContext.cs
- RegionData.cs
- GridView.cs
- AQNBuilder.cs
- UIElementIsland.cs
- DataGridCommandEventArgs.cs
- QueryCacheKey.cs
- MergablePropertyAttribute.cs
- ConfigXmlWhitespace.cs
- ImageDrawing.cs
- rsa.cs
- EdmFunction.cs
- ChangeInterceptorAttribute.cs
- ApplyTemplatesAction.cs
- ConsoleKeyInfo.cs
- CollectionView.cs
- datacache.cs
- Registry.cs
- CurrentChangingEventManager.cs
- CopyOnWriteList.cs
- FrameworkElement.cs
- XmlNamedNodeMap.cs
- ExpressionTextBox.xaml.cs
- SoapSchemaMember.cs
- ProtocolElement.cs
- SkinBuilder.cs
- PrinterResolution.cs
- ReaderWriterLockWrapper.cs
- NaturalLanguageHyphenator.cs
- SplineQuaternionKeyFrame.cs
- HttpApplication.cs
- BypassElement.cs
- Form.cs
- TextEditorCharacters.cs
- SignatureHelper.cs
- InputScope.cs
- DynamicPropertyReader.cs
- AggregateNode.cs
- StreamAsIStream.cs
- WpfPayload.cs
- IArgumentProvider.cs
- ColumnResult.cs
- ResXResourceSet.cs
- InkPresenter.cs