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