Пример #1
0
        /// <summary>
        /// btnDisplayFlights click event handler. Creates a web browser and displays
        /// flights.xml
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDisplayFlights_Click(object sender, EventArgs e)
        {
            BrowserForm frm = new BrowserForm();

            frm.URL = "flights.xml";
            frm.ShowDialog();
        }
Пример #2
0
      private void btnSearch_Click(object sender, EventArgs e)
      {
         FlightRequest fr = new FlightRequest();
         fr = flightRequestList[lstResults.SelectedIndex];
         reservationFactory.Search(fr.DateAndTime, fr.OrigAirport, fr.DestAirport, fileMatchPath);

         BrowserForm frm = new BrowserForm();
         frm.URL = "matchingFlights.xml";
         frm.ShowDialog();
      }
Пример #3
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     if (lstbxSearchResults.SelectedIndex < 0)
     {
     }
     else
     {
         temp.findFlights(lstbxSearchResults.SelectedIndex);
         BrowserForm frm = new BrowserForm();
         frm.URL = temp.FileName;
         frm.ShowDialog();
     }
 }
Пример #4
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     if (lstbxSearchResults.SelectedIndex < 0)
     {
     }
     else
     {
         //send version to Reservation factory which will send to serialize to alter behaviour based on version
         temp.findFlights(lstbxSearchResults.SelectedIndex, version);
         BrowserForm frm = new BrowserForm();
         frm.URL = temp.FileName;
         frm.ShowDialog();
     }
 }
Пример #5
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     if (version == "1.4")
     {
         FlightRequest chosen = temp.getRequest(lstbxSearchResults.SelectedIndex);
         temp2 = new MatchFlightsFactory(chosen);
         MatchingMultiCityFlights match = new MatchingMultiCityFlights(temp2.getMatches());
         match.Show();
     }
     else
     {
         //send version to Reservation factory which will send to serialize to alter behaviour based on version
         temp.findFlights(lstbxSearchResults.SelectedIndex, version);
         BrowserForm frm = new BrowserForm();
         frm.URL = temp.FileName;
         frm.ShowDialog();
     }
 }