private void editTank_Click(object sender, MouseButtonEventArgs e) { if (dynamicTankList.SelectedItem == null) { return; } AddTank addTankWindow = new AddTank(tactics.getTanksObj(), (DynamicTank)dynamicTankList.SelectedItem); addTankWindow.ShowDialog(); if (!addTankWindow.dialogResult) { return; } tactics.editTank(addTankWindow.newtank); briefing.reloadDynamic(); }
private void addTank_Click(object sender, RoutedEventArgs e) { AddTank addTankWindow = new AddTank(tactics.getTanksObj()); addTankWindow.ShowDialog(); if (!addTankWindow.dialogResult) { return; } tactics.addTank(addTankWindow.newtank); briefing.reloadDynamic(); }