Exemple #1
0
        private void Button_AddTask_Click(object sender, RoutedEventArgs e)
        {
            DialogBoxAddTask dialogBox    = new DialogBoxAddTask();
            bool?            dialogResult = dialogBox.ShowDialog();

            if ((bool)dialogResult)
            {
                OpenTask(dialogBox.TaskName);
                MessageBox.Show("New task successfully created.");
            }
        }
        private void Button_CreateTask_Click(object sender, RoutedEventArgs e)
        {
            DialogBoxAddTask db_AddTask = new DialogBoxAddTask();
            bool?            result     = db_AddTask.ShowDialog();

            if ((bool)result)
            {
                ListBox_Tasks.ItemsSource  = handler.GetTasks();
                ListBox_Tasks.SelectedItem = db_AddTask.TaskName;
            }
        }