From 42dc1d36235292786322d28340a81c6cb3fd46c0 Mon Sep 17 00:00:00 2001 From: hurter Date: Wed, 31 Aug 2011 16:25:05 +0000 Subject: --- Data/AppDatabase.cs | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Data/AppDatabase.cs (limited to 'Data/AppDatabase.cs') diff --git a/Data/AppDatabase.cs b/Data/AppDatabase.cs new file mode 100644 index 0000000..f3897b2 --- /dev/null +++ b/Data/AppDatabase.cs @@ -0,0 +1,79 @@ +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 + } +} -- cgit v1.1