예제 #1
0
        private void NewDiverButton_Click(object sender, RoutedEventArgs e)
        {
            DiverWindow dw = new DiverWindow(createdEvent.Board);

            dw.ShowDialog();
            Diver d = dw.diver;

            DiverList.Items.Add(d);
            divers.Add(d);
        }
예제 #2
0
        private void EditDiverButton_Click(object sender, RoutedEventArgs e)
        {
            int index = DiverList.SelectedIndex;

            if (index == -1)
            {
                return;
            }
            Diver       toEdit = divers[index];
            DiverWindow dw     = new DiverWindow(toEdit);

            dw.ShowDialog();
            Diver newDiver = dw.diver;

            divers[index]          = newDiver;
            DiverList.Items[index] = newDiver;
        }