本文整理汇总了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);
}
示例2: OnClosing
protected override void OnClosing(ToolStripDropDownClosingEventArgs e)
{
if (_cancelNextAttemptedClose && e.CloseReason == ToolStripDropDownCloseReason.ItemClicked)
{
e.Cancel = true;
_cancelNextAttemptedClose = false;
return;
}
base.OnClosing(e);
}
示例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;
}
}
示例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;
}
示例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);
}
示例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;
}
示例8: contextMenuStripWaveform_Closing
private void contextMenuStripWaveform_Closing(object sender, ToolStripDropDownClosingEventArgs e)
{
_lastWaveformMenuCloseTicks = DateTime.Now.Ticks;
}
示例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)));
}
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例14: OnOverflowDropDownClosing
private void OnOverflowDropDownClosing(object sender, ToolStripDropDownClosingEventArgs e)
{
e.Cancel = e.CloseReason == ToolStripDropDownCloseReason.ItemClicked;
}
示例15: filterOutToolStripMenuItem_Closing
private void filterOutToolStripMenuItem_Closing(object sender, ToolStripDropDownClosingEventArgs e)
{
if (e.CloseReason == ToolStripDropDownCloseReason.ItemClicked)
{
e.Cancel = true;
}
}