예제 #1
0
 //each tick the simulator will raise an airport event and the tower will get it
 //private void SimulatorTimer_Elapsed(object sender, ElapsedEventArgs e)
 //{
 //    PlaneDTO plane = Simulator.Simulate();
 //    //sending request to the tower about arrvial/departure plane:
 //    Tower.AcceptPlaneRequest(plane);
 //}
 //each tick the tower will manage the planes:
 private void TowerTimer_Elapsed(object sender, ElapsedEventArgs e)
 {
     Tower.ManageAirport(Airport);
     //raising event that the airport changed:
     AirportChanged.Invoke(this, new AirportEventArgs {
         ChangedAirport = Airport
     });
 }
예제 #2
0
 //bubble the AirportChanged event up to the WCF service,
 private void OnAirportChanged(object sender, AirportEventArgs e)
 {
     AirportChanged.Invoke(sender, e);
 }
 public void OnAirportChanged(OnAirportChangedRequest request)
 {
     AirportChanged.Invoke(this, new AirportEventArgs {
         ChangedAirport = request.ChangedAirport
     });
 }