Exemple #1
0
        private void completed_button_Click(object sender, EventArgs e)
        {
            //grab selected task
            string task = currentTasks.SelectedItem.ToString();

            //mark the task as completed in the TaskTable table
            StoryTask.mark_task_as_complete(task);

            Boolean isFound = false;

            //remove from current tasks list and add to completed tasks list
            foreach (string s in completedTasks.Items)
            {
                if (s.Equals(currentTasks.SelectedItem.ToString()))
                {
                    isFound = true;
                    break;
                }
            }

            if (!isFound)
            {
                completedTasks.Items.Add(currentTasks.SelectedItem);
            }

            currentTasks.Items.Remove(currentTasks.SelectedItem);
            completedTasks.SetSelected(completedTasks.Items.IndexOf(task), true);
        }
Exemple #2
0
        private void completed_button_Click(object sender, EventArgs e)
        {
            //grab selected task
            string task = currentTasks.SelectedItem.ToString();

            //mark the task as completed in the TaskTable table
            StoryTask.mark_task_as_complete(task);

            //remove from current tasks list and add to completed tasks list
            completedTasks.Items.Add(currentTasks.SelectedItem);
            currentTasks.Items.Remove(currentTasks.SelectedItem);
        }