示例#1
0
        private void btnCreateFlights_Click(object sender, EventArgs e)
        {
            FlightFactory test = new FlightFactory();

            test.CreateFlights();
            List <Flight> t = test.GetFlights();

            foreach (Flight i in t)
            {
                string flight = i.ToString();
                listBox1.Items.Add(flight);
            }
        }
示例#2
0
 /// <summary>
 /// btnCreateFlights click event handler. Uses a FlightFactory object to creates flights,
 /// and then create a flights.xml using the flights created.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnCreateFlights_Click(object sender, EventArgs e)
 {
     temp.CreateFlights();
     temp.Serialize();
 }