public static async Task ShowEditDialog(Window owner, bool isEdit)
        {
            var edit = new AddOrEditTask
            {
                Owner = owner,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                IsEdit = isEdit
            };

            var viewModel = (AddOrEditTaskViewModel)edit.FindResource("AddOrEditTaskViewModel");
            await viewModel.LoadProjects();

            edit.projects.DropDownClosed += (o, a) => edit.task.Focus();
            edit.task.Focus();

            if (isEdit)
            {
                viewModel.InitializeValues();
                edit.task.SelectAll();

                edit.numPomodoros.Minimum = viewModel.MinPomodoroCount;
            }

            edit.ShowDialog();
        }
        private async void OnAddClick(object sender, RoutedEventArgs e)
        {
            await AddOrEditTask.ShowEditDialog(this, false);

            try
            {
                var viewModel = (EditTasksDialogViewModel)FindResource("EditTasksDialogViewModel");
                await viewModel.LoadTasks();

                list.Items.Refresh();
            }
            catch (Exception ex)
            {
                MessageDialog.ShowError(ex, "EditHelper.OnAddClick()");
            }
        }