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; }
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)); }); }
public WeatherBootstrap(IWeatherController controller) { _controller = controller; }
public UpdateTrigger(IWeatherController weatherController, IWeatherDisplayer weatherDisplayer, ILogger logger) { _weatherController = weatherController; _weatherDisplayer = weatherDisplayer; _logger = logger; }
public Router(IWeatherController weathercontroller) { _weatherController = weathercontroller; }