当前位置: 首页>>代码示例>>C#>>正文


C# Forms.ToolStripDropDownClosingEventArgs类代码示例

本文整理汇总了C#中System.Windows.Forms.ToolStripDropDownClosingEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ToolStripDropDownClosingEventArgs类的具体用法?C# ToolStripDropDownClosingEventArgs怎么用?C# ToolStripDropDownClosingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ToolStripDropDownClosingEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripDropDownClosingEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnClosing

 protected override void OnClosing(ToolStripDropDownClosingEventArgs e)
 {
     Control hostControl = GetHostedControl();
     if (hostControl != null)
         hostControl.SizeChanged -= HostControlSizeChanged;
     base.OnClosing(e);
 }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:7,代码来源:PopupControlHost.cs

示例2: OnClosing

        protected override void OnClosing(ToolStripDropDownClosingEventArgs e)
        {
            if (_cancelNextAttemptedClose && e.CloseReason == ToolStripDropDownCloseReason.ItemClicked)
            {
                e.Cancel = true;
                _cancelNextAttemptedClose = false;
                return;
            }

            base.OnClosing(e);
        }
开发者ID:Giftednewt,项目名称:audio-switcher,代码行数:11,代码来源:AudioContextMenuStrip.cs

示例3: DropDown_Closing

        private void DropDown_Closing(object sender, ToolStripDropDownClosingEventArgs e)
        {
            if (e.CloseReason != ToolStripDropDownCloseReason.AppClicked)
            {
                return ;
            }

            Rectangle dropDownButtonBoundsClient = DropDownButtonBounds; // Relative to the ToolStripSplitButton
            dropDownButtonBoundsClient.Offset(Bounds.Location); // Relative to the parent of the ToolStripSplitButton
            Rectangle dropDownButtonBoundsScreen = GetCurrentParent().RectangleToScreen(dropDownButtonBoundsClient); // Relative to the screen

            if (dropDownButtonBoundsScreen.Contains(Control.MousePosition))
            {
                e.Cancel = true;
            }
        }
开发者ID:mRemoteNG,项目名称:mRemoteNG,代码行数:16,代码来源:ToolStripSplitButton.cs

示例4: OnClosing

 protected override void OnClosing(ToolStripDropDownClosingEventArgs e)
 {
     if ((e.CloseReason == ToolStripDropDownCloseReason.AppFocusChange) && this._cancelClose)
     {
         this._cancelClose = false;
         e.Cancel = true;
     }
     else if ((e.CloseReason == ToolStripDropDownCloseReason.AppFocusChange) || (e.CloseReason == ToolStripDropDownCloseReason.AppClicked))
     {
         IntPtr activeWindow = System.Design.UnsafeNativeMethods.GetActiveWindow();
         if ((base.Handle == activeWindow) && (e.CloseReason == ToolStripDropDownCloseReason.AppClicked))
         {
             e.Cancel = false;
         }
         else if (WindowOwnsWindow(base.Handle, activeWindow))
         {
             e.Cancel = true;
         }
         else if ((this._mainParentWindow != null) && !WindowOwnsWindow(this._mainParentWindow.Handle, activeWindow))
         {
             if (this.IsWindowEnabled(this._mainParentWindow.Handle))
             {
                 e.Cancel = false;
             }
             else
             {
                 e.Cancel = true;
             }
             base.OnClosing(e);
             return;
         }
         IntPtr windowLong = System.Design.UnsafeNativeMethods.GetWindowLong(new HandleRef(this, activeWindow), -8);
         if (!this.IsWindowEnabled(windowLong))
         {
             e.Cancel = true;
         }
     }
     base.OnClosing(e);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:39,代码来源:DesignerActionToolStripDropDown.cs

示例5: m_dropDown_Closing

 void m_dropDown_Closing(object sender, ToolStripDropDownClosingEventArgs e)
 {
     m_lastHideTime = DateTime.Now;
 }
开发者ID:Winsor,项目名称:ITInfra,代码行数:4,代码来源:CustomComboBox.cs

示例6: Toggle_menu_on_closing

 private void Toggle_menu_on_closing(object sender, ToolStripDropDownClosingEventArgs e) {
     e.Cancel = e.CloseReason == ToolStripDropDownCloseReason.ItemClicked;
     if ( e.Cancel)
         util.postpone(update_toggles,1);
 }
开发者ID:noelhx,项目名称:logwizard,代码行数:5,代码来源:log_wizard.cs

示例7: menuClosing

 // Avoid the menu closing after clicking an item
 private void menuClosing(object sender, ToolStripDropDownClosingEventArgs e)
 {
     if (e.CloseReason == ToolStripDropDownCloseReason.ItemClicked)
         e.Cancel = true;
 }
开发者ID:Kolo93,项目名称:z0r-desktop,代码行数:6,代码来源:main.cs

示例8: contextMenuStripWaveform_Closing

 private void contextMenuStripWaveform_Closing(object sender, ToolStripDropDownClosingEventArgs e)
 {
     _lastWaveformMenuCloseTicks = DateTime.Now.Ticks;
 }
开发者ID:m1croN,项目名称:subtitleedit,代码行数:4,代码来源:Main.cs

示例9: ContextMenuStrip_Closing

        private void ContextMenuStrip_Closing(object sender, ToolStripDropDownClosingEventArgs e)
        {
            var cms = sender as ContextMenuStrip;
            if (cms != null)
            {
                cms.Closing -= ContextMenuStrip_Closing;
            }

            SetButtonDrawState();

            if (e.CloseReason == ToolStripDropDownCloseReason.AppClicked)
            {
                m_skipNextOpen = (m_dropDownRectangle.Contains(PointToClient(Cursor.Position)));
            }
        }
开发者ID:BeRo1985,项目名称:LevelEditor,代码行数:15,代码来源:SplitButton.cs

示例10: OnPopupClosing

 private void OnPopupClosing(object sender, ToolStripDropDownClosingEventArgs e)
 {
     if (e.CloseReason == ToolStripDropDownCloseReason.AppClicked) {
         Point pos = PointToClient(Control.MousePosition);
         if (pos.X > 0 && pos.Y > 0 && pos.X < this.Width && pos.Y < this.Height)
             _cancelNextOpen = true;
     }
     this.btDrop.Image = _img_dropdown;
 }
开发者ID:alnemer,项目名称:excel-qa-tools,代码行数:9,代码来源:DropDownCheckBox.cs

示例11: contextMenuRecord_Closing

 private void contextMenuRecord_Closing(object sender, ToolStripDropDownClosingEventArgs e)
 {
     this.contextMenuRecordCopyTo.DropDownItems.Clear();
     foreach (var item in this.contextMenuRecordAddMaster.DropDownItems.OfType<ToolStripButton>().Where(x => !x.Equals(this.browseToolStripMenuItem)).ToArray())
     {
         this.contextMenuRecordAddMaster.DropDownItems.Remove(item);
     }
 }
开发者ID:rxantos,项目名称:tesv-snip,代码行数:8,代码来源:PluginTreeView.cs

示例12: OnClosing

 /// <summary>
 /// Raises the <see cref="Closing"/> event
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnClosing(ToolStripDropDownClosingEventArgs e)
 {
     if (Closing != null)
     {
         Closing(this, e);
     }
 }
开发者ID:sduxiaowu,项目名称:NineLineScore,代码行数:11,代码来源:RibbonPopup.cs

示例13: ToolStripDropDown_Closing

 /// <summary>
 /// Handles the Closing event of the ToolStripDropDown
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ToolStripDropDown_Closing(object sender, ToolStripDropDownClosingEventArgs e)
 {
     OnClosing(e);
 }
开发者ID:sduxiaowu,项目名称:NineLineScore,代码行数:9,代码来源:RibbonPopup.cs

示例14: OnOverflowDropDownClosing

 private void OnOverflowDropDownClosing(object sender, ToolStripDropDownClosingEventArgs e)
 {
     e.Cancel = e.CloseReason == ToolStripDropDownCloseReason.ItemClicked;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:ToolStripDesigner.cs

示例15: filterOutToolStripMenuItem_Closing

 private void filterOutToolStripMenuItem_Closing(object sender, ToolStripDropDownClosingEventArgs e)
 {
     if (e.CloseReason == ToolStripDropDownCloseReason.ItemClicked)
     {
         e.Cancel = true;
     }
 }
开发者ID:ned14,项目名称:BEurtle,代码行数:7,代码来源:IssuesForm.cs


注:本文中的System.Windows.Forms.ToolStripDropDownClosingEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。