1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace SmartCoalApplication.SystemLayer
- {
- public class MenuStripEx : MenuStrip
- {
- private bool clickThrough = true;
- private static int openCount = 0;
- public MenuStripEx()
- {
- this.ImageScalingSize = new System.Drawing.Size(UI.ScaleWidth(16), UI.ScaleHeight(16));
- }
- protected override void WndProc(ref Message m)
- {
- base.WndProc(ref m);
- if (this.clickThrough)
- {
- UI.ClickThroughWndProc(ref m);
- }
- }
- public static bool IsAnyMenuActive
- {
- get
- {
- return openCount > 0;
- }
- }
- }
- }
|