private void addButton_click(object sender, RoutedEventArgs e) { ModConfigEditor creator = new ModConfigEditor(); creator.ShowDialog(); if (creator.DialogResult == true) { listView1.Items.Clear(); getPaths(); InitList(); } }
private void editButton_Click(object sender, RoutedEventArgs e) { object toEdit = listView1.SelectedItems[0]; int position = listView1.Items.IndexOf(toEdit); ModConfigEditor creator = new ModConfigEditor(true, position); creator.Owner = GetWindow(this); creator.ShowDialog(); if (creator.DialogResult == true) { listView1.Items.Clear(); getPaths(); InitList(); } }