/// <summary> /// Creates and shows an Add Source context menu at the mouse pointer /// </summary> public ContextMenuStrip AddSourceContextMenu() { var inputmenu = new ContextMenuStrip { Renderer = new AccessKeyMenuStripRenderer() }; foreach (string inputType in Obs.GetSourceInputTypes()) { string displayname = Obs.GetSourceTypeDisplayName(inputType); var menuitem = new ToolStripMenuItem(displayname + " (" + inputType + ")") { Tag = Tuple.Create(inputType, displayname + (Sources.Count + 1)) }; inputmenu.Items.Add(menuitem); } return(inputmenu); }