Esempio n. 1
0
 private void addDestinationButton_Click(object sender, EventArgs e)
 {
     if (planesListBox.SelectedIndex != -1)
     {
         addDestinationFrom = new AddDestination(this);
         addDestinationFrom.ShowDialog();
         planesListBox_SelectedIndexChanged(sender, e);
     }
 }
Esempio n. 2
0
        private void addDestination_Click(object sender, EventArgs e)
        {
            AddDestination addDestination = new AddDestination();

            if (addDestination.ShowDialog() == DialogResult.OK)
            {
                Aerodrom a = (Aerodrom)listAirports.SelectedItem;
                a.Destinations.Add(addDestination.destination);
                listDest.Items.Add(addDestination.destination);
            }
        }