static void Main(string[] args) { DisplayMenu thisdm = new DisplayMenu(); ProcessMenu thispm = new ProcessMenu(); thisdm.displayMenu(); int menuChoice = thispm.GetChoice(); thispm.processMenu(menuChoice); Console.Read(); }
private void RunningProcessList_MouseDown(object sender, MouseEventArgs e) { var index = RunningProcessList.IndexFromPoint(e.X, e.Y); if (index == ListBox.NoMatches) { return; } RunningProcessList.SelectedIndex = index; if (e.Button == MouseButtons.Right) { ProcessMenu.Tag = RunningProcessList.Items[index]; ProcessMenu.Show(RunningProcessList, new Point(e.X, e.Y)); } }