blob: f3897b22ddf849fc41a20e83306beecce9c501d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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
}
}
|