コード例 #1
0
        private void btnAddTask_Click(object sender, RoutedEventArgs e)
        {
            AddTaskWindow addTask = new AddTaskWindow();

            addTask.Owner = this;
            addTask.Show();
        }
コード例 #2
0
 private void btnEditTask_Click(object sender, RoutedEventArgs e)
 {
     if (lbTasks.SelectedIndex >= 0)
     {
         AddTaskWindow editTask = new AddTaskWindow("edit", (DbLibrary.Task)lbTasks.SelectedItem);
         editTask.Owner = this;
         editTask.Show();
     }
     else
     {
         MessageBox.Show("Choose a task");
     }
 }