private async void EditButton_Click(object sender, EventArgs e) { if (BlogListUI.SelectedValue == null) { MessageBox.Show("Nothing is selected"); return; } string item = BlogListUI.SelectedValue.ToString(); using var editForm = new EditWindow(await _loader.GetBlogItem(item).ConfigureAwait(true), item, _tags); editForm.FormClosed += Save; editForm.ShowDialog(this); }
private void AddButton_Click(object sender, EventArgs e) { using var editForm = new EditWindow(_loader.GetTags()); editForm.FormClosed += Save; editForm.ShowDialog(this); }