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
- WebMessageEncoderFactory.cs
- ServiceHttpHandlerFactory.cs
- ActivitySurrogateSelector.cs
- ServiceCredentialsElement.cs
- CopyOnWriteList.cs
- TextSpan.cs
- TreeNodeCollection.cs
- XmlSchemaAttributeGroupRef.cs
- Common.cs
- Properties.cs
- IPAddressCollection.cs
- UIElement3D.cs
- TextClipboardData.cs
- PerformanceCounterPermissionEntryCollection.cs
- QilScopedVisitor.cs
- Clipboard.cs
- MergeFilterQuery.cs
- ResolveNameEventArgs.cs
- MobileListItemCollection.cs
- LineVisual.cs
- DataGridTextBoxColumn.cs
- Trace.cs
- SoundPlayer.cs
- DataGridViewCellConverter.cs
- UnsafeNativeMethodsCLR.cs
- DataRowComparer.cs
- Sql8ExpressionRewriter.cs
- TableDesigner.cs
- SharedUtils.cs
- UnsafeNativeMethodsCLR.cs
- CodeSubDirectory.cs
- CodeGroup.cs
- TextLineBreak.cs
- DataGridViewButtonColumn.cs
- ColorPalette.cs
- RectangleConverter.cs
- DataControlFieldCell.cs
- AddInPipelineAttributes.cs
- WeakHashtable.cs
- WinFormsComponentEditor.cs
- xsdvalidator.cs
- basenumberconverter.cs
- SimpleFileLog.cs
- XmlILIndex.cs
- ToolBarTray.cs
- ProxyAttribute.cs
- CuspData.cs
- DataKeyCollection.cs
- FlowDocumentPaginator.cs
- StylusEventArgs.cs
- TemplateKeyConverter.cs
- AssemblyAttributesGoHere.cs
- AttachedPropertyDescriptor.cs
- XmlUTF8TextWriter.cs
- TextProviderWrapper.cs
- DynamicUpdateCommand.cs
- LostFocusEventManager.cs
- ObjectStateManagerMetadata.cs
- MenuItemCollection.cs
- InputMethodStateTypeInfo.cs
- DrawItemEvent.cs
- WindowPatternIdentifiers.cs
- SoapSchemaImporter.cs
- SectionVisual.cs
- TraceUtility.cs
- Win32KeyboardDevice.cs
- RijndaelCryptoServiceProvider.cs
- ObjectCloneHelper.cs
- Activity.cs
- PolyLineSegmentFigureLogic.cs
- NameValueSectionHandler.cs
- SoapCodeExporter.cs
- PresentationAppDomainManager.cs
- RecordBuilder.cs
- DigestComparer.cs
- CoreSwitches.cs
- EntityDataSourceDataSelection.cs
- Scripts.cs
- InputLanguageEventArgs.cs
- XmlCharType.cs
- MultipleViewProviderWrapper.cs
- SafeTimerHandle.cs
- Tracking.cs
- DataTablePropertyDescriptor.cs
- Rect3DValueSerializer.cs
- Util.cs
- ImplicitInputBrush.cs
- ProfessionalColorTable.cs
- PrimaryKeyTypeConverter.cs
- CryptoApi.cs
- MultiTargetingUtil.cs
- ConnectionStringsExpressionBuilder.cs
- Quaternion.cs
- XmlStreamStore.cs
- HttpServerChannel.cs
- DllNotFoundException.cs
- ZipIOExtraFieldElement.cs
- FillRuleValidation.cs
- relpropertyhelper.cs
- TransportElement.cs