diff options
author | hurter | 2011-08-31 16:25:05 +0000 |
---|---|---|
committer | hurter | 2011-08-31 16:25:05 +0000 |
commit | 42dc1d36235292786322d28340a81c6cb3fd46c0 (patch) | |
tree | 6f4ef0d4ad672c54500d9457af90fc599ac9b299 /Data/AppDatabase.cs | |
parent | 5aa429a3e7e9f610f5b2dd8f8e2a865ecfd25ea3 (diff) | |
download | amilis-42dc1d36235292786322d28340a81c6cb3fd46c0.zip amilis-42dc1d36235292786322d28340a81c6cb3fd46c0.tar.gz amilis-42dc1d36235292786322d28340a81c6cb3fd46c0.tar.bz2 amilis-42dc1d36235292786322d28340a81c6cb3fd46c0.tar.xz |
Diffstat (limited to 'Data/AppDatabase.cs')
-rw-r--r-- | Data/AppDatabase.cs | 79 |
1 files changed, 79 insertions, 0 deletions
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<string, List<AircraftPosition>> getAircraftList()
+ {
+ return listOfAircrafts.getAircraftList();
+ }
+ #endregion
+
+ #region AddViewFuntions
+ public void addAircraftView(IAircraftView view)
+ {
+ listOfAircrafts.addAircraftView(view);
+ }
+
+ public void removeAircraftView(IAircraftView view)
+ {
+ listOfAircrafts.removeAircraftView(view);
+ }
+ #endregion
+ }
+}
|