コード例 #1
0
ファイル: BuildingHandler.cs プロジェクト: Railec/SE1cKBS2
 /**
  * This is the constructor for the BuildingHandler.
  * It creates the internal building list and registers a callback to it.
  * All the buillding are also being loaded and placed into objects of the type building.
  */
 private BuildingHandler()
 {
     _handler = DatabaseHandler.GetInstance();
     this._buildings = new ObservableCollection<Building>();
     this._buildings.CollectionChanged += EventBuildingCollectionChanged;
     LoadBuildings();
 }
コード例 #2
0
ファイル: LocationHandler.cs プロジェクト: Railec/SE1cKBS2
 /**
  * This is the constructor for the LocationHandler.
  * It creates the internal floor list and registers a callback to it.
  */
 private LocationHandler()
 {
     this._handler = DatabaseHandler.GetInstance();
     this._locations = new ObservableCollection<Location>();
     this._locations.CollectionChanged += EventLocationCollectionChanged;
     LoadLocations();
 }
コード例 #3
0
ファイル: DatabaseHandler.cs プロジェクト: Railec/SE1cKBS2
 /**
  * <returns> This method will return the singleton's instance. </returns>
  */
 public static DatabaseHandler GetInstance()
 {
     if(_handler == null) {
         _handler = new DatabaseHandler();
     }
     return _handler;
 }