public MainWindow()
        {
            InitializeComponent();
            _imageRunway = new Image();

            _worker = new BackgroundWorker()
            {
                WorkerSupportsCancellation = true
            };
            _worker.DoWork += BackgroundWorkerDoWork;

            _fpsList = new List <int>();


            var bindings = new Bindings();

            using (IKernel kernel = new StandardKernel(bindings))
            {
                SimProperties = kernel.Get <ISimulationProperties>();
                SimProperties.SimulationSpeed       = 1;
                SimProperties.InstructionsPerMinute = 10;

                var canvas = new Ninject.Parameters.ConstructorArgument("canvas", CanvasDraw);
                SimController = kernel.Get <ISimulationController>();
                kernel.Get <IDrawController>(canvas);
                _weatherController = kernel.Get <IWeatherController>();
            }

            SimController.AirplaneManager.Collision += (o, e) => OnCollision();

            Loaded      += MainWindow_Loaded;
            SizeChanged += Image_Runway_Loaded;
            SimController.FlightDirector.AircraftLanded += FlightDirector_AircraftLanded;
        }
Beispiel #2
0
 public WeatherModule(IWeatherController controller)
 {
     Get("/", _ => controller.GetAllCities());
     Get("/{city}", p => controller.GetCity(p.city));
     Post("/", p =>
     {
         var city = this.Bind <City>();
         return(controller.AddCity(city));
     });
 }
Beispiel #3
0
 public WeatherBootstrap(IWeatherController controller)
 {
     _controller = controller;
 }
 public UpdateTrigger(IWeatherController weatherController, IWeatherDisplayer weatherDisplayer, ILogger logger)
 {
     _weatherController = weatherController;
     _weatherDisplayer  = weatherDisplayer;
     _logger            = logger;
 }
Beispiel #5
0
 public Router(IWeatherController weathercontroller)
 {
     _weatherController = weathercontroller;
 }