From b075e5bb7e93ef818a2946f4c7e3f5fddf861775 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 24 Sep 2013 10:19:20 +0200 Subject: [PATCH] straro --- CampusAppWP8/CampusAppWP8/App.xaml.cs | 2 +- .../Model/Campusmap/CBMainMapModel.cs | 32 ++----------------- .../Pages/Campusmap/CampusMapPage.xaml.cs | 19 +++++++++++ 3 files changed, 22 insertions(+), 31 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/App.xaml.cs b/CampusAppWP8/CampusAppWP8/App.xaml.cs index 65a2fc88..38650185 100644 --- a/CampusAppWP8/CampusAppWP8/App.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/App.xaml.cs @@ -147,7 +147,7 @@ namespace CampusAppWP8 } else { - Settings.AppSetting.DevMode = false; + Settings.AppSetting.DevMode = true; } this.UserSettingsLoaded(); diff --git a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs index 95552f47..a0d6976c 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Campusmap/CBMainMapModel.cs @@ -22,11 +22,6 @@ namespace CampusAppWP8.Model.Campusmap /// Variable for the identify of the campus. private static readonly string Campus = ((int)CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_MAIN).ToString(); - /// - /// Variable for the PlaceFile - /// - private PlacesFile file; - #endregion #region Constructor @@ -57,31 +52,8 @@ namespace CampusAppWP8.Model.Campusmap /// Stubbfel, 19.08.2013. protected override void LoadSpatials() { - if (this.file == null) - { - this.file = new PlacesFile(); - } - - this.file.OnLoaded += new PlacesFile.OnIO(this.FileIsReady); - this.file.LoadData(); - } - - /// - /// Method is called if the PlaceFile is loaded - /// - private void FileIsReady() - { - SpsModel model = this.file.Model; - - this.Spatial = new SpsModel(); - foreach (PlaceModel place in model.Places) - { - if (place.PlaceId.StartsWith(CBMainMapModel.Campus)) - { - this.Spatial.Places.Add(place); - } - } - } + + } #endregion } diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs index 5f3fe554..88447227 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs @@ -25,6 +25,7 @@ namespace CampusAppWP8.Pages.Campusmap using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; using Windows.Networking.Proximity; + using CampusAppWP8.File.Places; /// Class for the campusMap page. /// Stubbfel, 19.08.2013. @@ -38,6 +39,11 @@ namespace CampusAppWP8.Pages.Campusmap /// Variable for the map model. private CampusMapModel campusMap; + /// + /// Variable for the PlaceFile + /// + private PlacesFile file; + /// /// List of information names /// @@ -73,6 +79,14 @@ namespace CampusAppWP8.Pages.Campusmap { menuItem2.Text = AppResources.CampusMapApp_ScanNfc; } + + if (this.file == null) + { + this.file = new PlacesFile(); + } + + this.file.OnLoaded += new PlacesFile.OnIO(this.FileIsReady); + this.file.LoadData(); } #endregion @@ -129,6 +143,11 @@ namespace CampusAppWP8.Pages.Campusmap #region private + private void FileIsReady() + { + + } + /// /// Method adds pin to the map by given list of placeId ///