Beispiel #1
0
 private void buttonChangeTask_Click(object sender, EventArgs e)
 {
     if (listViewTasks.SelectedIndices.Count > 0)
     {
         int            index      = listViewTasks.SelectedIndices[0];
         TaskEditorForm TaskEditor = new TaskEditorForm(listViewTasks.SelectedIndices[0]);
         TaskEditor.Owner = this;
         TaskEditor.ShowDialog(this);
         listViewTasks.Focus();
         listViewTasks.Items[index].Focused  = true;
         listViewTasks.Items[index].Selected = true;
     }
 }
Beispiel #2
0
        private void buttonAddTask_Click(object sender, EventArgs e)
        {
            TaskEditorForm TaskEditor = new TaskEditorForm();

            TaskEditor.Owner = this;

            if (TaskEditor.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                listViewTasks.Items[listViewTasks.Items.Count - 1].Selected = true;
            }

            listViewTasks.Focus();
            CheckButtons();
        }