mv spsmodel and placemodel

This commit is contained in:
stubbfel
2013-10-22 13:52:09 +02:00
parent e556017dc8
commit 0633317ad2
23 changed files with 77 additions and 227 deletions

View File

@@ -9,10 +9,10 @@
namespace CampusAppWP8.Api.GeoApi
{
using System;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Class for SPSAPI. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
@@ -67,7 +67,7 @@ namespace CampusAppWP8.Api.GeoApi
}
CampusAppWPortalLib8.Model.Settings.Campus campus;
foreach (PlaceWp8Model place in this.Model.Places)
foreach (PlaceModel place in this.Model.Places)
{
if (Enum.TryParse(place.PlaceId, true, out campus))
{

View File

@@ -10,15 +10,15 @@ namespace CampusAppWP8.Api.GeoApi
{
using System.Collections.Generic;
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Pis api. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.GeoDb.SpsModel}"/>
public class PisApi : XmlModel<SpsWp8Model>
public class PisApi : XmlModel<SpsModel>
{
#region Constructor

View File

@@ -10,15 +10,15 @@ namespace CampusAppWP8.Api.GeoApi
{
using System.Collections.Generic;
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Pss api. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.GeoDb.SpsModel}"/>
public class PssApi : XmlModel<SpsWp8Model>
public class PssApi : XmlModel<SpsModel>
{
#region Constructor

View File

@@ -10,16 +10,16 @@ namespace CampusAppWP8.Api.GeoApi
{
using System.Collections.Generic;
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Class for SPSAPI. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.GeoDb.SpsModel}"/>
public class SpsApi : XmlModel<SpsWp8Model>
public class SpsApi : XmlModel<SpsModel>
{
#region Constructor

View File

@@ -118,7 +118,6 @@
<Compile Include="Model\Campusmap\Maps\CBMainMapModel.cs" />
<Compile Include="Model\Campusmap\Pins\ClickAblePlacePinModel.cs" />
<Compile Include="Model\Campusmap\Pins\CurrentPositionPinModel.cs" />
<Compile Include="Model\Campusmap\Pins\HiddenPinPlaceModel.cs" />
<Compile Include="Model\Campusmap\Pins\InfoPlacePinModel.cs" />
<Compile Include="Model\Campusmap\Pins\InfoLabPlacePinModel.cs" />
<Compile Include="Model\Campusmap\Pins\InfoPlaceRedPinModel.cs" />
@@ -127,10 +126,6 @@
<Compile Include="Model\Campusmap\Pins\SearchPlacePinModel.cs" />
<Compile Include="Model\Exams\ExamListWp8Model.cs" />
<Compile Include="Model\Exams\ExamWp8Model.cs" />
<Compile Include="Model\GeoDb\CampusBuildingLayerWp8Model.cs" />
<Compile Include="Model\GeoDb\CampusBuildingWp8Model.cs" />
<Compile Include="Model\GeoDb\PlaceWp8Model.cs" />
<Compile Include="Model\GeoDb\SpsWp8Model.cs" />
<Compile Include="Model\Person\PersonFunctionWp8Model.cs" />
<Compile Include="Model\Person\PersonListWp8Model.cs" />
<Compile Include="Model\Person\PersonWp8Model.cs" />

View File

@@ -10,7 +10,7 @@
<placeInformation placeInformationName="ImageHeight">800</placeInformation>
<placeInformation placeInformationName="MapImageOffsetX">-288</placeInformation>
<placeInformation placeInformationName="MapImageOffsetY">-390</placeInformation>
<placeInformation placeInformationName="MapRefPoint">Point(410, 480)</placeInformation>
<placeInformation placeInformationName="MapRefPoint">Point(430, 500)</placeInformation>
<placeInformation placeInformationName="ScaleX">650000</placeInformation>
<placeInformation placeInformationName="ScaleY">1200000</placeInformation>
</place>
@@ -24,7 +24,7 @@
<placeInformation placeInformationName="ImageHeight">800</placeInformation>
<placeInformation placeInformationName="MapImageOffsetX">-252</placeInformation>
<placeInformation placeInformationName="MapImageOffsetY">-390</placeInformation>
<placeInformation placeInformationName="MapRefPoint">Point(215, 355)</placeInformation>
<placeInformation placeInformationName="MapRefPoint">Point(235, 380)</placeInformation>
<placeInformation placeInformationName="ScaleX">300000</placeInformation>
<placeInformation placeInformationName="ScaleY">500000</placeInformation>
</place>

View File

@@ -9,14 +9,14 @@
namespace CampusAppWP8.File.Places
{
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.GeoDb;
using CampusAppWPortalLib8.Utility;
/// <summary> Places file. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.GeoDb.SpsModel}"/>
public class PlacesFile : XmlModel<SpsWp8Model>
public class PlacesFile : XmlModel<SpsModel>
{
#region Constructor
@@ -39,7 +39,7 @@ namespace CampusAppWP8.File.Places
/// <param name="model"> The model. </param>
/// <param name="fileInfo"> Information describing the file. </param>
/// <returns> true if it succeeds, false if it fails. </returns>
private bool CheckIsFileUpToDate(SpsWp8Model model, System.IO.FileInfo fileInfo)
private bool CheckIsFileUpToDate(SpsModel model, System.IO.FileInfo fileInfo)
{
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1 || (model != null && model.HasChanged))
{
@@ -53,7 +53,7 @@ namespace CampusAppWP8.File.Places
/// <remarks> Stubbfel, 14.10.2013. </remarks>
public void FallBackLoad()
{
SpsWp8Model fallBackModel = XmlManager.DeserializationFileToModel<SpsWp8Model>(Constants.FileMap_OfflineMap);
SpsModel fallBackModel = XmlManager.DeserializationFileToModel<SpsModel>(Constants.FileMap_OfflineMap);
this.Model = fallBackModel;
this.SaveData();
}

View File

@@ -10,10 +10,10 @@ namespace CampusAppWP8.Model.Campusmap.Map
{
using System.Globalization;
using System.Linq;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Utility;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> A data Model for the building map. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
@@ -25,8 +25,8 @@ namespace CampusAppWP8.Model.Campusmap.Map
/// <param name="id"> The identifier. </param>
public BuildingMapModel(string id)
{
SpsWp8Model buildings = XmlManager.DeserializationFileToModel<SpsWp8Model>(Constants.FileMap_BuildingsMap);
PlaceWp8Model building = buildings.GetPlaceById(id);
SpsModel buildings = XmlManager.DeserializationFileToModel<SpsModel>(Constants.FileMap_BuildingsMap);
PlaceModel building = buildings.GetPlaceById(id);
if (buildings == null)
{
return;

View File

@@ -9,9 +9,9 @@
namespace CampusAppWP8.Model.Campusmap.Map
{
using System.Collections.Generic;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Class for the MapModel of the mainCampus of cottbus. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
@@ -30,15 +30,15 @@ namespace CampusAppWP8.Model.Campusmap.Map
/// <summary> Initializes a new instance of the <see cref="CBMainMapModel" /> class. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <param name="placeList"> List of places. </param>
public CBMainMapModel(List<PlaceWp8Model> placeList)
public CBMainMapModel(List<PlaceModel> placeList)
: base(placeList, CBMainMapModel.Campus)
{
this.ImageSource = Constants.FileMap_CBMainMap;
this.ImageWidth = 2000;
this.ImageHeight = 1425;
this.MapImageOffsetPoint = new MapPoint(-228, -300);
this.RefPoint = new MapPoint(1335, 775);
this.ScalePoint = new MapPoint(129483.4123222749, 197648.8919266073);
this.RefPoint = new MapPoint(1365, 800);
this.ScalePoint = new MapPoint(129483, 197648);
this.GeoOffsetPoint = new MapPoint(14.327159, 51.766548);
}

View File

@@ -9,7 +9,7 @@
namespace CampusAppWP8.Model.Campusmap.Map
{
using System.Collections.Generic;
using CampusAppWP8.Model.GeoDb;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Class for the CampusMapModel. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
@@ -22,7 +22,7 @@ namespace CampusAppWP8.Model.Campusmap.Map
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <param name="placeList"> list of places. </param>
/// <param name="campusId"> id of the campus. </param>
public CampusMapModel(List<PlaceWp8Model> placeList, string campusId)
public CampusMapModel(List<PlaceModel> placeList, string campusId)
{
this.CampusId = campusId;
this.LoadSpatials(placeList);
@@ -50,12 +50,12 @@ namespace CampusAppWP8.Model.Campusmap.Map
/// <summary> Loads the spatial./. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <seealso cref="M:CampusAppWP8.Model.Campusmap.MapModel.LoadSpatials(List{PlaceModel})"/>
protected override void LoadSpatials(List<PlaceWp8Model> placeList)
protected override void LoadSpatials(List<PlaceModel> placeList)
{
List<PlaceWp8Model> campusPlaces = new List<PlaceWp8Model>();
this.Spatial = new SpsWp8Model();
List<PlaceModel> campusPlaces = new List<PlaceModel>();
this.Spatial = new SpsModel();
foreach (PlaceWp8Model place in placeList)
foreach (PlaceModel place in placeList)
{
if (place.ParentId.Equals(this.CampusId) || place.PlaceId.Equals(this.CampusId))
{

View File

@@ -14,14 +14,14 @@ namespace CampusAppWP8.Model.Campusmap.Map
using System.Windows.Input;
using System.Windows.Media.Imaging;
using CampusAppWP8.Model.Campusmap.Pin;
using CampusAppWP8.Model.GeoDb;
using CampusAppWPortalLib8.Model.Campusmap.Pin;
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> This Class manage the properties of a Map. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Campusmap.Map.MapModel{CampusAppWP8.Model.GeoDb.SpsWp8Model,CampusAppWP8.Model.GeoDb.PlaceWp8Model}"/>
public class MapWp8Model : CampusAppWPortalLib8.Model.Campusmap.Map.MapModel<SpsWp8Model, PlaceWp8Model, Image>
public class MapWp8Model : CampusAppWPortalLib8.Model.Campusmap.Map.MapModel<Image>
{
#region Constructors
@@ -35,7 +35,7 @@ namespace CampusAppWP8.Model.Campusmap.Map
/// <summary> Initializes a new instance of the <see cref="MapWp8Model" /> class. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <param name="placeList"> list of places. </param>
public MapWp8Model(List<PlaceWp8Model> placeList)
public MapWp8Model(List<PlaceModel> placeList)
{
this.IsReady = false;
this.LoadSpatials(placeList);
@@ -49,7 +49,7 @@ namespace CampusAppWP8.Model.Campusmap.Map
/// <summary> Delegate for MapInfo. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <param name="places"> list of places. </param>
public delegate void MapInfos(List<PlaceWp8Model> places);
public delegate void MapInfos(List<PlaceModel> places);
/// <summary> Event ShowMapInfo. </summary>
public event MapInfos ShowMapInfos = null;
@@ -66,11 +66,11 @@ namespace CampusAppWP8.Model.Campusmap.Map
/// <param name="type"> The type. </param>
/// <param name="places"> (Optional) list of places. </param>
/// <returns> image of the pin. </returns>
public override Image AddPin(MapPoint position, PinType type, List<PlaceWp8Model> places = null)
public override Image AddPin(MapPoint position, PinType type, List<PlaceModel> places = null)
{
Image pinImg = new Image();
MapPinModel pin = this.CreatePin(type, places, pinImg);
pin.Position = position;
pin.Position = position ;
if (pin.ImageSource != null)
{
pinImg.Source = new BitmapImage(new Uri(pin.ImageSource, UriKind.Relative));
@@ -94,7 +94,7 @@ namespace CampusAppWP8.Model.Campusmap.Map
/// <param name="places"> list of places. </param>
/// <param name="pinImg"> image of the pin. </param>
/// <returns> The new pin. </returns>
private MapPinModel CreatePin(PinType type, List<PlaceWp8Model> places, Image pinImg)
private MapPinModel CreatePin(PinType type, List<PlaceModel> places, Image pinImg)
{
MapPinModel pin;
switch (type)

View File

@@ -8,15 +8,13 @@
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Campusmap.Pin
{
using System.Collections.Generic;
using CampusAppWP8.Model.Campusmap.Map;
using CampusAppWP8.Model.GeoDb;
using CampusAppWPortalLib8.Model.Campusmap.Pin;
using CampusAppWPortalLib8.Model.Campusmap.Pin;
/// <summary> abstract class for click abel bins. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.MapPinModel"/>
public abstract class ClickAblePlacePinModel : MapPinModel
public abstract class ClickAblePlacePinModel : AssocPlacesPin
{
#region property
@@ -24,10 +22,6 @@ namespace CampusAppWP8.Model.Campusmap.Pin
/// <value> The call back. </value>
public MapWp8Model.MapInfos CallBack { get; set; }
/// <summary> Gets or sets place which are associative with this pin. </summary>
/// <value> The associated places. </value>
public List<PlaceWp8Model> AssocPlaces { get; set; }
#endregion
#region Method

View File

@@ -1,17 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="CampusBuildingLayerWp8Model.cs" company="BTU/IIT">
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>Stubbfel</author>
// <date>21.10.2013</date>
// <summary>Implements the campus building layer wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
/// <summary> A data Model for the campus building layer wp 8. </summary>
/// <remarks> Stubbfel, 21.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.GeoDb.CampusBuildingLayerModel{CampusAppWP8.Model.GeoDb.PlaceWp8Model}"/>
public class CampusBuildingLayerWp8Model : CampusAppWPortalLib8.Model.GeoDb.CampusBuildingLayerModel<PlaceWp8Model>
{
}
}

View File

@@ -1,27 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="CampusBuildingWp8Model.cs" company="BTU/IIT">
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>Stubbfel</author>
// <date>21.10.2013</date>
// <summary>Implements the campus building model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System.Collections.Generic;
/// <summary> A data Model for the campus building. </summary>
/// <remarks> Stubbfel, 21.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.GeoDb.CampusBuildingModel{CampusAppWP8.Model.GeoDb.CampusBuildingLayerWp8Model,CampusAppWP8.Model.GeoDb.PlaceWp8Model}"/>
public class CampusBuildingWp8Model : CampusAppWPortalLib8.Model.GeoDb.CampusBuildingModel<CampusBuildingLayerWp8Model, PlaceWp8Model>
{
/// <summary> Initializes a new instance of the CampusBuildingWp8Model class. </summary>
/// <remarks> Stubbfel, 21.10.2013. </remarks>
/// <param name="buildingId"> Identifier for the building. </param>
/// <param name="places"> The places. </param>
public CampusBuildingWp8Model(string buildingId, List<PlaceWp8Model> places)
: base(buildingId, places)
{
}
}
}

View File

@@ -1,63 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceWp8Model.cs" company="BTU/IIT">
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>Stubbfel</author>
// <date>21.10.2013</date>
// <summary>Implements the place wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System;
using System.Device.Location;
using System.Globalization;
using System.Text.RegularExpressions;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Utility;
using CampusAppWPortalLib8.Model.Utility;
/// <summary> Model for a place of the SPSService. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.GeoDb.PlaceModel"/>
/// <seealso cref="T:System.IEquatable{CampusAppWP8.Model.GeoDb.PlaceModel}"/>
public class PlaceWp8Model : CampusAppWPortalLib8.Model.GeoDb.PlaceModel
{
#region Property
/// <summary> Gets the geo reference point. </summary>
/// <value> The geo reference point. </value>
public GeoMapPoint GeoRefPoint
{
get
{
string refstring = this.RefPoint;
Regex rx = new Regex(Constants.Regex_Coordinate);
MatchCollection matches = rx.Matches(refstring);
if (matches.Count != 1)
{
return null;
}
string[] values = matches[0].ToString().Split(' ');
if (values.Length != 2)
{
return null;
}
// create the GeoCoordirate
try
{
return new GeoMapPoint(double.Parse(values[1], CultureInfo.InvariantCulture), double.Parse(values[0], CultureInfo.InvariantCulture),0);
}
catch (Exception ex)
{
Logger.LogException(ex);
return null;
}
}
}
#endregion
}
}

View File

@@ -1,20 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="SpsWp8Model.cs" company="BTU/IIT">
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>Stubbfel</author>
// <date>21.10.2013</date>
// <summary>Implements the sps wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System.Xml.Serialization;
/// <summary> A data Model for the sps wp 8. </summary>
/// <remarks> Stubbfel, 21.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.GeoDb.SpsModel{CampusAppWP8.Model.GeoDb.PlaceWp8Model}"/>
[XmlRoot("root")]
public class SpsWp8Model : CampusAppWPortalLib8.Model.GeoDb.SpsModel<PlaceWp8Model>
{
}
}

View File

@@ -21,7 +21,6 @@ namespace CampusAppWP8.Pages.Campusmap
using System.Windows.Navigation;
using CampusAppWP8.File.Places;
using CampusAppWP8.Model.Campusmap.Map;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWP8.Utility.Lui.MessageBoxes;
@@ -31,6 +30,7 @@ namespace CampusAppWP8.Pages.Campusmap
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Windows.Networking.Proximity;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Class for the campusMap page. </summary>
/// <remarks> Stubbfel, 19.08.2013. </remarks>
@@ -140,7 +140,7 @@ namespace CampusAppWP8.Pages.Campusmap
scroll = false;
if (Utilities.IsRoomId(alias))
{
PlaceWp8Model place = this.file.Model.GetPlaceById(alias);
PlaceModel place = this.file.Model.GetPlaceById(alias);
if (place != null)
{
this.GoToRoomList(place.ParentId, place.PlaceId);
@@ -161,7 +161,7 @@ namespace CampusAppWP8.Pages.Campusmap
App.SaveToIsolatedStorage<string>(Constants.CampusMapApp_QRCodeSearchResultStorageKey, null);
string searchPid = Wp8StringManager.FilterPlaceIdinQRResultString(qrcodeResult);
PlaceWp8Model place = this.file.Model.GetPlaceById(searchPid);
PlaceModel place = this.file.Model.GetPlaceById(searchPid);
if (searchPid != null)
{
@@ -431,9 +431,9 @@ namespace CampusAppWP8.Pages.Campusmap
return;
}
List<PlaceWp8Model> placeList = new List<PlaceWp8Model>();
PlaceWp8Model tmpPlace;
SpsWp8Model spatial;
List<PlaceModel> placeList = new List<PlaceModel>();
PlaceModel tmpPlace;
SpsModel spatial;
if (allPlaces)
{
spatial = this.file.Model;
@@ -500,7 +500,7 @@ namespace CampusAppWP8.Pages.Campusmap
// search for placeId
string nfcContent = ndef.GetContent();
string searchPid = Wp8StringManager.FilterPlaceIdinNFCResultString(nfcContent.Trim());
PlaceWp8Model place = this.file.Model.GetPlaceById(searchPid);
PlaceModel place = this.file.Model.GetPlaceById(searchPid);
if (searchPid != null)
{
@@ -561,9 +561,9 @@ namespace CampusAppWP8.Pages.Campusmap
/// (optional) if its true, search places in place file, otherwise in CampusMapModel.
/// </param>
/// <returns> The found places. </returns>
private List<PlaceWp8Model> SearchPlaces(string query, bool allPlaces = false)
private List<PlaceModel> SearchPlaces(string query, bool allPlaces = false)
{
SpsWp8Model spatial;
SpsModel spatial;
if (allPlaces)
{
spatial = this.file.Model;
@@ -576,7 +576,7 @@ namespace CampusAppWP8.Pages.Campusmap
// if query is an id
if (Wp8StringManager.IsDigitsOnly(query))
{
return new List<PlaceWp8Model>() { spatial.GetPlaceById(query) };
return new List<PlaceModel>() { spatial.GetPlaceById(query) };
}
if (this.informationsNames == null)
@@ -595,9 +595,9 @@ namespace CampusAppWP8.Pages.Campusmap
/// <param name="places"> The places. </param>
/// <param name="type"> The type. </param>
/// <param name="scroll"> (Optional) the scroll. </param>
private void AddPins(List<PlaceWp8Model> places,PinType type, bool scroll = true)
private void AddPins(List<PlaceModel> places,PinType type, bool scroll = true)
{
foreach (PlaceWp8Model place in places)
foreach (PlaceModel place in places)
{
if (place == null)
{
@@ -607,7 +607,7 @@ namespace CampusAppWP8.Pages.Campusmap
GeoMapPoint coor = place.GeoRefPoint;
if (coor != null)
{
List<PlaceWp8Model> assocPlaces = new List<PlaceWp8Model>();
List<PlaceModel> assocPlaces = new List<PlaceModel>();
assocPlaces.Add(place);
this.AddPin(coor.Longitude, coor.Latitude, type, scroll, assocPlaces);
}
@@ -623,7 +623,7 @@ namespace CampusAppWP8.Pages.Campusmap
/// <param name="assocPlaces">
/// (Optional) List of places, whose are associative with the pin.
/// </param>
private void AddPin(double x, double y, PinType type, bool scroll = true, List<PlaceWp8Model> assocPlaces = null)
private void AddPin(double x, double y, PinType type, bool scroll = true, List<PlaceModel> assocPlaces = null)
{
MapPoint scrollPoint = this.campusMap.GetScrollPoint(this.campusMap.ConverToPixelPoint(this.campusMap.ConverToMapPoint(x, y)));
MapCanvas.Children.Add(this.campusMap.AddPinFromRefPoint(this.campusMap.ConverToPixelPoint(this.campusMap.ConverToMapPoint(x, y)), type, assocPlaces));
@@ -741,7 +741,7 @@ namespace CampusAppWP8.Pages.Campusmap
/// <summary> Method show same PlaceInformation. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="places"> List of places. </param>
private void ShowMapInfo(List<PlaceWp8Model> places)
private void ShowMapInfo(List<PlaceModel> places)
{
if (places == null)
{
@@ -749,7 +749,7 @@ namespace CampusAppWP8.Pages.Campusmap
}
string msgText = string.Empty;
foreach (PlaceWp8Model place in places)
foreach (PlaceModel place in places)
{
msgText += AppResources.PlaceLabel_Name + ": ";
msgText += place.GetInformationsValue(Constants.PisInformationName_Name);
@@ -782,7 +782,7 @@ namespace CampusAppWP8.Pages.Campusmap
MessageBoxes.ShowMainModelInfoMessageBox(msgText);
foreach (PlaceWp8Model place in places)
foreach (PlaceModel place in places)
{
if (place.ParentId.Equals(this.campusMap.CampusId) && this.HasRooms(place.PlaceId))
{
@@ -821,7 +821,7 @@ namespace CampusAppWP8.Pages.Campusmap
/// <returns> true, if the place has got rooms, otherwise false. </returns>
private bool HasRooms(string placeId)
{
foreach (PlaceWp8Model place in this.file.Model.Places)
foreach (PlaceModel place in this.file.Model.Places)
{
if (place.ParentId.Equals(placeId))
{

View File

@@ -17,13 +17,13 @@ namespace CampusAppWP8.Pages.Campusmap
using System.Windows.Navigation;
using CampusAppWP8.File.Places;
using CampusAppWP8.Model.Campusmap.Map;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWP8.Utility.Lui.MessageBoxes;
using CampusAppWPortalLib8.Model.Campusmap.Pin;
using CampusAppWPortalLib8.Model.Utility;
using Microsoft.Phone.Controls;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Class of the RoomListPage. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
@@ -35,7 +35,7 @@ namespace CampusAppWP8.Pages.Campusmap
private PlacesFile placeFile;
/// <summary> Variable of building which is shown in the list. </summary>
private CampusBuildingWp8Model building;
private CampusBuildingModel building;
/// <summary> Variable for the map model. </summary>
private BuildingMapModel buildingMap;
@@ -150,20 +150,20 @@ namespace CampusAppWP8.Pages.Campusmap
this.ClearMap(new List<string>() { MapPinModel.InfoPlacePinString });
PlaceWp8Model room = this.building.GetPlaceById(placeId);
PlaceModel room = this.building.GetPlaceById(placeId);
x = room.GeoRefPoint.Longitude;
y = room.GeoRefPoint.Latitude;
MapPoint roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
MapPoint viewPoint = roompoint - this.mappoint + this.offsetPoint;
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, PinType.InfoRedPlace, new List<PlaceWp8Model> { room }));
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, PinType.InfoRedPlace, new List<PlaceModel> { room }));
}
/// <summary> Shows the map information. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>
/// <param name="places"> The places. </param>
private void ShowMapInfo(List<PlaceWp8Model> places)
private void ShowMapInfo(List<PlaceModel> places)
{
if (this.pinchRun)
{
@@ -176,7 +176,7 @@ namespace CampusAppWP8.Pages.Campusmap
return;
}
foreach (PlaceWp8Model place in places)
foreach (PlaceModel place in places)
{
msgText += AppResources.PlaceLabel_Name + ": ";
msgText += place.GetInformationsValue(Constants.PisInformationName_Name);
@@ -289,13 +289,13 @@ namespace CampusAppWP8.Pages.Campusmap
layerKey = this.building.Layers.Keys.First();
}
CampusBuildingLayerWp8Model layer = this.building.Layers[layerKey];
CampusBuildingLayerModel layer = this.building.Layers[layerKey];
double x;
double y;
this.ClearMap(new List<string>() { MapPinModel.InfoPlacePinString });
foreach (PlaceWp8Model room in layer.Rooms.Places)
foreach (PlaceModel room in layer.Rooms.Places)
{
x = room.GeoRefPoint.Longitude;
y = room.GeoRefPoint.Latitude;
@@ -322,7 +322,7 @@ namespace CampusAppWP8.Pages.Campusmap
break;
}
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, type, new List<PlaceWp8Model> { room }));
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, type, new List<PlaceModel> { room }));
}
// MapCanvas.Children.Add(this.buildingMap.AddPin(offsetPoint, MapPinModel.PinType.SearchPlace));
@@ -342,7 +342,7 @@ namespace CampusAppWP8.Pages.Campusmap
/// <param name="buildingId"> Identifier for the building. </param>
private void SetupCanvas(string buildingId)
{
this.building = new CampusBuildingWp8Model(buildingId, this.placeFile.Model.Places.ToList());
this.building = new CampusBuildingModel(buildingId, this.placeFile.Model.Places.ToList());
this.buildingMap = new BuildingMapModel(this.building.Building.PlaceId);
this.buildingMap.ShowMapInfos += new CBMainMapModel.MapInfos(this.ShowMapInfo);

View File

@@ -15,10 +15,10 @@ namespace CampusAppWP8.Pages.Dev
using System.Windows;
using System.Windows.Navigation;
using CampusAppWP8.File.Places;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Utility.NDEF;
using Microsoft.Phone.Controls;
using Windows.Networking.Proximity;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Nfc page. </summary>
/// <remarks> Stubbfel, 22.08.2013. </remarks>
@@ -85,7 +85,7 @@ namespace CampusAppWP8.Pages.Dev
this.ndefList = new List<NDEFMessage>();
// MapModel map = new CBMainMapModel(this.file.Model.Places.ToList());
foreach (PlaceWp8Model place in this.file.Model.Places.ToList())
foreach (PlaceModel place in this.file.Model.Places.ToList())
{
this.ndefList.Add(new NDEFMessage(place.ToNfcString(), NDEFMessage.TYPEVAL.TEXT));
}

View File

@@ -18,13 +18,13 @@ namespace CampusAppWP8.Pages.PlaceNews
using System.Windows.Navigation;
using CampusAppWP8.Api.GeoApi;
using CampusAppWP8.File.Places;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWP8.Utility.Lui.MessageBoxes;
using CampusAppWP8.Utility.NDEF;
using Microsoft.Phone.Controls;
using Windows.Networking.Proximity;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Place news. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
@@ -90,7 +90,7 @@ namespace CampusAppWP8.Pages.PlaceNews
if (this.places == null)
{
this.places = new PlacesFile();
this.places.Model = App.LoadFromIsolatedStorage<SpsWp8Model>(Constants.IsolatedStorage_AllPlaces);
this.places.Model = App.LoadFromIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces);
}
if (this.qrScan)
@@ -131,7 +131,7 @@ namespace CampusAppWP8.Pages.PlaceNews
{
if (NavigationMode.Back == e.NavigationMode)
{
App.SaveToIsolatedStorage<SpsWp8Model>(Constants.IsolatedStorage_AllPlaces, null);
App.SaveToIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces, null);
}
}
@@ -199,7 +199,7 @@ namespace CampusAppWP8.Pages.PlaceNews
/// <remarks> Stubbfel, 09.09.2013. </remarks>
private void PlacesFileIsFail()
{
this.places.Model = new SpsWp8Model();
this.places.Model = new SpsModel();
if (this.spsApi == null)
{
this.spsApi = new SpsApi();
@@ -328,7 +328,7 @@ namespace CampusAppWP8.Pages.PlaceNews
this.ResultBox.ItemsSource = this.places.Model.FilterByPid(this.searchPidList);
this.ProgressBar.Visibility = Visibility.Collapsed;
this.places.SaveData();
App.SaveToIsolatedStorage<SpsWp8Model>(Constants.IsolatedStorage_AllPlaces, this.places.Model);
App.SaveToIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces, this.places.Model);
this.forceRequest = false;
}
@@ -412,7 +412,7 @@ namespace CampusAppWP8.Pages.PlaceNews
return;
}
PlaceWp8Model place = this.places.Model.GetPlaceById(placeID);
PlaceModel place = this.places.Model.GetPlaceById(placeID);
txt.Text = place.GetInformationsValue(Constants.PisInformationName_Name);
}

View File

@@ -10,9 +10,9 @@ namespace CampusAppWP8.Pages.PlaceNews
{
using System;
using System.Windows.Navigation;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using Microsoft.Phone.Controls;
using CampusAppWPortalLib8.Model.GeoDb;
/// <summary> Show pad. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
@@ -39,9 +39,9 @@ namespace CampusAppWP8.Pages.PlaceNews
{
if (NavigationContext.QueryString.ContainsKey(Constants.ParamPlaceID))
{
SpsWp8Model model = App.LoadFromIsolatedStorage<SpsWp8Model>(Constants.IsolatedStorage_AllPlaces);
SpsModel model = App.LoadFromIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces);
string placeId = NavigationContext.QueryString[Constants.ParamPlaceID];
PlaceWp8Model place = model.GetPlaceById(placeId);
PlaceModel place = model.GetPlaceById(placeId);
if (place != null && place.Services != null && place.Services.Count > 0 && place.Informations != null && place.Informations.Count > 0)
{
this.Room.Text += " - " + place.Informations[0].InformationValue;

View File

@@ -366,9 +366,6 @@
<data name="PathCampusmap_Campusmap" xml:space="preserve">
<value>/Pages/Campusmap/CampusMapPage.xaml</value>
</data>
<data name="Regex_Coordinate" xml:space="preserve">
<value>[+-]{0,1}[0-9]+[.,]{0,1}[0-9]+[\s][+-]{0,1}[0-9]+[.,]{0,1}[0-9]+</value>
</data>
<data name="FileMap_OfflineMap" xml:space="preserve">
<value>File/Campusmap/Offlinemap.xml</value>
</data>

View File

@@ -1176,15 +1176,6 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die [+-]{0,1}[0-9]+[.,]{0,1}[0-9]+[\s][+-]{0,1}[0-9]+[.,]{0,1}[0-9]+ ähnelt.
/// </summary>
public static string Regex_Coordinate {
get {
return ResourceManager.GetString("Regex_Coordinate", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die 767 ähnelt.
/// </summary>