void PluginMenuItem_Click(object sender, EventArgs e) { Plugins.MenuItem menuItem = ((Plugins.MenuItem)((ToolStripMenuItem)sender).Tag); if (menuItem.Click != null) { menuItem.Click(menuItem, mainCtrl.CurrentMapCtrl.MapView.Tree.SelectedNodes); } }