Example #1
0
        // --------------- Buttons --------------- //

        private void ButtonAddProcess_Click(object sender, EventArgs e)
        {
            // Open a new dialog for adding a process to the list
            ProcessDialog newProcessDialog = new ProcessDialog();
            DialogResult  dialogResult     = newProcessDialog.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                processList.Add(newProcessDialog.GetProcess());
            }
            newProcessDialog.Dispose();
        }
        private void buttonAddProcess_Click(object sender, EventArgs e)
        {
            // Open a new dialog for adding a process to the list
            ProcessDialog newProcessDialog = new ProcessDialog();
            DialogResult  dialogResult     = newProcessDialog.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                AddProcessToView(scheduler.AddAndEncapsulateProcess(newProcessDialog.GetProcess()));
            }
            newProcessDialog.Dispose();
        }