예제 #1
0
파일: Form1.cs 프로젝트: AtanasK/VP
 private void btnAddDestination_Click(object sender, EventArgs e)
 {
     AddDestination form = new AddDestination();
     if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         Airport airport = lbAirports.SelectedItem as Airport;
         airport.AddDestination(form.Destination);
         loadDestinations();
     }
 }
예제 #2
0
        private void btnAddDestination_Click(object sender, EventArgs e)
        {
            AddDestination addDestination = new AddDestination();

            if (addDestination.ShowDialog() == DialogResult.OK)
            {
                Airport airport = lbAirports.SelectedItem as Airport;
                airport.AddDestination(addDestination.Destination);
                loadDestinations();
            }
        }
예제 #3
0
        private void btnAddDestination_Click(object sender, EventArgs e)
        {
            AddDestination form = new AddDestination();

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Airport airport = lbAirports.SelectedItem as Airport;
                airport.AddDestination(form.Destination);
                loadDestinations();
            }
        }
예제 #4
0
파일: Airports.cs 프로젝트: brsjak/VP-2015
 private void btnAddDestination_Click(object sender, EventArgs e)
 {
     if (btnAddDestination.Enabled)
     {
         AddDestination ad  = new AddDestination();
         DialogResult   res = ad.ShowDialog();
         if (res == DialogResult.OK)
         {
             Airport a = lstAirports.SelectedItem as Airport;
             a.AddDestination(ad.Destination);
             loadDestinations();
         }
     }
 }