private void menuItemNewItem_Click(object sender, EventArgs e) { var newItemForm = new AddEditItem {Text = "Add Item", IsNewItem = true, ListId = this.ListId}; newItemForm.ShowDialog(); RefreshItems(); }
private void menuItemNewItem_Click(object sender, EventArgs e) { var newItemForm = new AddEditItem { Text = "Add Item", IsNewItem = true, ListId = this.ListId }; newItemForm.ShowDialog(); RefreshItems(); }
private void menuItemEdit_Click(object sender, EventArgs e) { if (null == ListBoxItems.SelectedItem) { return; } var newItemForm = new AddEditItem { Text = "Edit Item", IsNewItem = false, Item = ListBoxItems.SelectedItem as Item, ListId = this.ListId }; newItemForm.ShowDialog(); RefreshItems(); }