예제 #1
0
    static void Main(string[] args)
    {
        DisplayMenu thisdm = new DisplayMenu();
        ProcessMenu thispm = new ProcessMenu();

        thisdm.displayMenu();
        int menuChoice = thispm.GetChoice();

        thispm.processMenu(menuChoice);
        Console.Read();
    }
예제 #2
0
        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));
            }
        }