// Gestion des selections du contexteMenu private void OnMenuClicked(object sender, EventArgs e) { VelerSoftware.Design.Toolkit.KryptonContextMenuItem menuItem = sender as VelerSoftware.Design.Toolkit.KryptonContextMenuItem; if (menuItem != null && menuItem.Tag is System.ComponentModel.Design.MenuCommand) { System.ComponentModel.Design.MenuCommand command = menuItem.Tag as System.ComponentModel.Design.MenuCommand; command.Invoke(); } }
private void OnMenuClicked(object sender, EventArgs args) { ToolStripMenuItem item = sender as ToolStripMenuItem; if (item != null) { MenuCommand cmd = item.Tag as MenuCommand; cmd.Invoke(); } }
// Gestion des selections du contexteMenu private void OnMenuClicked(object sender, EventArgs e) { ToolStripDropDownButton menuItem = sender as ToolStripDropDownButton; if (menuItem != null && menuItem.Tag is System.ComponentModel.Design.MenuCommand) { System.ComponentModel.Design.MenuCommand command = menuItem.Tag as System.ComponentModel.Design.MenuCommand; command.Invoke(); } }