Exemplo n.º 1
0
 //3.  Raise Event - using the statement RaisEvent+name of the event
 public void OnSendTakeOff(TakeOffEventArgs e)
 {
     if (SendTakeOffEvent != null)
     {
         SendTakeOffEvent(this, e);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Method provides event handler for the start button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>+-
        private void btnStart_Click(object sender, RoutedEventArgs e)
        {
            cmbStatus.IsEnabled = true;
            btnLand.IsEnabled   = true;
            btnStart.IsEnabled  = false;

            TakeOffEventArgs takeOfArgs = new TakeOffEventArgs(FlightCode, NavCourse, DateTime.Now.ToString());

            OnSendTakeOff(takeOfArgs);
            MessageBox.Show("Flight No is:" + FlightCode);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Method handles the Output for the takeoff
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 public void OutputTakeOff(object source, TakeOffEventArgs e)
 {
     lvFlights.Items.Add(new { FlightCode = e.FlightCode, Status = e.FlightStatus, Time = e.FlightTime });
 }