Exemplo n.º 1
0
 //3.  Raise Event - using the statement RaisEvent+name of the event
 public void OnSendLand(LandEventArgs e)
 {
     if (SendLandEvent != null)
     {
         SendLandEvent(this, e);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Provides event handler for the land button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLand_Click(object sender, RoutedEventArgs e)
        {
            cmbStatus.IsEnabled = false;
            btnLand.IsEnabled   = false;
            btnStart.IsEnabled  = false;
            ControlTowerWindow twc = new ControlTowerWindow();

            LandEventArgs landEventArgs = new LandEventArgs(FlightCode, NavCourse, DateTime.Now.ToString());

            OnSendLand(landEventArgs);

            this.Close();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Method handles the output for the landing
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 public void OutputLand(object source, LandEventArgs e)
 {
     lvFlights.Items.Add(new { FlightCode = e.FlightCode, Status = e.FlightStatus, Time = e.FlightTime });
 }