Esempio n. 1
0
 private void btndodadiaerodrom_Click(object sender, EventArgs e)
 {
     //go povikuvame dijalogot na dodadiaerodrom
     aerodromform = new Dodadiaerodrom();
     aerodromform.Show();
     aerodromform.btnzacuvajaerodrom.Click += new EventHandler(aerodromformbtnzacuvaj_Click);
     //lbaerodromi.DisplayMember = "blbala";
     //pravime eventhandler koga kopcheto zachuvaj na dodadiaerodrom kje se klikne
 }
Esempio n. 2
0
        private void btndodadidestinacija_Click(object sender, EventArgs e)
        {
            frm          = new Form1();
            aerodromform = new Dodadiaerodrom();
            int d = 0, b = 0;

            int.TryParse(txtdolzina.Text, out d);
            int.TryParse(txtcena.Text, out b);
            Destination destination = new Destination(txtime.Text, d, b);

            foreach (Airport airport in aerodromform.AirportList)
            {
                if (frm.lbaerodromi.SelectedItem == airport)
                {
                    airport.AddDestination(destination);
                    MessageBox.Show(airport.ToString());
                }
            }
            this.Close();
        }