コード例 #1
0
ファイル: Form1.cs プロジェクト: aavramovic/vp-labs
 private void addDestinationButton_Click(object sender, EventArgs e)
 {
     if (planesListBox.SelectedIndex != -1)
     {
         addDestinationFrom = new AddDestination(this);
         addDestinationFrom.ShowDialog();
         planesListBox_SelectedIndexChanged(sender, e);
     }
 }
コード例 #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);
            }
        }