本文整理汇总了C#中System.Windows.Forms.ToolStripDropDownClosingEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ToolStripDropDownClosingEventArgs类的具体用法?C# ToolStripDropDownClosingEventArgs怎么用?C# ToolStripDropDownClosingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolStripDropDownClosingEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripDropDownClosingEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: contextMenu_Closing
private void contextMenu_Closing(object sender, ToolStripDropDownClosingEventArgs e)
{
if(fCancelClosing) {
e.Cancel = true;
fCancelClosing = false;
}
else {
if(fRootReordered) {
fRootReordered = false;
List<int> lst = new List<int>();
for(int i = 0; i < contextMenu.Items.Count; i++) {
if(lst.Count == ITEMTYPE_COUNT)
break;
ToolStripItem item = contextMenu.Items[i];
if(item is TitleMenuItem) {
if(item == tmiGroup || item == tmiLabel_Group) {
lst.Add(ITEMINDEX_GROUP);
continue;
}
if(item == tmiHistory || item == tmiLabel_History) {
lst.Add(ITEMINDEX_RECENTTAB);
continue;
}
if(item == tmiUserApp || item == tmiLabel_UserApp) {
lst.Add(ITEMINDEX_APPLAUNCHER);
continue;
}
if(item == tmiRecentFile || item == tmiLabel_RecentFile) {
lst.Add(ITEMINDEX_RECENTFILE);
continue;
}
}
}
if(lst.Count < 4) {
foreach(int t in lstItemOrder) {
if(!lst.Contains(t)) {
lst.Add(t);
}
}
}
lstItemOrder.Clear();
foreach(int t in lst) {
lstItemOrder.Add(t);
}
SaveSetting();
}
}
}
开发者ID:Nicologies,项目名称:QTTabBar,代码行数:53,代码来源:QTDesktopTool.cs
示例17: MenuClosing
private static void MenuClosing(object sender, ToolStripDropDownClosingEventArgs e)
{
_menu.Items[3].Enabled = true;
}
开发者ID:blahblahblahblah831,项目名称:brawltools2,代码行数:4,代码来源:RELWrapper.cs
示例18: contextMenuStrip_keywordList_Closing
private void contextMenuStrip_keywordList_Closing(object sender, ToolStripDropDownClosingEventArgs e)
{
}
开发者ID:mramthun,项目名称:pbank,代码行数:3,代码来源:MainForm.cs
示例19: ContextMenuStrip_Closing
private void ContextMenuStrip_Closing(object sender, ToolStripDropDownClosingEventArgs e)
{
foreach (var item in ContextMenuStrip.Items)
{
var moonItem = item as Moonlight.WindowsForms.StateControls.MoonToolStripMenuItem;
if (moonItem != null)
{
moonItem.OnContextMenuStripClosing();
}
}
}
开发者ID:kissstudio,项目名称:Topawes,代码行数:11,代码来源:MoonDataGridView.cs
示例20: ContextMenuStrip_Closing
void ContextMenuStrip_Closing(object sender, ToolStripDropDownClosingEventArgs e)
{
ContextMenuStrip cms = sender as ContextMenuStrip;
if (cms != null) {
cms.Closing -= new ToolStripDropDownClosingEventHandler(ContextMenuStrip_Closing);
}
SetButtonDrawState();
if (e.CloseReason == ToolStripDropDownCloseReason.AppClicked) {
skipNextOpen = (dropDownRectangle.Contains(this.PointToClient(Cursor.Position)));
}
}
开发者ID:andersruberg,项目名称:RehabLight,代码行数:13,代码来源:SplitButton.cs
注:本文中的System.Windows.Forms.ToolStripDropDownClosingEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论