private void Button_Edit_Click(object sender, RoutedEventArgs e) { ListViewItemPokerType selectedItem = ListView_PokerTypes.SelectedItem as ListViewItemPokerType; if (selectedItem != null) { App.PokerTypeManager.Remove(selectedItem.PokerType); WindowPokerTypeEdit dialog = new WindowPokerTypeEdit(App.WindowMain, selectedItem.PokerType); dialog.ShowDialog(); App.PokerTypeManager.Add(dialog.PokerType); UpdateListView(dialog.PokerType); } }
private void Button_Add_Click(object sender, RoutedEventArgs e) { WindowPokerTypeEdit dialog = new WindowPokerTypeEdit(App.WindowMain); dialog.ShowDialog(); if (dialog.Saved) { App.PokerTypeManager.Add(dialog.PokerType); UpdateListView(dialog.PokerType); } }