private void addMove_Click(object sender, RoutedEventArgs e) { AddOrChangeItem wnd = new AddOrChangeItem(this, currentlyShownUnit, "new_move"); wnd.Show(); moves.Items.Refresh(); }
private void editItem_Click(object sender, RoutedEventArgs e) { var item = itemsList.SelectedItem as Item; if (item != null) { AddOrChangeItem wnd = new AddOrChangeItem(mainwindow, item, currentlyShownUnit); wnd.Show(); } }
private void Button_Click_1(object sender, RoutedEventArgs e) { var crewMember = namesList.SelectedItem as Unit; var item = memItems.SelectedItem as Item; if (crewMember != null && memItems.SelectedItem != null) { AddOrChangeItem form = new AddOrChangeItem(mainwindow, item, crewMember); form.ShowDialog(); } }
private void editMove_Click(object sender, RoutedEventArgs e) { var move = moves.SelectedItem as Move; if (move != null) { AddOrChangeItem wnd = new AddOrChangeItem(this, move, currentlyShownUnit); delMove.IsEnabled = false; editMove.IsEnabled = false; wnd.Show(); } moves.Items.Refresh(); }
private void addItem_Click(object sender, RoutedEventArgs e) { AddOrChangeItem wnd = new AddOrChangeItem(this, currentlyShownUnit, "new_item"); wnd.Show(); }