private void contextMenuStrip_Closing(object sender, CancelEventArgs e) { if (showDefaultContextMenu && sender == contextMenuStrip) { contextMenuStrip.Closing -= contextMenuStrip_Closing; WinFormHelpers.CleanUpContextMenu(this.contextMenuStrip); } }
private void ContextMenuStrip_Closing(object sender, ToolStripDropDownClosingEventArgs e) { if (sender == _listView.ContextMenuStrip) { WinFormHelpers.CleanUpContextMenu(_listView.ContextMenuStrip); } ToolSetController.SelectedTool = ToolSetController.DefaultTool; e.Cancel = false; }