Exemplo n.º 1
0
 private void btn_Edit_Click(object sender, EventArgs e)
 {
     foreach (int index in lstBox_Processes.SelectedIndices)
     {
         Process         process = (Process)lstBox_Processes.Items[index];
         EditProcessForm form    = new EditProcessForm(process, queue_type == 2);
         form.StartPosition = FormStartPosition.CenterParent;
         form.ShowDialog();
         if (form.DialogResult == DialogResult.OK)
         {
             lstBox_Processes.Items[index] = form.getProcess();
         }
     }
 }
Exemplo n.º 2
0
        private void btn_Add_Click(object sender, EventArgs e)
        {
            EditProcessForm form = new EditProcessForm(null, queue_type == 2);

            form.StartPosition = FormStartPosition.CenterParent;
            form.Text          = "New Process";
            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                Process process = form.process;
                lstBox_Processes.Items.Add(process);
            }
            CheckButtonsStatus();
        }