當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。