private void BT_Add_Closed(object sender, EventArgs e) { if (childwindow.DialogResult.GetValueOrDefault(false)) { ItemSources.Add(childwindow.NewSource); } childwindow = null; GenerateList(); EnableDisableButtons(); }
private void BT_Edit_Closed(object sender, EventArgs e) { if (childwindow.DialogResult.GetValueOrDefault(false)) { ItemSources[TheListBox.SelectedIndex] = childwindow.NewSource; } childwindow = null; GenerateList(); EnableDisableButtons(); }
private void BT_Edit_Click(object sender, RoutedEventArgs e) { childwindow = new ItemSourceEditorChild(TheListBox.SelectedItem as ItemLocation); childwindow.Closed += new EventHandler(BT_Edit_Closed); childwindow.Show(); }
private void BT_Add_Click(object sender, RoutedEventArgs e) { childwindow = new ItemSourceEditorChild(); childwindow.Closed += new EventHandler(BT_Add_Closed); childwindow.Show(); }