using System; using System.Collections.Generic; using System.Linq; using System.Text; using IvyBus; namespace Data { public class AppDatabase { private AircraftsList listOfAircrafts; private Beacon[] listOfBeacons; private Route[] listOfRoutes; private Sector[] listOfSectors; private Horloge horloge; #region Constructor public AppDatabase(IvyControl IvyBus) { this.listOfAircrafts = new AircraftsList(IvyBus); this.listOfBeacons = Beacon.LoadBeaconsFile(@Config.beaconsXmlFilePath); this.listOfRoutes = Route.LoadRoutesFile(@Config.routesXmlFilePath, this); this.listOfSectors = Sector.LoadSectorsFile(@Config.sectorsXmlFilePath); this.horloge = new Horloge(IvyBus); } #endregion #region Getter public Sector[] getSectors() { return listOfSectors; } public Route[] getRoutes() { return listOfRoutes; } public Beacon[] getBeacons() { return listOfBeacons; } public int getHour() { return horloge.getHour(); } public int getMinute() { return horloge.getMinute(); } public int getSecond() { return horloge.getSecond(); } public Dictionary> getAircraftList() { return listOfAircrafts.getAircraftList(); } #endregion #region AddViewFuntions public void addAircraftView(IAircraftView view) { listOfAircrafts.addAircraftView(view); } public void removeAircraftView(IAircraftView view) { listOfAircrafts.removeAircraftView(view); } #endregion } }