void OnMenuItemClick(object sender, EventArgs e) { ToolStripMenuItem item = sender as ToolStripMenuItem; if (item.IsNullObj()) { return; } string commandId = item.Tag as string; if (commandId.IsNull()) { return; } CommandSelectedAggregatedEvent aggregatedEvent = new CommandSelectedAggregatedEvent(); aggregatedEvent.CommandId = commandId; _eventAggregator.PublishEvent(aggregatedEvent); }