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
- TypeListConverter.cs
- TextReader.cs
- FileStream.cs
- HtmlInputHidden.cs
- DirectoryObjectSecurity.cs
- ListViewInsertEventArgs.cs
- InvalidOleVariantTypeException.cs
- ServiceProviders.cs
- ParameterToken.cs
- WindowsServiceCredential.cs
- HtmlElement.cs
- StorageRoot.cs
- PolicyValidationException.cs
- ComponentSerializationService.cs
- LicenseException.cs
- SectionVisual.cs
- JsonWriter.cs
- DocumentPaginator.cs
- Automation.cs
- DefaultPropertyAttribute.cs
- PeerApplication.cs
- HttpDictionary.cs
- SqlServer2KCompatibilityAnnotation.cs
- ContractMethodParameterInfo.cs
- AsymmetricAlgorithm.cs
- XmlAtomicValue.cs
- SQLConvert.cs
- Trigger.cs
- GlyphCache.cs
- FolderLevelBuildProviderCollection.cs
- MessageBox.cs
- TextBoxRenderer.cs
- SystemFonts.cs
- ConnectionPointCookie.cs
- LoginView.cs
- CreateUserWizardStep.cs
- DataGridHeaderBorder.cs
- NavigationFailedEventArgs.cs
- Parser.cs
- StaticTextPointer.cs
- View.cs
- MimeObjectFactory.cs
- ResourcePool.cs
- ShaperBuffers.cs
- TableRow.cs
- ObjectCloneHelper.cs
- Vector3DIndependentAnimationStorage.cs
- PersonalizationProvider.cs
- EntityRecordInfo.cs
- FixedSOMTableRow.cs
- StandardBindingElement.cs
- Path.cs
- GridViewRowCollection.cs
- KeyValuePair.cs
- Rethrow.cs
- WebPartHelpVerb.cs
- SecurityDescriptor.cs
- DecoderNLS.cs
- SmtpReplyReaderFactory.cs
- RuntimeTrackingProfile.cs
- BamlBinaryWriter.cs
- PagesSection.cs
- HttpResponse.cs
- PageBreakRecord.cs
- ResourceAssociationType.cs
- DataGridAddNewRow.cs
- SubstitutionList.cs
- WebPartAuthorizationEventArgs.cs
- UnsafeCollabNativeMethods.cs
- DesignerExtenders.cs
- DesignerListAdapter.cs
- OciLobLocator.cs
- DataColumnCollection.cs
- AuthenticationService.cs
- CodeNamespaceCollection.cs
- VScrollBar.cs
- SqlServices.cs
- HttpRawResponse.cs
- DrawingAttributes.cs
- CacheSection.cs
- TogglePattern.cs
- DataGridCommandEventArgs.cs
- WebBrowsableAttribute.cs
- ActivitySurrogate.cs
- ListViewItemSelectionChangedEvent.cs
- ObjectDataSourceDisposingEventArgs.cs
- XmlAnyAttributeAttribute.cs
- TdsParserStateObject.cs
- WorkerRequest.cs
- ScaleTransform.cs
- ProcessModule.cs
- QueryCursorEventArgs.cs
- SeverityFilter.cs
- Function.cs
- ProfileSettingsCollection.cs
- EndPoint.cs
- DataGridViewRowPostPaintEventArgs.cs
- SqlPersonalizationProvider.cs
- FixedSOMSemanticBox.cs
- ThicknessKeyFrameCollection.cs