public AppEvents(MainWindow mainWindow, MapManager mapManager, MapPkgRepository mapPkgRepo) { // initialize gps events delegates for MainWindow this.locationChangedMainWindow = new LocationChangedDelegate(mainWindow.locationChanged); this.satellitesChangedMainWindow = new SatellitesChangedDelegate(mainWindow.satellitesChanged); // initialize gps events delegates for MapManager this.locationChangedMapManager = new LocationChangedDelegate(mapManager.newPosition); // initialize map pkg repository event delegate for MapManager this.loadingMapToMapManager = new MapPkgRepository.LoadingMap(mapManager.loadingMap); // subscribe to map pkg repository loading event mapPkgRepo.loadingMapEvent += this.loadingMapToMapManager; }