private void OpenEditTaskWindow(FileTask task, bool isNewTask) { using (var editTaskWindow = new EditTaskWindow(task, isNewTask)) { editTaskWindow.ShowDialog(); if (editTaskWindow.Canceled) { return; } if (isNewTask) { Database.Tasks.Add(task); } UpdateList(); } }
public EditTaskWindow(FileTask task, bool isNewTask) { InitializeComponent(); Task = task; newTask = isNewTask; }