Merge branch 'release/r' into develmaster
This commit is contained in:
@@ -63,7 +63,7 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
}
|
||||
|
||||
CampusAppWPortalLib8.Model.Settings.Campus campus;
|
||||
foreach (PlaceModel place in this.Model.Places)
|
||||
foreach (PlaceWp8Model place in this.Model.Places)
|
||||
{
|
||||
if (Enum.TryParse(place.PlaceId, true, out campus))
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
/// <summary> Pis api. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.GeoDb.SpsModel}"/>
|
||||
public class PisApi : XmlModel<SpsModel>
|
||||
public class PisApi : XmlModel<SpsWp8Model>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
/// <summary> Pss api. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.GeoDb.SpsModel}"/>
|
||||
public class PssApi : XmlModel<SpsModel>
|
||||
public class PssApi : XmlModel<SpsWp8Model>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
/// <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<SpsModel>
|
||||
public class SpsApi : XmlModel<SpsWp8Model>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
|
||||
@@ -113,27 +113,24 @@
|
||||
<Compile Include="File\Exams\ExamFile.cs" />
|
||||
<Compile Include="File\Places\PlacesFile.cs" />
|
||||
<Compile Include="Model\BinaryModel.cs" />
|
||||
<Compile Include="Model\Campusmap\BuildingMapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\CampusMapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\CBMainMapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\ClickAblePlacePinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\CurrentPositionPinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\HiddenPinPlaceModel.cs" />
|
||||
<Compile Include="Model\Campusmap\InfoPlacePinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\CBMainMapRoomModel.cs" />
|
||||
<Compile Include="Model\Campusmap\InfoLabPlacePinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\InfoPlaceRedPinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\InfoPlaceAccessPinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\InfoPlaceWCPinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\SearchPlacePinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\Maps\BuildingMapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\Maps\CampusMapModel.cs" />
|
||||
<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" />
|
||||
<Compile Include="Model\Campusmap\Pins\InfoPlaceAccessPinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\Pins\InfoPlaceWCPinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\Pins\SearchPlacePinModel.cs" />
|
||||
<Compile Include="Model\Exams\ExamListWp8Model.cs" />
|
||||
<Compile Include="Model\Exams\ExamWp8Model.cs" />
|
||||
<Compile Include="Model\GeoDb\CampusBuildingLayerModel.cs" />
|
||||
<Compile Include="Model\GeoDb\CampusBuildingModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceInformation.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceService.cs" />
|
||||
<Compile Include="Model\GeoDb\SpsModel.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" />
|
||||
@@ -204,10 +201,7 @@
|
||||
<Compile Include="Feed\Openinghours\OpeninghoursFeed.cs" />
|
||||
<Compile Include="Feed\StudentCouncil\StudentCouncilFeed.cs" />
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="Model\Campusmap\MapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\MapPinModel.cs">
|
||||
<ExcludeFromStyleCop>False</ExcludeFromStyleCop>
|
||||
</Compile>
|
||||
<Compile Include="Model\Campusmap\Maps\MapWp8Model.cs" />
|
||||
<Compile Include="Model\Lecture\LectureWp8Activity.cs" />
|
||||
<Compile Include="Model\Lecture\LectureWp8List.cs" />
|
||||
<Compile Include="Model\Lecture\LecturePageModel.cs" />
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<placeInformation placeInformationName="ImageHeight">800</placeInformation>
|
||||
<placeInformation placeInformationName="MapImageOffsetX">-288</placeInformation>
|
||||
<placeInformation placeInformationName="MapImageOffsetY">-390</placeInformation>
|
||||
<placeInformation placeInformationName="MapRefPoint">Point(430 500)</placeInformation>
|
||||
<placeInformation placeInformationName="MapRefPoint">Point(410, 480)</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(235 380)</placeInformation>
|
||||
<placeInformation placeInformationName="MapRefPoint">Point(215, 355)</placeInformation>
|
||||
<placeInformation placeInformationName="ScaleX">300000</placeInformation>
|
||||
<placeInformation placeInformationName="ScaleY">500000</placeInformation>
|
||||
</place>
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CampusAppWP8.File.Places
|
||||
/// <summary> Places file. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.GeoDb.SpsModel}"/>
|
||||
public class PlacesFile : XmlModel<SpsModel>
|
||||
public class PlacesFile : XmlModel<SpsWp8Model>
|
||||
{
|
||||
#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(SpsModel model, System.IO.FileInfo fileInfo)
|
||||
private bool CheckIsFileUpToDate(SpsWp8Model 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()
|
||||
{
|
||||
SpsModel fallBackModel = XmlManager.DeserializationFileToModel<SpsModel>(Constants.FileMap_OfflineMap);
|
||||
SpsWp8Model fallBackModel = XmlManager.DeserializationFileToModel<SpsWp8Model>(Constants.FileMap_OfflineMap);
|
||||
this.Model = fallBackModel;
|
||||
this.SaveData();
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CBMainMapRoomModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the main map room model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
/// <summary> Class for the MapModel of the mainCampus of cottbus. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public class CBMainMapRoomModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the CBMainMapRoomModel class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public CBMainMapRoomModel()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the building map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Map
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
@@ -14,19 +14,20 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> A data Model for the building map. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.MapModel"/>
|
||||
public class BuildingMapModel : MapModel
|
||||
public class BuildingMapModel : MapWp8Model
|
||||
{
|
||||
/// <summary> Initializes a new instance of the BuildingMapModel class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="id"> The identifier. </param>
|
||||
public BuildingMapModel(string id)
|
||||
{
|
||||
SpsModel buildings = XmlManager.DeserializationFileToModel<SpsModel>(Constants.FileMap_BuildingsMap);
|
||||
PlaceModel building = buildings.GetPlaceById(id);
|
||||
SpsWp8Model buildings = XmlManager.DeserializationFileToModel<SpsWp8Model>(Constants.FileMap_BuildingsMap);
|
||||
PlaceWp8Model building = buildings.GetPlaceById(id);
|
||||
if (buildings == null)
|
||||
{
|
||||
return;
|
||||
@@ -34,6 +35,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
this.ImageSource = building.GetInformationsValue("ImageSource");
|
||||
double tmpVal;
|
||||
|
||||
if (double.TryParse(building.GetInformationsValue("ImageWidth"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal))
|
||||
{
|
||||
this.ImageWidth = tmpVal;
|
||||
@@ -44,16 +46,6 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageHeight = tmpVal;
|
||||
}
|
||||
|
||||
if (double.TryParse(building.GetInformationsValue("MapImageOffsetX"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal))
|
||||
{
|
||||
this.MapImageOffsetX = tmpVal;
|
||||
}
|
||||
|
||||
if (double.TryParse(building.GetInformationsValue("MapImageOffsetY"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal))
|
||||
{
|
||||
this.MapImageOffsetY = tmpVal;
|
||||
}
|
||||
|
||||
string pointString = building.GetInformationsValue("MapRefPoint");
|
||||
pointString = pointString.TrimStart("Point(".ToArray());
|
||||
pointString = pointString.TrimEnd(')');
|
||||
@@ -66,25 +58,26 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
double x;
|
||||
double y;
|
||||
|
||||
if (double.TryParse(building.GetInformationsValue("MapImageOffsetX"), NumberStyles.Number, CultureInfo.InvariantCulture, out x)
|
||||
&& double.TryParse(building.GetInformationsValue("MapImageOffsetY"), NumberStyles.Number, CultureInfo.InvariantCulture, out y))
|
||||
{
|
||||
this.MapImageOffsetPoint = new MapPoint(x, y);
|
||||
}
|
||||
|
||||
if (!double.TryParse(coord[0], NumberStyles.Number, CultureInfo.InvariantCulture, out x) || !double.TryParse(coord[1], NumberStyles.Number, CultureInfo.InvariantCulture, out y))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.RefPoint = new Point(x, y);
|
||||
this.RefPoint = new MapPoint(x, y);
|
||||
|
||||
if (double.TryParse(building.GetInformationsValue("ScaleX"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal))
|
||||
if (double.TryParse(building.GetInformationsValue("ScaleX"), NumberStyles.Number, CultureInfo.InvariantCulture, out x)
|
||||
&& double.TryParse(building.GetInformationsValue("ScaleY"), NumberStyles.Number, CultureInfo.InvariantCulture, out y))
|
||||
{
|
||||
this.ScaleX = tmpVal;
|
||||
this.ScalePoint = new MapPoint(x, y);
|
||||
}
|
||||
|
||||
if (double.TryParse(building.GetInformationsValue("ScaleY"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal))
|
||||
{
|
||||
this.ScaleY = tmpVal;
|
||||
}
|
||||
|
||||
this.GeoOffsetX = building.GeoRefPoint.Longitude;
|
||||
this.GeoOffsetY = building.GeoRefPoint.Latitude;
|
||||
this.GeoOffsetPoint = new MapPoint(building.GeoRefPoint.Longitude, building.GeoRefPoint.Latitude);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,13 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the main map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Map
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> Class for the MapModel of the mainCampus of cottbus. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
@@ -30,19 +31,16 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <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<PlaceModel> placeList)
|
||||
public CBMainMapModel(List<PlaceWp8Model> placeList)
|
||||
: base(placeList, CBMainMapModel.Campus)
|
||||
{
|
||||
this.ImageSource = Constants.FileMap_CBMainMap;
|
||||
this.ImageWidth = 2000;
|
||||
this.ImageHeight = 1425;
|
||||
this.MapImageOffsetX = -228;
|
||||
this.MapImageOffsetY = -300;
|
||||
this.RefPoint = new Point(1365, 800);
|
||||
this.ScaleX = 129483.4123222749;
|
||||
this.ScaleY = 197648.8919266073;
|
||||
this.GeoOffsetX = 14.327159;
|
||||
this.GeoOffsetY = 51.766548;
|
||||
this.MapImageOffsetPoint = new MapPoint(-228, -300);
|
||||
this.RefPoint = new MapPoint(1335, 775);
|
||||
this.ScalePoint = new MapPoint(129483.4123222749, 197648.8919266073);
|
||||
this.GeoOffsetPoint = new MapPoint(14.327159, 51.766548);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the campus map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Map
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
@@ -14,7 +14,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <summary> Class for the CampusMapModel. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.MapModel"/>
|
||||
public class CampusMapModel : MapModel
|
||||
public class CampusMapModel : MapWp8Model
|
||||
{
|
||||
#region constructor
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="placeList"> list of places. </param>
|
||||
/// <param name="campusId"> id of the campus. </param>
|
||||
public CampusMapModel(List<PlaceModel> placeList, string campusId)
|
||||
public CampusMapModel(List<PlaceWp8Model> placeList, string campusId)
|
||||
{
|
||||
this.CampusId = campusId;
|
||||
this.LoadSpatials(placeList);
|
||||
@@ -50,12 +50,12 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <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<PlaceModel> placeList)
|
||||
protected override void LoadSpatials(List<PlaceWp8Model> placeList)
|
||||
{
|
||||
List<PlaceModel> campusPlaces = new List<PlaceModel>();
|
||||
this.Spatial = new SpsModel();
|
||||
List<PlaceWp8Model> campusPlaces = new List<PlaceWp8Model>();
|
||||
this.Spatial = new SpsWp8Model();
|
||||
|
||||
foreach (PlaceModel place in placeList)
|
||||
foreach (PlaceWp8Model place in placeList)
|
||||
{
|
||||
if (place.ParentId.Equals(this.CampusId) || place.PlaceId.Equals(this.CampusId))
|
||||
{
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Map
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -15,24 +15,27 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media.Imaging;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Model.Campusmap.Pin;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
|
||||
/// <summary> This Class manage the properties of a Map. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public class MapModel
|
||||
public class MapWp8Model : CampusAppWPortalLib8.Model.Campusmap.Map.MapModel<SpsWp8Model,PlaceWp8Model>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="MapModel" /> class. </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="MapWp8Model" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public MapModel()
|
||||
public MapWp8Model()
|
||||
{
|
||||
this.IsReady = false;
|
||||
}
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="MapModel" /> class. </summary>
|
||||
/// <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 MapModel(List<PlaceModel> placeList)
|
||||
public MapWp8Model(List<PlaceWp8Model> placeList)
|
||||
{
|
||||
this.IsReady = false;
|
||||
this.LoadSpatials(placeList);
|
||||
@@ -46,90 +49,17 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <summary> Delegate for MapInfo. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="places"> list of places. </param>
|
||||
public delegate void MapInfos(List<PlaceModel> places);
|
||||
public delegate void MapInfos(List<PlaceWp8Model> places);
|
||||
|
||||
/// <summary> Event ShowMapInfo. </summary>
|
||||
public event MapInfos ShowMapInfos = null;
|
||||
|
||||
#endregion
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the map is ready or not. </summary>
|
||||
/// <value> true if this object is ready, false if not. </value>
|
||||
public bool IsReady { get; protected set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageSource of the map. </summary>
|
||||
/// <value> The image source. </value>
|
||||
public string ImageSource { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageWidth of the map. </summary>
|
||||
/// <value> The width of the image. </value>
|
||||
public double ImageWidth { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageHeight of the map. </summary>
|
||||
/// <value> The height of the image. </value>
|
||||
public double ImageHeight { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageOffsetX of the map. </summary>
|
||||
/// <value> The map image offset x coordinate. </value>
|
||||
public double MapImageOffsetX { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageOffsetY of the map. </summary>
|
||||
/// <value> The map image offset y coordinate. </value>
|
||||
public double MapImageOffsetY { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the GeoOffsetX of the map. </summary>
|
||||
/// <value> The geo offset x coordinate. </value>
|
||||
public double GeoOffsetX { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the GeoOffsetY of the map. </summary>
|
||||
/// <value> The geo offset y coordinate. </value>
|
||||
public double GeoOffsetY { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the Scale (to pixel) of the map. </summary>
|
||||
/// <value> The scale x coordinate. </value>
|
||||
public double ScaleX { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the Scale (to pixel) of the map. </summary>
|
||||
/// <value> The scale y coordinate. </value>
|
||||
public double ScaleY { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the reference point. </summary>
|
||||
/// <value> The reference point. </value>
|
||||
public Point RefPoint { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the spatial of the map. </summary>
|
||||
/// <value> The spatial. </value>
|
||||
public SpsModel Spatial { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary> Method calculate the coordinates of ScrollToOffsets point. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="point"> input point. </param>
|
||||
/// <returns> point (in pixel) </returns>
|
||||
public Point GetScrollPoint(Point point)
|
||||
{
|
||||
return this.GetScrollPoint(point.X, point.Y);
|
||||
}
|
||||
|
||||
/// <summary> Method calculate the coordinates of ScrollToOffsets point. </summary>
|
||||
/// <remarks> the input-point will be shown in the center. </remarks>
|
||||
/// <param name="x"> x - coordinate. </param>
|
||||
/// <param name="y"> y - coordinate. </param>
|
||||
/// <returns> point (in pixel) </returns>
|
||||
public Point GetScrollPoint(double x, double y)
|
||||
{
|
||||
x = this.RefPoint.X + this.MapImageOffsetX + x;
|
||||
y = this.RefPoint.Y + this.MapImageOffsetY - y;
|
||||
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
/// <summary> Method create in image, which can show at a certain position. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <param name="x"> the x- coordinate. </param>
|
||||
@@ -137,9 +67,9 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <param name="type"> The type. </param>
|
||||
/// <param name="places"> (Optional) list of places. </param>
|
||||
/// <returns> image of the pin. </returns>
|
||||
public Image AddPin(double x, double y, MapPinModel.PinType type, List<PlaceModel> places = null)
|
||||
public Image AddPin(double x, double y, MapPinModel.PinType type, List<PlaceWp8Model> places = null)
|
||||
{
|
||||
Point position = new Point(x, y);
|
||||
MapPoint position = new MapPoint(x, y);
|
||||
return this.AddPin(position, type, places);
|
||||
}
|
||||
|
||||
@@ -153,9 +83,9 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <param name="type"> The type. </param>
|
||||
/// <param name="places"> (Optional) list of places. </param>
|
||||
/// <returns> image of the pin. </returns>
|
||||
public Image AddPinFromRefPoint(double x, double y, MapPinModel.PinType type, List<PlaceModel> places = null)
|
||||
public Image AddPinFromRefPoint(double x, double y, MapPinModel.PinType type, List<PlaceWp8Model> places = null)
|
||||
{
|
||||
Point position = new Point(this.RefPoint.X + x, this.RefPoint.Y - y);
|
||||
MapPoint position = new MapPoint(this.RefPoint.X + x, this.RefPoint.Y - y);
|
||||
return this.AddPin(position, type, places);
|
||||
}
|
||||
|
||||
@@ -168,7 +98,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <param name="type"> The type. </param>
|
||||
/// <param name="places"> (Optional) list of places. </param>
|
||||
/// <returns> image of the pin. </returns>
|
||||
public Image AddPinFromRefPoint(Point position, MapPinModel.PinType type, List<PlaceModel> places = null)
|
||||
public Image AddPinFromRefPoint(MapPoint position, MapPinModel.PinType type, List<PlaceWp8Model> places = null)
|
||||
{
|
||||
return this.AddPinFromRefPoint(position.X, position.Y, type, places);
|
||||
}
|
||||
@@ -179,7 +109,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <param name="type"> The type. </param>
|
||||
/// <param name="places"> (Optional) list of places. </param>
|
||||
/// <returns> image of the pin. </returns>
|
||||
public Image AddPin(Point position, MapPinModel.PinType type, List<PlaceModel> places = null)
|
||||
public Image AddPin(MapPoint position, MapPinModel.PinType type, List<PlaceWp8Model> places = null)
|
||||
{
|
||||
Image pinImg = new Image();
|
||||
MapPinModel pin = this.CreatePin(type, places, pinImg);
|
||||
@@ -197,58 +127,6 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
return pinImg;
|
||||
}
|
||||
|
||||
/// <summary> Convert a coordinates to coordinates which address pixels. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <param name="x"> the x-coordinate. </param>
|
||||
/// <param name="y"> the y-coordinate. </param>
|
||||
/// <returns> Point in pixel-size. </returns>
|
||||
public Point ConverToPixelPoint(double x, double y)
|
||||
{
|
||||
Point p = new Point { X = this.ScaleX * x, Y = this.ScaleY * y };
|
||||
return p;
|
||||
}
|
||||
|
||||
/// <summary> Convert a coordinates to coordinates which address pixels. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="point"> not scaled point. </param>
|
||||
/// <returns> Point in pixel-size. </returns>
|
||||
public Point ConverToPixelPoint(Point point)
|
||||
{
|
||||
return this.ConverToPixelPoint(point.X, point.Y);
|
||||
}
|
||||
|
||||
/// <summary> Convert a coordinates to coordinates which address mapPoint. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="x"> the x-coordinate. </param>
|
||||
/// <param name="y"> the y-coordinate. </param>
|
||||
/// <returns> Point in pixel-size. </returns>
|
||||
public Point ConverToMapPoint(double x, double y)
|
||||
{
|
||||
return new Point { X = x - this.GeoOffsetX, Y = y - this.GeoOffsetY };
|
||||
}
|
||||
|
||||
/// <summary> Convert a coordinates to coordinates which address mapPoint. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="point"> not scaled point. </param>
|
||||
/// <returns> Point in pixel-size. </returns>
|
||||
public Point ConverToMapPoint(Point point)
|
||||
{
|
||||
return this.ConverToMapPoint(point.X, point.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary> Loads the spatial object </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="placeList"> list of places. </param>
|
||||
protected virtual void LoadSpatials(List<PlaceModel> placeList)
|
||||
{
|
||||
this.Spatial = new SpsModel();
|
||||
this.Spatial.AddPlaces(placeList);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
@@ -259,7 +137,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <param name="places"> list of places. </param>
|
||||
/// <param name="pinImg"> image of the pin. </param>
|
||||
/// <returns> The new pin. </returns>
|
||||
private MapPinModel CreatePin(MapPinModel.PinType type, List<PlaceModel> places, Image pinImg)
|
||||
private MapPinModel CreatePin(MapPinModel.PinType type, List<PlaceWp8Model> places, Image pinImg)
|
||||
{
|
||||
MapPinModel pin;
|
||||
switch (type)
|
||||
@@ -6,10 +6,12 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the click able place pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Model.Campusmap.Map;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
|
||||
/// <summary> abstract class for click abel bins. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
@@ -20,11 +22,11 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
/// <summary> Gets or sets Callback Function, to show place information of the Pin. </summary>
|
||||
/// <value> The call back. </value>
|
||||
public MapModel.MapInfos CallBack { get; set; }
|
||||
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<PlaceModel> AssocPlaces { get; set; }
|
||||
public List<PlaceWp8Model> AssocPlaces { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the current position pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
|
||||
/// <summary> Current position pin model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
@@ -25,8 +27,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageSource = Icons.CurrentPosition;
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -25;
|
||||
this.PinImageOffsetY = -34;
|
||||
this.PinImageOffsetPoint = new MapPoint(-25, -34);
|
||||
this.Tag = MapPinModel.CurrentPositionPlacePinString;
|
||||
this.ZIndex = 3;
|
||||
}
|
||||
@@ -6,7 +6,8 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the hidden pin place model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
/// <summary> Hidden pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
@@ -6,9 +6,10 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information lab place pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
@@ -24,8 +25,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageSource = Icons.PlaceLab;
|
||||
this.ImageWidth = 40;
|
||||
this.ImageHeight = 40;
|
||||
this.PinImageOffsetX = -20;
|
||||
this.PinImageOffsetY = -15;
|
||||
this.PinImageOffsetPoint = new MapPoint(-10, -15);
|
||||
this.ZIndex += 1;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information place access pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
@@ -24,8 +25,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageSource = Icons.PlaceInfoAccess;
|
||||
this.ImageWidth = 40;
|
||||
this.ImageHeight = 40;
|
||||
this.PinImageOffsetX = -10;
|
||||
this.PinImageOffsetY = -35;
|
||||
this.PinImageOffsetPoint = new MapPoint(-10, -15);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -6,9 +6,11 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information place pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
@@ -24,8 +26,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageSource = Icons.PlaceInfo;
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -25;
|
||||
this.PinImageOffsetY = -27;
|
||||
this.PinImageOffsetPoint = new MapPoint(-25, -27);
|
||||
this.Tag = MapPinModel.PinTypeToString(PinType.InfoPlace);
|
||||
this.ZIndex = 1;
|
||||
}
|
||||
@@ -6,9 +6,11 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information place red pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> A data Model for the information place red pin. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
@@ -24,8 +26,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageSource = Icons.PlaceRearchRed;
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -25;
|
||||
this.PinImageOffsetY = -27;
|
||||
this.PinImageOffsetPoint = new MapPoint(-25, -27);
|
||||
this.ZIndex += 1;
|
||||
this.Tag = MapPinModel.InfoRedPlacePinString;
|
||||
}
|
||||
@@ -6,9 +6,10 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information place wc pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
@@ -24,8 +25,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageSource = Icons.PlaceInfoWc;
|
||||
this.ImageWidth = 40;
|
||||
this.ImageHeight = 40;
|
||||
this.PinImageOffsetX = 0;
|
||||
this.PinImageOffsetY = -10;
|
||||
this.PinImageOffsetPoint = new MapPoint(0, -10);
|
||||
this.ZIndex += 1;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the search place pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWP8.Model.Campusmap.Pin
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
@@ -26,8 +28,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageSource = Icons.SearchPlace;
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -25;
|
||||
this.PinImageOffsetY = -27;
|
||||
this.PinImageOffsetPoint = new MapPoint(-25, -27);
|
||||
this.Tag = MapPinModel.SearchPlacePinString;
|
||||
this.ZIndex = 4;
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CampusBuildingLayerModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the campus building layer model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.GeoDb
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary> Class is model for buildings of a campus. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class CampusBuildingLayerModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CampusBuildingLayerModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="layerId"> id of the layer. </param>
|
||||
/// <param name="places"> list of place which can be room of the layer. </param>
|
||||
public CampusBuildingLayerModel(string layerId, List<PlaceModel> places)
|
||||
{
|
||||
this.LayerId = layerId;
|
||||
this.Rooms = new SpsModel();
|
||||
|
||||
foreach (PlaceModel place in places)
|
||||
{
|
||||
string placeLayerId = place.GetInformationsValue(Constants.PisInformationName_Layer);
|
||||
if (placeLayerId != null && placeLayerId.Equals(layerId))
|
||||
{
|
||||
this.Rooms.Places.Add(place);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region property
|
||||
|
||||
/// <summary> Gets or sets Rooms. </summary>
|
||||
/// <value> The rooms. </value>
|
||||
public SpsModel Rooms { get; set; }
|
||||
|
||||
/// <summary> Gets or sets LayerId. </summary>
|
||||
/// <value> The identifier of the layer. </value>
|
||||
public string LayerId { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <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>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
62
CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceWp8Model.cs
Normal file
62
CampusAppWP8/CampusAppWP8/Model/GeoDb/PlaceWp8Model.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <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;
|
||||
|
||||
/// <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 GeoCoordinate 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 GeoCoordinate(double.Parse(values[1], CultureInfo.InvariantCulture), double.Parse(values[0], CultureInfo.InvariantCulture));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogException(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
20
CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsWp8Model.cs
Normal file
20
CampusAppWP8/CampusAppWP8/Model/GeoDb/SpsWp8Model.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <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>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -9,59 +9,12 @@
|
||||
namespace CampusAppWP8.Model.Person
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWPortalLib8.Model.Person;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary> Person list model. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.PersonListModel{CampusAppWP8.Model.Person.PersonWp8Model}"/>
|
||||
[XmlRoot("Uebersicht")]
|
||||
public class PersonListWp8Model : CampusAppWPortalLib8.Model.Person.PersonListModel<PersonWp8Model>
|
||||
public class PersonListWp8Model : CampusAppWPortalLib8.Model.Person.PersonListModel<PersonWp8Model, PersonFunctionWp8Model>
|
||||
{
|
||||
/// <summary> Gets a person. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="id"> The identifier. </param>
|
||||
/// <returns> The person. </returns>
|
||||
public override PersonWp8Model GetPerson(string id)
|
||||
{
|
||||
foreach (PersonWp8Model tmpPerson in this.Persons)
|
||||
{
|
||||
if (tmpPerson.ID.Equals(id))
|
||||
{
|
||||
return tmpPerson;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary> Removes the non function person. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public override void RemoveNonFunctionPerson()
|
||||
{
|
||||
List<PersonWp8Model> removeList = new List<PersonWp8Model>();
|
||||
foreach (PersonWp8Model tmpPerson in this.Persons)
|
||||
{
|
||||
if (tmpPerson.Functions.Count < 1)
|
||||
{
|
||||
removeList.Add(tmpPerson);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (PersonWp8Model removePerson in removeList)
|
||||
{
|
||||
this.Persons.Remove(removePerson);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Sets person identifier to function. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public override void SetPersonIdToFunction()
|
||||
{
|
||||
foreach (PersonWp8Model person in this.Persons)
|
||||
{
|
||||
person.SetPersonIdToFunction();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace CampusAppWP8.Model.Person
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary> Person model. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <summary> A data Model for the person . </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.PersonModel{CampusAppWP8.Model.Person.PersonFunctionWp8Model}"/>
|
||||
public class PersonWp8Model : CampusAppWPortalLib8.Model.Person.PersonModel<PersonFunctionWp8Model>
|
||||
{
|
||||
|
||||
@@ -8,6 +8,18 @@
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Model.Campusmap.Map;
|
||||
using CampusAppWP8.Model.Campusmap.Pin;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Device.Location;
|
||||
@@ -20,15 +32,6 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Navigation;
|
||||
using Windows.Networking.Proximity;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Model.Campusmap;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
/// <summary> Class for the campusMap page. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
@@ -138,7 +141,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
scroll = false;
|
||||
if (Utilities.IsRoomId(alias))
|
||||
{
|
||||
PlaceModel place = this.file.Model.GetPlaceById(alias);
|
||||
PlaceWp8Model place = this.file.Model.GetPlaceById(alias);
|
||||
if (place != null)
|
||||
{
|
||||
this.GoToRoomList(place.ParentId, place.PlaceId);
|
||||
@@ -159,12 +162,11 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
App.SaveToIsolatedStorage<string>(Constants.CampusMapApp_QRCodeSearchResultStorageKey, null);
|
||||
|
||||
string searchPid = Wp8StringManager.FilterPlaceIdinQRResultString(qrcodeResult);
|
||||
PlaceModel place = this.file.Model.GetPlaceById(searchPid);
|
||||
PlaceWp8Model place = this.file.Model.GetPlaceById(searchPid);
|
||||
|
||||
if (searchPid != null)
|
||||
{
|
||||
|
||||
//this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
|
||||
// this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
|
||||
if (place.ParentId.Equals(this.campusMap.CampusId) || place.PlaceId.Equals(this.campusMap.CampusId))
|
||||
{
|
||||
this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
|
||||
@@ -176,7 +178,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
}
|
||||
|
||||
/// <summary> Methods overrides the OnNavigatedFrom-Method. </summary>
|
||||
@@ -184,12 +186,11 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
this.device.StopSubscribingForMessage(ndefId);
|
||||
this.device.StopSubscribingForMessage(this.ndefId);
|
||||
|
||||
base.OnNavigatedFrom(e);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
@@ -431,9 +432,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
return;
|
||||
}
|
||||
|
||||
List<PlaceModel> placeList = new List<PlaceModel>();
|
||||
PlaceModel tmpPlace;
|
||||
SpsModel spatial;
|
||||
List<PlaceWp8Model> placeList = new List<PlaceWp8Model>();
|
||||
PlaceWp8Model tmpPlace;
|
||||
SpsWp8Model spatial;
|
||||
if (allPlaces)
|
||||
{
|
||||
spatial = this.file.Model;
|
||||
@@ -466,6 +467,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
private void SearchPlaceByNFC_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBoxes.ShowMainModelInfoMessageBox(AppResources.ScarNfc_Search);
|
||||
|
||||
// this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
// this.device.StopSubscribingForMessage(this.ndefId);
|
||||
// this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
@@ -499,7 +501,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
// search for placeId
|
||||
string nfcContent = ndef.GetContent();
|
||||
string searchPid = Wp8StringManager.FilterPlaceIdinNFCResultString(nfcContent.Trim());
|
||||
PlaceModel place = this.file.Model.GetPlaceById(searchPid);
|
||||
PlaceWp8Model place = this.file.Model.GetPlaceById(searchPid);
|
||||
|
||||
if (searchPid != null)
|
||||
{
|
||||
@@ -517,7 +519,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
else
|
||||
{
|
||||
//this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
|
||||
// this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
|
||||
if (place.ParentId.Equals(this.campusMap.CampusId))
|
||||
{
|
||||
this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
|
||||
@@ -549,9 +551,8 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
|
||||
|
||||
|
||||
this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
}
|
||||
|
||||
/// <summary> Searches for the first places. </summary>
|
||||
@@ -561,9 +562,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<PlaceModel> SearchPlaces(string query, bool allPlaces = false)
|
||||
private List<PlaceWp8Model> SearchPlaces(string query, bool allPlaces = false)
|
||||
{
|
||||
SpsModel spatial;
|
||||
SpsWp8Model spatial;
|
||||
if (allPlaces)
|
||||
{
|
||||
spatial = this.file.Model;
|
||||
@@ -576,7 +577,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
// if query is an id
|
||||
if (Wp8StringManager.IsDigitsOnly(query))
|
||||
{
|
||||
return new List<PlaceModel>() { spatial.GetPlaceById(query) };
|
||||
return new List<PlaceWp8Model>() { spatial.GetPlaceById(query) };
|
||||
}
|
||||
|
||||
if (this.informationsNames == null)
|
||||
@@ -595,9 +596,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<PlaceModel> places, MapPinModel.PinType type, bool scroll = true)
|
||||
private void AddPins(List<PlaceWp8Model> places, MapPinModel.PinType type, bool scroll = true)
|
||||
{
|
||||
foreach (PlaceModel place in places)
|
||||
foreach (PlaceWp8Model place in places)
|
||||
{
|
||||
if (place == null)
|
||||
{
|
||||
@@ -607,7 +608,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
GeoCoordinate coor = place.GeoRefPoint;
|
||||
if (coor != null)
|
||||
{
|
||||
List<PlaceModel> assocPlaces = new List<PlaceModel>();
|
||||
List<PlaceWp8Model> assocPlaces = new List<PlaceWp8Model>();
|
||||
assocPlaces.Add(place);
|
||||
this.AddPin(coor.Longitude, coor.Latitude, type, scroll, assocPlaces);
|
||||
}
|
||||
@@ -623,9 +624,9 @@ 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, MapPinModel.PinType type, bool scroll = true, List<PlaceModel> assocPlaces = null)
|
||||
private void AddPin(double x, double y, MapPinModel.PinType type, bool scroll = true, List<PlaceWp8Model> assocPlaces = null)
|
||||
{
|
||||
Point scrollPoint = this.campusMap.GetScrollPoint(this.campusMap.ConverToPixelPoint(this.campusMap.ConverToMapPoint(x, y)));
|
||||
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));
|
||||
|
||||
MapScroller.UpdateLayout();
|
||||
@@ -648,6 +649,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
scrollPoint.Y = 0;
|
||||
}
|
||||
|
||||
MapScroller.ScrollToVerticalOffset(scrollPoint.Y);
|
||||
MapScroller.ScrollToHorizontalOffset(scrollPoint.X);
|
||||
}
|
||||
@@ -748,7 +750,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<PlaceModel> places)
|
||||
private void ShowMapInfo(List<PlaceWp8Model> places)
|
||||
{
|
||||
if (places == null)
|
||||
{
|
||||
@@ -756,7 +758,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
|
||||
string msgText = string.Empty;
|
||||
foreach (PlaceModel place in places)
|
||||
foreach (PlaceWp8Model place in places)
|
||||
{
|
||||
msgText += AppResources.PlaceLabel_Name + ": ";
|
||||
msgText += place.GetInformationsValue(Constants.PisInformationName_Name);
|
||||
@@ -789,7 +791,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
MessageBoxes.ShowMainModelInfoMessageBox(msgText);
|
||||
|
||||
foreach (PlaceModel place in places)
|
||||
foreach (PlaceWp8Model place in places)
|
||||
{
|
||||
if (place.ParentId.Equals(this.campusMap.CampusId) && this.HasRooms(place.PlaceId))
|
||||
{
|
||||
@@ -817,6 +819,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
urlString += "&" + Constants.ParamRoomId + "=" + roomId;
|
||||
}
|
||||
|
||||
Uri url = new Uri(urlString as string, UriKind.Relative);
|
||||
this.NavigationService.Navigate(url);
|
||||
}
|
||||
@@ -827,7 +830,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <returns> true, if the place has got rooms, otherwise false. </returns>
|
||||
private bool HasRooms(string placeId)
|
||||
{
|
||||
foreach (PlaceModel place in this.file.Model.Places)
|
||||
foreach (PlaceWp8Model place in this.file.Model.Places)
|
||||
{
|
||||
if (place.ParentId.Equals(placeId))
|
||||
{
|
||||
@@ -848,9 +851,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
this.SearchByText(sender, e);
|
||||
this.MapScroller.Focus();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -23,6 +23,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWP8.Model.Campusmap.Map;
|
||||
using CampusAppWP8.Model.Campusmap.Pin;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Pin;
|
||||
|
||||
/// <summary> Class of the RoomListPage. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
@@ -34,7 +37,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
private PlacesFile placeFile;
|
||||
|
||||
/// <summary> Variable of building which is shown in the list. </summary>
|
||||
private CampusBuildingModel building;
|
||||
private CampusBuildingWp8Model building;
|
||||
|
||||
/// <summary> Variable for the map model. </summary>
|
||||
private BuildingMapModel buildingMap;
|
||||
@@ -43,10 +46,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
private bool pinchRun = false;
|
||||
|
||||
/// <summary> The MapPoint. </summary>
|
||||
private Point mappoint;
|
||||
private MapPoint mappoint;
|
||||
|
||||
/// <summary> The offset point. </summary>
|
||||
private Point offsetPoint;
|
||||
private MapPoint offsetPoint;
|
||||
|
||||
/// <summary> The layer list picker. </summary>
|
||||
private ListPickerItemListModel layerListPicker;
|
||||
@@ -149,20 +152,21 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
this.ClearMap(new List<string>() { MapPinModel.InfoPlacePinString });
|
||||
|
||||
PlaceModel room = this.building.GetPlaceById(placeId);
|
||||
PlaceWp8Model room = this.building.GetPlaceById(placeId);
|
||||
|
||||
x = room.GeoRefPoint.Longitude;
|
||||
y = room.GeoRefPoint.Latitude;
|
||||
Point roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
Point viewPoint = new Point(roompoint.X - this.mappoint.X + this.offsetPoint.X, roompoint.Y - this.mappoint.Y + this.offsetPoint.Y);
|
||||
MapPoint roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
MapPoint viewPoint = roompoint - mappoint + offsetPoint;
|
||||
|
||||
|
||||
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, MapPinModel.PinType.InfoRedPlace, new List<PlaceModel> { room }));
|
||||
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, MapPinModel.PinType.InfoRedPlace, new List<PlaceWp8Model> { room }));
|
||||
}
|
||||
|
||||
/// <summary> Shows the map information. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="places"> The places. </param>
|
||||
private void ShowMapInfo(List<PlaceModel> places)
|
||||
private void ShowMapInfo(List<PlaceWp8Model> places)
|
||||
{
|
||||
if (this.pinchRun)
|
||||
{
|
||||
@@ -175,7 +179,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (PlaceModel place in places)
|
||||
foreach (PlaceWp8Model place in places)
|
||||
{
|
||||
msgText += AppResources.PlaceLabel_Name + ": ";
|
||||
msgText += place.GetInformationsValue(Constants.PisInformationName_Name);
|
||||
@@ -288,18 +292,18 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
layerKey = this.building.Layers.Keys.First();
|
||||
}
|
||||
|
||||
CampusBuildingLayerModel layer = this.building.Layers[layerKey];
|
||||
CampusBuildingLayerWp8Model layer = this.building.Layers[layerKey];
|
||||
double x;
|
||||
double y;
|
||||
|
||||
this.ClearMap(new List<string>() { MapPinModel.InfoPlacePinString });
|
||||
|
||||
foreach (PlaceModel room in layer.Rooms.Places)
|
||||
foreach (PlaceWp8Model room in layer.Rooms.Places)
|
||||
{
|
||||
x = room.GeoRefPoint.Longitude;
|
||||
y = room.GeoRefPoint.Latitude;
|
||||
Point roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
Point viewPoint = new Point(roompoint.X - this.mappoint.X + this.offsetPoint.X, roompoint.Y - this.mappoint.Y + this.offsetPoint.Y);
|
||||
MapPoint roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
MapPoint viewPoint = roompoint - mappoint + offsetPoint;
|
||||
|
||||
MapPinModel.PinType type;
|
||||
|
||||
@@ -321,10 +325,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
break;
|
||||
}
|
||||
|
||||
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, type, new List<PlaceModel> { room }));
|
||||
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, type, new List<PlaceWp8Model> { room }));
|
||||
}
|
||||
|
||||
// MapCanvas.Children.Add(this.buildingMap.AddPin(offsetPoint, MapPinModel.PinType.SearchPlace));
|
||||
// MapCanvas.Children.Add(this.buildingMap.AddPin(offsetPoint, MapPinModel.PinType.SearchPlace));
|
||||
}
|
||||
|
||||
/// <summary> Shows the layer places. </summary>
|
||||
@@ -341,7 +345,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <param name="buildingId"> Identifier for the building. </param>
|
||||
private void SetupCanvas(string buildingId)
|
||||
{
|
||||
this.building = new CampusBuildingModel(buildingId, this.placeFile.Model.Places.ToList());
|
||||
this.building = new CampusBuildingWp8Model(buildingId, this.placeFile.Model.Places.ToList());
|
||||
|
||||
this.buildingMap = new BuildingMapModel(this.building.Building.PlaceId);
|
||||
this.buildingMap.ShowMapInfos += new CBMainMapModel.MapInfos(this.ShowMapInfo);
|
||||
@@ -350,7 +354,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
double y = this.building.Building.GeoRefPoint.Latitude;
|
||||
double x = this.building.Building.GeoRefPoint.Longitude;
|
||||
this.mappoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
this.offsetPoint = new Point(-this.buildingMap.MapImageOffsetX, -this.buildingMap.MapImageOffsetY);
|
||||
this.offsetPoint = -this.buildingMap.MapImageOffsetPoint;// new Point(-this.buildingMap.MapImageOffsetX, -this.buildingMap.MapImageOffsetY);
|
||||
|
||||
this.MapCanvas.DataContext = this.buildingMap;
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace CampusAppWP8.Pages.Dev
|
||||
this.ndefList = new List<NDEFMessage>();
|
||||
|
||||
// MapModel map = new CBMainMapModel(this.file.Model.Places.ToList());
|
||||
foreach (PlaceModel place in this.file.Model.Places.ToList())
|
||||
foreach (PlaceWp8Model place in this.file.Model.Places.ToList())
|
||||
{
|
||||
this.ndefList.Add(new NDEFMessage(place.ToNfcString(), NDEFMessage.TYPEVAL.TEXT));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.Events.EventPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -62,4 +63,4 @@
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Default" Opacity="1.0" >
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -25,7 +25,7 @@ namespace CampusAppWP8.Pages.Events
|
||||
/// <summary>
|
||||
/// EventPage, where every event feed has his own PivotItem.
|
||||
/// </summary>
|
||||
public partial class EventPage : PhoneApplicationPage
|
||||
public partial class EventPage : PortraitLandscapePage
|
||||
{
|
||||
#region Memeber
|
||||
|
||||
@@ -90,11 +90,6 @@ namespace CampusAppWP8.Pages.Events
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
if (this.isNewInstance)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.Exams.Exams"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -96,4 +97,4 @@
|
||||
<lui:UpdateButtonAppBar Click="ExamForceUpdate_Click"/>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -24,7 +24,7 @@ namespace CampusAppWP8.Pages.Exams
|
||||
/// <summary> class of ExamsPage. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class Exams : PhoneApplicationPage
|
||||
public partial class Exams : PortraitLandscapePage
|
||||
{
|
||||
#region Member
|
||||
|
||||
@@ -62,11 +62,6 @@ namespace CampusAppWP8.Pages.Exams
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
|
||||
if (this.feed == null)
|
||||
{
|
||||
this.InitializeFeed();
|
||||
@@ -93,23 +88,6 @@ namespace CampusAppWP8.Pages.Exams
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On orientation changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">sender object</param>
|
||||
/// <param name="e">event args</param>
|
||||
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
|
||||
{
|
||||
if (e.Orientation.Equals(PageOrientation.Landscape) || e.Orientation.Equals(PageOrientation.LandscapeLeft) || e.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
|
||||
}
|
||||
base.OnOrientationChanged(e);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.Links.LinkPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -8,12 +8,12 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
OrientationChanged="PhoneApplicationPage_OrientationChanged"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
@@ -79,4 +79,4 @@
|
||||
<lui:UpdateButtonAppBar Click="LinkForceUpdate_Click"/>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -20,7 +20,7 @@ namespace CampusAppWP8.Pages.Links
|
||||
/// <summary> Class for the LinkPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class LinkPage : PhoneApplicationPage
|
||||
public partial class LinkPage : PortraitLandscapePage
|
||||
{
|
||||
#region Members
|
||||
|
||||
@@ -57,11 +57,6 @@ namespace CampusAppWP8.Pages.Links
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
|
||||
this.InitializeFeeds();
|
||||
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
@@ -199,22 +194,6 @@ namespace CampusAppWP8.Pages.Links
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Method handle OrientationPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight)
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.Mensa.MensaPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -9,12 +9,12 @@
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
OrientationChanged="PhoneApplicationPage_OrientationChanged"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
@@ -82,4 +82,4 @@
|
||||
</shell:ApplicationBar.MenuItems>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -24,7 +24,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// <summary> Class for the MensaPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class MensaPage : PhoneApplicationPage
|
||||
public partial class MensaPage : PortraitLandscapePage
|
||||
{
|
||||
#region Members
|
||||
|
||||
@@ -92,11 +92,6 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
|
||||
this.InitializeFeed();
|
||||
}
|
||||
|
||||
@@ -370,22 +365,6 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.SFB_MAIN);
|
||||
}
|
||||
|
||||
/// <summary> Method handle OrientationPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight)
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by MenuItem for click events. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="sender"> button object. </param>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.News.NewsIndexPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -60,4 +61,4 @@
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Minimized" Opacity="1.0" >
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -21,7 +21,7 @@ namespace CampusAppWP8.Pages.News
|
||||
/// <summary>
|
||||
/// Overview page of all news.
|
||||
/// </summary>
|
||||
public partial class NewsIndexPage : PhoneApplicationPage
|
||||
public partial class NewsIndexPage : PortraitLandscapePage
|
||||
{
|
||||
#region Member
|
||||
|
||||
@@ -97,20 +97,6 @@ namespace CampusAppWP8.Pages.News
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// On navigation to this page, creates a FeedEventHandler and load the RSS feed data.
|
||||
/// </summary>
|
||||
/// <param name="e">event args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedFrom-Method
|
||||
/// </summary>
|
||||
@@ -130,26 +116,6 @@ namespace CampusAppWP8.Pages.News
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnOrientationChanged-Method.
|
||||
/// </summary>
|
||||
/// <param name="e">orientation changed event args.</param>
|
||||
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
|
||||
{
|
||||
if (e.Orientation == PageOrientation.LandscapeRight
|
||||
|| e.Orientation == PageOrientation.LandscapeLeft
|
||||
|| e.Orientation == PageOrientation.Landscape)
|
||||
{
|
||||
ApplicationBar.Mode = ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = ApplicationBarMode.Minimized;
|
||||
}
|
||||
|
||||
base.OnOrientationChanged(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called after the RSS feeds are loaded into the newsFeed model.
|
||||
/// If there was no feed information set to the UI, the feed list
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.News.NewsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -61,4 +62,4 @@
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Default" Opacity="1.0" >
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CampusAppWP8.Pages.News
|
||||
/// <summary>
|
||||
/// EventPage, where every news fees has his own PivotItem.
|
||||
/// </summary>
|
||||
public partial class NewsPage : PhoneApplicationPage
|
||||
public partial class NewsPage : PortraitLandscapePage
|
||||
{
|
||||
/// <summary>
|
||||
/// for checking if the feed source is already set or not.
|
||||
@@ -76,11 +76,6 @@ namespace CampusAppWP8.Pages.News
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
if (this.isNewInstance)
|
||||
@@ -151,24 +146,6 @@ namespace CampusAppWP8.Pages.News
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
|
||||
{
|
||||
if (e.Orientation == PageOrientation.Landscape
|
||||
|| e.Orientation == PageOrientation.LandscapeLeft
|
||||
|| e.Orientation == PageOrientation.LandscapeRight)
|
||||
{
|
||||
ApplicationBar.Mode = ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = ApplicationBarMode.Minimized;
|
||||
}
|
||||
|
||||
base.OnOrientationChanged(e);
|
||||
}
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// Called when the index of the selected PivotItem is changed.
|
||||
/// Set the text Grid to visible and the WebBrowser to collapsed.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.Openinghours.OpeninghoursPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -131,4 +132,4 @@
|
||||
<lui:UpdateButtonAppBar Click="OpenHoursForceUpdate_Click"/>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -20,7 +20,7 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
/// <summary>
|
||||
/// Opening hours page.
|
||||
/// </summary>
|
||||
public partial class OpeninghoursPage : PhoneApplicationPage
|
||||
public partial class OpeninghoursPage : PortraitLandscapePage
|
||||
{
|
||||
#region Members
|
||||
|
||||
@@ -72,11 +72,6 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
|
||||
if (this.isNewInstance)
|
||||
{
|
||||
if ((this.feed == null) || (this.feed.Model == null))
|
||||
@@ -113,26 +108,6 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnOrientationChanged method.
|
||||
/// </summary>
|
||||
/// <param name="e">orientation changed event args.</param>
|
||||
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
|
||||
{
|
||||
if (e.Orientation == PageOrientation.Landscape
|
||||
|| e.Orientation == PageOrientation.LandscapeLeft
|
||||
|| e.Orientation == PageOrientation.LandscapeRight)
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
|
||||
}
|
||||
|
||||
base.OnOrientationChanged(e);
|
||||
}
|
||||
|
||||
// protected
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -132,15 +132,16 @@ namespace CampusAppWP8.Pages.Person
|
||||
saveContactTask.FirstName = person.FirstName;
|
||||
saveContactTask.LastName = person.SurName;
|
||||
saveContactTask.Title = person.Akadgrad;
|
||||
saveContactTask.JobTitle = person.Functions[functionIndex].Function;
|
||||
saveContactTask.Company = Constants.Addr_CBMainCompanyName + " - " + person.Functions[functionIndex].Appointment;
|
||||
PersonFunctionWp8Model personFunction = person.Functions[functionIndex];
|
||||
saveContactTask.JobTitle = personFunction.Function;
|
||||
saveContactTask.Company = Constants.Addr_CBMainCompanyName + " - " + personFunction.Appointment;
|
||||
saveContactTask.WorkAddressCountry = Constants.Addr_CBMainCountry;
|
||||
saveContactTask.WorkAddressCity = Constants.Addr_CBMainCity;
|
||||
saveContactTask.WorkAddressState = Constants.Addr_CBMainState;
|
||||
saveContactTask.WorkAddressZipCode = Constants.Addr_CBMainZipCode;
|
||||
saveContactTask.WorkAddressStreet = person.Functions[functionIndex].Building;
|
||||
saveContactTask.WorkPhone = person.Functions[functionIndex].Tel1;
|
||||
saveContactTask.WorkEmail = person.Functions[functionIndex].Mail;
|
||||
saveContactTask.WorkAddressStreet = personFunction.Building;
|
||||
saveContactTask.WorkPhone = personFunction.Tel;
|
||||
saveContactTask.WorkEmail = personFunction.Mail;
|
||||
|
||||
saveContactTask.Show();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.PlaceNews.PlaceNews"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -57,4 +58,4 @@
|
||||
</shell:ApplicationBar.MenuItems>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -29,7 +29,7 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
/// <summary> Place news. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class PlaceNews : PhoneApplicationPage
|
||||
public partial class PlaceNews : PortraitLandscapePage
|
||||
{
|
||||
#region Member
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
if (this.places == null)
|
||||
{
|
||||
this.places = new PlacesFile();
|
||||
this.places.Model = App.LoadFromIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces);
|
||||
this.places.Model = App.LoadFromIsolatedStorage<SpsWp8Model>(Constants.IsolatedStorage_AllPlaces);
|
||||
}
|
||||
|
||||
if (this.qrScan)
|
||||
@@ -131,7 +131,7 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
App.SaveToIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces, null);
|
||||
App.SaveToIsolatedStorage<SpsWp8Model>(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 SpsModel();
|
||||
this.places.Model = new SpsWp8Model();
|
||||
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<SpsModel>(Constants.IsolatedStorage_AllPlaces, this.places.Model);
|
||||
App.SaveToIsolatedStorage<SpsWp8Model>(Constants.IsolatedStorage_AllPlaces, this.places.Model);
|
||||
this.forceRequest = false;
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
return;
|
||||
}
|
||||
|
||||
PlaceModel place = this.places.Model.GetPlaceById(placeID);
|
||||
PlaceWp8Model place = this.places.Model.GetPlaceById(placeID);
|
||||
txt.Text = place.GetInformationsValue(Constants.PisInformationName_Name);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamPlaceID))
|
||||
{
|
||||
SpsModel model = App.LoadFromIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces);
|
||||
SpsWp8Model model = App.LoadFromIsolatedStorage<SpsWp8Model>(Constants.IsolatedStorage_AllPlaces);
|
||||
string placeId = NavigationContext.QueryString[Constants.ParamPlaceID];
|
||||
PlaceModel place = model.GetPlaceById(placeId);
|
||||
PlaceWp8Model 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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.StartPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -279,4 +280,4 @@
|
||||
</shell:ApplicationBar.MenuItems>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -29,7 +29,7 @@ namespace CampusAppWP8.Pages
|
||||
/// <summary> Class for the StartPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class StartPage : PhoneApplicationPage
|
||||
public partial class StartPage : PortraitLandscapePage
|
||||
{
|
||||
#region Member
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<phone:PhoneApplicationPage
|
||||
<page:PortraitLandscapePage
|
||||
x:Class="CampusAppWP8.Pages.StudentCouncil.StudentCouncilPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
xmlns:page="clr-namespace:CampusAppWP8.Utility"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -70,4 +71,4 @@
|
||||
<lui:UpdateButtonAppBar Click="StudentForceUpdate_Click"/>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
</page:PortraitLandscapePage>
|
||||
@@ -20,7 +20,7 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
/// <summary> Class for the StudentCouncilPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class StudentCouncilPage : PhoneApplicationPage
|
||||
public partial class StudentCouncilPage : PortraitLandscapePage
|
||||
{
|
||||
#region Members
|
||||
|
||||
@@ -52,11 +52,6 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight))
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
|
||||
if (this.feed == null)
|
||||
{
|
||||
this.InitializeFeed();
|
||||
@@ -74,25 +69,6 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
this.feed.SaveData();
|
||||
}
|
||||
|
||||
/// <summary> Override the OnOrientationChanged method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:Microsoft.Phone.Controls.PhoneApplicationPage.OnOrientationChanged(OrientationChangedEventArgs)"/>
|
||||
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
|
||||
{
|
||||
if (e.Orientation == PageOrientation.Landscape
|
||||
|| e.Orientation == PageOrientation.LandscapeLeft
|
||||
|| e.Orientation == PageOrientation.LandscapeRight)
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
|
||||
}
|
||||
|
||||
base.OnOrientationChanged(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region private
|
||||
|
||||
|
||||
@@ -528,9 +528,6 @@
|
||||
<data name="PathCampusmap_RoomListPage" xml:space="preserve">
|
||||
<value>/Pages/Campusmap/RoomListPage.xaml</value>
|
||||
</data>
|
||||
<data name="PisInformationName_Layer" xml:space="preserve">
|
||||
<value>Ebene</value>
|
||||
</data>
|
||||
<data name="PisInformationName_Accesbility" xml:space="preserve">
|
||||
<value>Barrierefreiheit</value>
|
||||
</data>
|
||||
|
||||
@@ -1131,15 +1131,6 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ebene ähnelt.
|
||||
/// </summary>
|
||||
public static string PisInformationName_Layer {
|
||||
get {
|
||||
return ResourceManager.GetString("PisInformationName_Layer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Name ähnelt.
|
||||
/// </summary>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 58 KiB |
@@ -18,28 +18,15 @@ namespace CampusAppWP8.Utility
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
using CampusAppWPortalLib8.Model.Settings;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
using Microsoft.Phone.Net.NetworkInformation;
|
||||
using CampusAppWPortalLib8.Model.Campusmap.Map;
|
||||
|
||||
/// <summary> Collection of utility functions. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public static class Utilities
|
||||
{
|
||||
#region member
|
||||
|
||||
/// <summary> The north campus of cottbus. </summary>
|
||||
private static GeoCoordinate northCB = new GeoCoordinate(51.77670359509875,14.293908825617);
|
||||
|
||||
/// <summary> The middle campus of cottbus. </summary>
|
||||
private static GeoCoordinate midCB = new GeoCoordinate(51.76737987049448,14.324056352976152);
|
||||
|
||||
/// <summary> The south campus of cottbus. </summary>
|
||||
private static GeoCoordinate southCB = new GeoCoordinate(51.72668339740452,14.319497377197282);
|
||||
|
||||
/// <summary> The middle campus of senftenberg. </summary>
|
||||
private static GeoCoordinate midSFB = new GeoCoordinate(51.522217168257356,13.986618441187698);
|
||||
|
||||
#endregion
|
||||
#region Enums
|
||||
|
||||
/// <summary> Comparison types. </summary>
|
||||
@@ -416,16 +403,18 @@ namespace CampusAppWP8.Utility
|
||||
return result;
|
||||
}
|
||||
|
||||
Point currentPoint = new Point(log, lat);
|
||||
|
||||
MapPoint currentPoint = new MapPoint(log, lat);
|
||||
MapPoint tmpCampus = CampusMapPoints.NorthCB;
|
||||
|
||||
double minDistance = Utilities.CalcDistance(currentPoint, new Point(Utilities.northCB.Longitude, Utilities.northCB.Latitude));
|
||||
|
||||
double minDistance = MapPoint.CalcDistance(currentPoint, tmpCampus);
|
||||
if (minDistance < 0.01)
|
||||
{
|
||||
result = Campus.CB_NORTH;
|
||||
}
|
||||
double tmpDistance = Utilities.CalcDistance(currentPoint, new Point(Utilities.midCB.Longitude, Utilities.midCB.Latitude));
|
||||
|
||||
tmpCampus = CampusMapPoints.MidCB;
|
||||
double tmpDistance = MapPoint.CalcDistance(currentPoint, tmpCampus);
|
||||
|
||||
if (tmpDistance < 0.01 && tmpDistance < minDistance)
|
||||
{
|
||||
@@ -433,16 +422,16 @@ namespace CampusAppWP8.Utility
|
||||
result = Campus.CB_MAIN;
|
||||
}
|
||||
|
||||
tmpDistance = Utilities.CalcDistance(currentPoint, new Point(Utilities.southCB.Longitude, Utilities.southCB.Latitude));
|
||||
|
||||
tmpCampus = CampusMapPoints.SouthCB;
|
||||
tmpDistance = MapPoint.CalcDistance(currentPoint, tmpCampus);
|
||||
if (tmpDistance < 0.01 && tmpDistance < minDistance)
|
||||
{
|
||||
minDistance = tmpDistance;
|
||||
result = Campus.CB_SOUTH;
|
||||
}
|
||||
|
||||
tmpDistance = Utilities.CalcDistance(currentPoint, new Point(Utilities.midSFB.Longitude, Utilities.midSFB.Latitude));
|
||||
|
||||
tmpCampus = CampusMapPoints.MidSFB;
|
||||
tmpDistance = MapPoint.CalcDistance(currentPoint, tmpCampus);
|
||||
if (tmpDistance < 0.01 && tmpDistance < minDistance)
|
||||
{
|
||||
minDistance = tmpDistance;
|
||||
@@ -452,19 +441,6 @@ namespace CampusAppWP8.Utility
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary> Calculates the distance. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="src"> the source point. </param>
|
||||
/// <param name="dst"> the destination Point. </param>
|
||||
/// <returns> The calculated distance. </returns>
|
||||
public static double CalcDistance(Point src, Point dst)
|
||||
{
|
||||
double xPow = Math.Pow(dst.X - src.X, 2);
|
||||
double yPow = Math.Pow(dst.Y - src.Y, 2);
|
||||
double result = Math.Sqrt(xPow + yPow);
|
||||
return Math.Sqrt(Math.Pow(dst.X - src.X, 2) + Math.Pow(dst.Y - src.Y, 2));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -33,12 +33,21 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\Campusmap\Maps\CampusMapPoints.cs" />
|
||||
<Compile Include="Model\Campusmap\Maps\MapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\Pins\MapPinModel.cs" />
|
||||
<Compile Include="Model\Departments\ChairModel.cs" />
|
||||
<Compile Include="Model\Departments\DepartmentModel.cs" />
|
||||
<Compile Include="Model\Departments\FacultyModel.cs" />
|
||||
<Compile Include="Model\Exams\ExamListModel.cs" />
|
||||
<Compile Include="Model\Exams\ExamModel.cs" />
|
||||
<Compile Include="Model\ForcesTypes.cs" />
|
||||
<Compile Include="Model\GeoDb\CampusBuildingLayerModel.cs" />
|
||||
<Compile Include="Model\GeoDb\CampusBuildingModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceInformation.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceService.cs" />
|
||||
<Compile Include="Model\GeoDb\SpsModel.cs" />
|
||||
<Compile Include="Model\Lecture\LectureActivity.cs" />
|
||||
<Compile Include="Model\Lecture\LectureCourse.cs" />
|
||||
<Compile Include="Model\Lecture\LectureDate.cs" />
|
||||
@@ -53,8 +62,6 @@
|
||||
<Compile Include="Model\ModelTypes.cs" />
|
||||
<Compile Include="Model\Openinghours\OpeninghoursInstitutionModel.cs" />
|
||||
<Compile Include="Model\Openinghours\OpeninghoursModel.cs" />
|
||||
<Compile Include="Model\Person\IPersonFunctionModel.cs" />
|
||||
<Compile Include="Model\Person\IPersonModel.cs" />
|
||||
<Compile Include="Model\Person\PersonFunctionModel.cs" />
|
||||
<Compile Include="Model\Person\PersonListModel.cs" />
|
||||
<Compile Include="Model\Person\PersonModel.cs" />
|
||||
@@ -76,6 +83,7 @@
|
||||
<Compile Include="Model\Utility\DegreeListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemModel.cs" />
|
||||
<Compile Include="Model\Utility\MapPoint.cs" />
|
||||
<Compile Include="Model\Utility\RoleListPickerItemListModel.cs" />
|
||||
<Compile Include="Model\Utility\SemesterListPickerItemListModel.cs">
|
||||
<ExcludeFromStyleCop>True</ExcludeFromStyleCop>
|
||||
@@ -115,6 +123,7 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CampusAppWPortalLib8.Model.Campusmap.Map
|
||||
{
|
||||
public class CampusMapPoints
|
||||
{
|
||||
#region member
|
||||
|
||||
/// <summary> The north campus of cottbus. </summary>
|
||||
private static MapPoint northCB = new MapPoint(14.293908825617, 51.77670359509875);
|
||||
|
||||
/// <summary> The middle campus of cottbus. </summary>
|
||||
private static MapPoint midCB = new MapPoint(14.324056352976152,51.76737987049448);
|
||||
|
||||
/// <summary> The south campus of cottbus. </summary>
|
||||
private static MapPoint southCB = new MapPoint(14.319497377197282,51.72668339740452);
|
||||
|
||||
/// <summary> The middle campus of senftenberg. </summary>
|
||||
private static MapPoint midSFB = new MapPoint(13.986618441187698,51.522217168257356);
|
||||
|
||||
#endregion
|
||||
|
||||
#region porperty
|
||||
|
||||
public static MapPoint MidSFB
|
||||
{
|
||||
get { return CampusMapPoints.midSFB; }
|
||||
}
|
||||
|
||||
public static MapPoint SouthCB
|
||||
{
|
||||
get { return CampusMapPoints.southCB; }
|
||||
}
|
||||
|
||||
public static MapPoint MidCB
|
||||
{
|
||||
get { return CampusMapPoints.midCB; }
|
||||
}
|
||||
|
||||
public static MapPoint NorthCB
|
||||
{
|
||||
get { return CampusMapPoints.northCB; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Campusmap.Map
|
||||
{
|
||||
using CampusAppWPortalLib8.Model.GeoDb;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary> This Class manage the properties of a Map. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public class MapModel<T, V>
|
||||
where V : PlaceModel
|
||||
where T : SpsModel<V>, new()
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="MapModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public MapModel()
|
||||
{
|
||||
this.IsReady = false;
|
||||
}
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="MapModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="placeList"> list of places. </param>
|
||||
public MapModel(List<V> placeList)
|
||||
{
|
||||
this.IsReady = false;
|
||||
this.LoadSpatials(placeList);
|
||||
this.IsReady = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether the map is ready or not. </summary>
|
||||
/// <value> true if this object is ready, false if not. </value>
|
||||
public bool IsReady { get; protected set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageSource of the map. </summary>
|
||||
/// <value> The image source. </value>
|
||||
public string ImageSource { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageWidth of the map. </summary>
|
||||
/// <value> The width of the image. </value>
|
||||
public double ImageWidth { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageHeight of the map. </summary>
|
||||
/// <value> The height of the image. </value>
|
||||
public double ImageHeight { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageOffsetX of the map. </summary>
|
||||
/// <value> The map image offset x coordinate. </value>
|
||||
public MapPoint MapImageOffsetPoint { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the GeoOffsetX of the map. </summary>
|
||||
/// <value> The geo offset x coordinate. </value>
|
||||
public MapPoint GeoOffsetPoint { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the Scale (to pixel) of the map. </summary>
|
||||
/// <value> The scale x coordinate. </value>
|
||||
public MapPoint ScalePoint { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the spatial of the map. </summary>
|
||||
/// <value> The spatial. </value>
|
||||
public T Spatial { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the reference point. </summary>
|
||||
/// <value> The reference point. </value>
|
||||
public MapPoint RefPoint { get; set; }
|
||||
|
||||
public MapPoint MapRefPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.MapImageOffsetPoint + this.RefPoint;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary> Gets scroll point. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <param name="point"> The point. </param>
|
||||
/// <returns> The scroll point. </returns>
|
||||
public MapPoint GetScrollPoint(MapPoint point)
|
||||
{
|
||||
MapPoint result = this.MapRefPoint;
|
||||
result.X += point.X;
|
||||
result.Y -= point.Y;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary> Gets scroll point. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <param name="x"> The x coordinate. </param>
|
||||
/// <param name="y"> The y coordinate. </param>
|
||||
/// <returns> The scroll point. </returns>
|
||||
public MapPoint GetScrollPoint(double x, double y)
|
||||
{
|
||||
return this.GetScrollPoint(new MapPoint(x, y));
|
||||
}
|
||||
|
||||
|
||||
/// <summary> Convert a coordinates to coordinates which address pixels. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <param name="x"> the x-coordinate. </param>
|
||||
/// <param name="y"> the y-coordinate. </param>
|
||||
/// <returns> Point in pixel-size. </returns>
|
||||
public MapPoint ConverToPixelPoint(double x, double y)
|
||||
{
|
||||
return this.ConverToPixelPoint(new MapPoint(x,y));
|
||||
}
|
||||
|
||||
/// <summary> Convert a coordinates to coordinates which address pixels. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="point"> not scaled point. </param>
|
||||
/// <returns> Point in pixel-size. </returns>
|
||||
public MapPoint ConverToPixelPoint(MapPoint point)
|
||||
{
|
||||
return point * this.ScalePoint;
|
||||
}
|
||||
|
||||
/// <summary> Convert a coordinates to coordinates which address mapPoint. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="x"> the x-coordinate. </param>
|
||||
/// <param name="y"> the y-coordinate. </param>
|
||||
/// <returns> Point in pixel-size. </returns>
|
||||
public MapPoint ConverToMapPoint(double x, double y)
|
||||
{
|
||||
return this.ConverToMapPoint(new MapPoint(x, y));
|
||||
}
|
||||
|
||||
/// <summary> Convert a coordinates to coordinates which address mapPoint. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="point"> not scaled point. </param>
|
||||
/// <returns> Point in pixel-size. </returns>
|
||||
public MapPoint ConverToMapPoint(MapPoint point)
|
||||
{
|
||||
MapPoint result = point - this.GeoOffsetPoint;
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary> Loads the spatial object </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="placeList"> list of places. </param>
|
||||
protected virtual void LoadSpatials(List<V> placeList)
|
||||
{
|
||||
this.Spatial = new T();
|
||||
this.Spatial.AddPlaces(placeList);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,10 @@
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the map pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
namespace CampusAppWPortalLib8.Model.Campusmap.Pin
|
||||
{
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
|
||||
/// <summary> This Class manage the properties of a MapPin. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
@@ -43,7 +42,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
private static string infoRedPlacePinString = MapPinModel.PinTypeToString(PinType.InfoRedPlace);
|
||||
|
||||
/// <summary> Variable of the actual position of the pin. </summary>
|
||||
private Point position;
|
||||
private MapPoint position;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -163,17 +162,19 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <value> The z coordinate index. </value>
|
||||
public int ZIndex { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageOffsetX of the pin. </summary>
|
||||
/// <value> The pin image offset x coordinate. </value>
|
||||
public double PinImageOffsetX { get; set; }
|
||||
/// <summary> Gets or sets the pin image offset point. </summary>
|
||||
/// <value> The pin image offset point. </value>
|
||||
public MapPoint PinImageOffsetPoint { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the ImageOffsetY of the pin. </summary>
|
||||
/// <value> The pin image offset y coordinate. </value>
|
||||
public double PinImageOffsetY { get; set; }
|
||||
/// <summary> Gets or sets the tag of the pin. </summary>
|
||||
/// <value> The tag. </value>
|
||||
public object Tag { get; set; }
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets or sets position of the pin. </summary>
|
||||
/// <value> The position. </value>
|
||||
public Point Position
|
||||
public MapPoint Position
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -194,24 +195,15 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
return;
|
||||
}
|
||||
|
||||
// check the x-value
|
||||
if (value.X + this.PinImageOffsetX != this.position.X)
|
||||
MapPoint newPoint = value + this.PinImageOffsetPoint;
|
||||
if (!newPoint.Equals(this.position))
|
||||
{
|
||||
this.position.X = value.X + this.PinImageOffsetX;
|
||||
}
|
||||
|
||||
// check the y-value
|
||||
if (value.Y + this.PinImageOffsetY != this.position.Y)
|
||||
{
|
||||
this.position.Y = value.Y + this.PinImageOffsetY;
|
||||
this.position = newPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the tag of the pin. </summary>
|
||||
/// <value> The tag. </value>
|
||||
public object Tag { get; set; }
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
@@ -0,0 +1,75 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CampusBuildingLayerModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the campus building layer model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
|
||||
/// <summary> A data Model for the campus building layer. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <typeparam name="V"> Generic type parameter. PlaceModel </typeparam>
|
||||
public class CampusBuildingLayerModel<V> where V : PlaceModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the CampusBuildingLayerModel class. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
public CampusBuildingLayerModel()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary> Initializes a new instance of the CampusBuildingLayerModel class. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <param name="layerId"> The identifier of the layer. </param>
|
||||
/// <param name="places"> list of place which can be room of the layer. </param>
|
||||
public CampusBuildingLayerModel(string layerId, List<V> places)
|
||||
{
|
||||
this.LayerId = layerId;
|
||||
this.AddsRooms(places);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region property
|
||||
|
||||
/// <summary> Gets or sets Rooms. </summary>
|
||||
/// <value> The rooms. </value>
|
||||
public SpsModel<V> Rooms { get; set; }
|
||||
|
||||
/// <summary> Gets or sets LayerId. </summary>
|
||||
/// <value> The identifier of the layer. </value>
|
||||
public string LayerId { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary> Adds rooms. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <param name="places"> list of place which can be room of the layer. </param>
|
||||
public void AddsRooms(List<V> places)
|
||||
{
|
||||
if (this.Rooms == null)
|
||||
{
|
||||
this.Rooms = new SpsModel<V>();
|
||||
}
|
||||
|
||||
foreach (V place in places)
|
||||
{
|
||||
string placeLayerId = place.GetInformationsValue(Constants.PisInformationName_Layer);
|
||||
if (placeLayerId != null && placeLayerId.Equals(this.LayerId))
|
||||
{
|
||||
this.Rooms.Places.Add(place);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -6,30 +6,71 @@
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the campus building model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.GeoDb
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
|
||||
/// <summary> Class is model for buildings of a campus. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public class CampusBuildingModel
|
||||
/// <typeparam name="T"> Generic type parameter. CampusBuildingLayerModel </typeparam>
|
||||
/// <typeparam name="V"> Generic type parameter. PlaceModel </typeparam>
|
||||
public class CampusBuildingModel<T, V>
|
||||
where V : PlaceModel
|
||||
where T : CampusBuildingLayerModel<V>, new()
|
||||
{
|
||||
#region constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CampusBuildingModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="buildingId"> id of the building. </param>
|
||||
/// <param name="places"> list of place which can be room of the buildings. </param>
|
||||
public CampusBuildingModel(string buildingId, List<PlaceModel> places)
|
||||
/// <summary> Initializes a new instance of the CampusBuildingModel class. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
public CampusBuildingModel()
|
||||
{
|
||||
this.Layers = new Dictionary<string, CampusBuildingLayerModel>();
|
||||
}
|
||||
|
||||
foreach (PlaceModel place in places)
|
||||
/// <summary> Initializes a new instance of the CampusBuildingModel class. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <param name="buildingId"> The identifier of the building. </param>
|
||||
/// <param name="places"> list of place which can be room of the buildings. </param>
|
||||
public CampusBuildingModel(string buildingId, List<V> places)
|
||||
{
|
||||
this.BuildingId = buildingId;
|
||||
|
||||
this.AddLayers(places);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets the Layer of the building. </summary>
|
||||
/// <value> The layers. </value>
|
||||
public Dictionary<string, T> Layers { get; private set; }
|
||||
|
||||
/// <summary> Gets or sets the Building V. </summary>
|
||||
/// <value> The building. </value>
|
||||
public V Building { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the identifier of the building. </summary>
|
||||
/// <value> The identifier of the building. </value>
|
||||
public string BuildingId { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Adds the layers. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <param name="places"> list of place which can be room of the buildings. </param>
|
||||
public void AddLayers(List<V> places)
|
||||
{
|
||||
if (this.Layers == null)
|
||||
{
|
||||
if (place.ParentId.Equals(buildingId))
|
||||
this.Layers = new Dictionary<string, T>();
|
||||
}
|
||||
|
||||
foreach (V place in places)
|
||||
{
|
||||
if (place.ParentId.Equals(this.BuildingId))
|
||||
{
|
||||
string placeLayerId = place.GetInformationsValue(Constants.PisInformationName_Layer);
|
||||
if (placeLayerId == null)
|
||||
@@ -43,40 +84,26 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Layers.Add(placeLayerId, new CampusBuildingLayerModel(placeLayerId, new List<PlaceModel>() { place }));
|
||||
T layer = new T() { LayerId = placeLayerId };
|
||||
layer.AddsRooms(new List<V> { place });
|
||||
this.Layers.Add(placeLayerId, layer);
|
||||
}
|
||||
}
|
||||
else if (place.PlaceId.Equals(buildingId))
|
||||
else if (place.PlaceId.Equals(this.BuildingId))
|
||||
{
|
||||
this.Building = place;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets the Layer of the building. </summary>
|
||||
/// <value> The layers. </value>
|
||||
public Dictionary<string, CampusBuildingLayerModel> Layers { get; private set; }
|
||||
|
||||
/// <summary> Gets or sets the Building PlaceModel. </summary>
|
||||
/// <value> The building. </value>
|
||||
public PlaceModel Building { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary> Method gets a place by their placeID. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="placeID"> the placeId of the place. </param>
|
||||
/// <returns> The place by identifier. </returns>
|
||||
public PlaceModel GetPlaceById(string placeID)
|
||||
public V GetPlaceById(string placeID)
|
||||
{
|
||||
PlaceModel result = null;
|
||||
foreach (CampusBuildingLayerModel layer in this.Layers.Values)
|
||||
V result = null;
|
||||
foreach (T layer in this.Layers.Values)
|
||||
{
|
||||
result = layer.Rooms.GetPlaceById(placeID);
|
||||
if (result != null)
|
||||
@@ -94,13 +121,12 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
/// <returns> The layer key. </returns>
|
||||
public string GetLayerKey(string placeId)
|
||||
{
|
||||
PlaceModel tmpPlace = null;
|
||||
foreach (CampusBuildingLayerModel layer in this.Layers.Values)
|
||||
V tmpPlace = null;
|
||||
foreach (T layer in this.Layers.Values)
|
||||
{
|
||||
tmpPlace = layer.Rooms.GetPlaceById(placeId);
|
||||
if (tmpPlace != null)
|
||||
{
|
||||
|
||||
return layer.LayerId;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the place information class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.GeoDb
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
@@ -6,17 +6,12 @@
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the place model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.GeoDb
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Device.Location;
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary> Model for a place of the SPSService. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
@@ -40,40 +35,6 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
[XmlAttribute("refpoint")]
|
||||
public string RefPoint { get; set; }
|
||||
|
||||
/// <summary> Gets the geo reference point. </summary>
|
||||
/// <value> The geo reference point. </value>
|
||||
public GeoCoordinate 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 GeoCoordinate(double.Parse(values[1], CultureInfo.InvariantCulture), double.Parse(values[0], CultureInfo.InvariantCulture));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogException(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the information. </summary>
|
||||
/// <value> The information. </value>
|
||||
[XmlElement("placeInformation")]
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the place service class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.GeoDb
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
@@ -6,7 +6,7 @@
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the sps model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.GeoDb
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -15,8 +15,9 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
|
||||
/// <summary> Model for a xml-response of the SPSService. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <typeparam name="T"> Generic type parameter. </typeparam>
|
||||
[XmlRoot("root")]
|
||||
public class SpsModel
|
||||
public class SpsModel<T> where T : PlaceModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
@@ -25,7 +26,7 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
public SpsModel()
|
||||
{
|
||||
this.HasChanged = false;
|
||||
this.Places = new ObservableCollection<PlaceModel>();
|
||||
this.Places = new ObservableCollection<T>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -35,7 +36,7 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
/// <summary> Gets or sets a list of places. </summary>
|
||||
/// <value> The places. </value>
|
||||
[XmlElement("place")]
|
||||
public ObservableCollection<PlaceModel> Places { get; set; }
|
||||
public ObservableCollection<T> Places { get; set; }
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether this object has changed. </summary>
|
||||
/// <value> true if this object has changed, false if not. </value>
|
||||
@@ -53,12 +54,12 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
/// <param name="ignoreCases"> (Optional) the ignore cases. </param>
|
||||
/// <param name="informationNames"> (Optional) name of the information. </param>
|
||||
/// <returns> The places by information. </returns>
|
||||
public List<PlaceModel> GetPlacesByInformation(string query, bool ignoreCases = true, List<string> informationNames = null)
|
||||
public List<T> GetPlacesByInformation(string query, bool ignoreCases = true, List<string> informationNames = null)
|
||||
{
|
||||
string querryStr = string.Empty;
|
||||
List<PlaceModel> resultplaces = new List<PlaceModel>();
|
||||
List<T> resultplaces = new List<T>();
|
||||
|
||||
foreach (PlaceModel place in this.Places)
|
||||
foreach (T place in this.Places)
|
||||
{
|
||||
if (this.IsPlaceQueryMatched(place, query, ignoreCases, informationNames))
|
||||
{
|
||||
@@ -72,9 +73,9 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
/// <summary> Adds the places. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="places"> A list of places. </param>
|
||||
public void AddPlaces(List<PlaceModel> places)
|
||||
public void AddPlaces(List<T> places)
|
||||
{
|
||||
foreach (PlaceModel place in places)
|
||||
foreach (T place in places)
|
||||
{
|
||||
if (this.Places.Contains(place))
|
||||
{
|
||||
@@ -97,7 +98,7 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
public List<string> CreatePidList()
|
||||
{
|
||||
List<string> pidList = new List<string>();
|
||||
foreach (PlaceModel place in this.Places)
|
||||
foreach (T place in this.Places)
|
||||
{
|
||||
pidList.Add(place.PlaceId);
|
||||
}
|
||||
@@ -109,9 +110,9 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="id"> The identifier. </param>
|
||||
/// <returns> The place by identifier. </returns>
|
||||
public PlaceModel GetPlaceById(string id)
|
||||
public T GetPlaceById(string id)
|
||||
{
|
||||
foreach (PlaceModel place in this.Places)
|
||||
foreach (T place in this.Places)
|
||||
{
|
||||
if (place.PlaceId.Equals(id))
|
||||
{
|
||||
@@ -131,7 +132,7 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
{
|
||||
foreach (string pid in pidList)
|
||||
{
|
||||
PlaceModel place = this.GetPlaceById(pid);
|
||||
T place = this.GetPlaceById(pid);
|
||||
if (!place.ContainsInformationNames(names))
|
||||
{
|
||||
return false;
|
||||
@@ -150,7 +151,7 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
{
|
||||
foreach (string pid in pidList)
|
||||
{
|
||||
PlaceModel place = this.GetPlaceById(pid);
|
||||
T place = this.GetPlaceById(pid);
|
||||
if (!place.ContainsServiceNames(names))
|
||||
{
|
||||
return false;
|
||||
@@ -164,16 +165,16 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
/// <remarks> Stubbfel, 11.09.2013. </remarks>
|
||||
/// <param name="pidList"> List of pids. </param>
|
||||
/// <returns> filtered list of places. </returns>
|
||||
public List<PlaceModel> FilterByPid(List<string> pidList)
|
||||
public List<T> FilterByPid(List<string> pidList)
|
||||
{
|
||||
List<PlaceModel> fitlerList = new List<PlaceModel>();
|
||||
List<T> fitlerList = new List<T>();
|
||||
|
||||
if (pidList == null || pidList.Count < 1)
|
||||
{
|
||||
return fitlerList;
|
||||
}
|
||||
|
||||
foreach (PlaceModel place in this.Places)
|
||||
foreach (T place in this.Places)
|
||||
{
|
||||
if (pidList.Contains(place.PlaceId))
|
||||
{
|
||||
@@ -195,7 +196,7 @@ namespace CampusAppWP8.Model.GeoDb
|
||||
/// <param name="ignoreCases"> (Optional) the ignore cases. </param>
|
||||
/// <param name="informationNames"> (Optional) name of the information. </param>
|
||||
/// <returns> true if it match otherwise false. </returns>
|
||||
private bool IsPlaceQueryMatched(PlaceModel place, string query, bool ignoreCases = true, List<string> informationNames = null)
|
||||
private bool IsPlaceQueryMatched(T place, string query, bool ignoreCases = true, List<string> informationNames = null)
|
||||
{
|
||||
string queryString = query;
|
||||
if (ignoreCases)
|
||||
@@ -1,23 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="IPersonFunctionModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Declares the IPersonFunctionModel interface</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Person
|
||||
{
|
||||
/// <summary> Interface for PersonFunctionModel classes. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public interface IPersonFunctionModel
|
||||
{
|
||||
/// <summary> Gets or sets the identifier of the person. </summary>
|
||||
/// <value> The identifier of the person. </value>
|
||||
string PersonID { get; set; }
|
||||
|
||||
/// <summary> Gets or sets zero-based index of the function. </summary>
|
||||
/// <value> The function index. </value>
|
||||
int FunctionIndex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="IPersonModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Declares the IPersonModel interface</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Person
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
/// <summary> Interface for PersonModel classes. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <typeparam name="T"> PersonFunctionModel template. </typeparam>
|
||||
public interface IPersonModel<T> where T : IPersonFunctionModel
|
||||
{
|
||||
/// <summary> Gets or sets the functions of a person. </summary>
|
||||
/// <value> The functions. </value>
|
||||
ObservableCollection<T> Functions { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the identifier. </summary>
|
||||
/// <value> The identifier. </value>
|
||||
string ID { get; set; }
|
||||
|
||||
/// <summary> Sets person identifier to function. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
void SetPersonIdToFunction();
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
/// <summary> Person function model. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.IPersonFunctionModel"/>
|
||||
public class PersonFunctionModel : IPersonFunctionModel
|
||||
public class PersonFunctionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
@@ -62,6 +62,19 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
}
|
||||
|
||||
public string Tel
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Tel1;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.Tel1 = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets or sets the tel 2. </summary>
|
||||
/// <value> The tel 2. </value>
|
||||
[XmlAttribute("telefon2")]
|
||||
|
||||
@@ -12,11 +12,14 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary> Person list model. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <typeparam name="T"> personModel template. </typeparam>
|
||||
/// <summary> A data Model for the person list. </summary>
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <typeparam name="T"> Generic type parameter (PersonModel). </typeparam>
|
||||
/// <typeparam name="V"> Generic type parameter (PersonFunctionModel). </typeparam>
|
||||
[XmlRoot("Uebersicht")]
|
||||
public abstract class PersonListModel<T>
|
||||
public abstract class PersonListModel<T, V>
|
||||
where V : PersonFunctionModel
|
||||
where T : PersonModel<V>
|
||||
{
|
||||
#region Property
|
||||
|
||||
@@ -29,15 +32,22 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary> Sets person identifier to function. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public abstract void SetPersonIdToFunction();
|
||||
|
||||
/// <summary> Gets a person. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <param name="id"> The identifier. </param>
|
||||
/// <returns> The person. </returns>
|
||||
public abstract T GetPerson(string id);
|
||||
public T GetPerson(string id)
|
||||
{
|
||||
foreach (T tmpPerson in this.Persons)
|
||||
{
|
||||
if (tmpPerson.ID.Equals(id))
|
||||
{
|
||||
return tmpPerson;
|
||||
}
|
||||
}
|
||||
|
||||
return default(T);
|
||||
}
|
||||
|
||||
/// <summary> Removes the non function and set identifiers person. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
@@ -49,8 +59,33 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
|
||||
/// <summary> Removes the non function person. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public abstract void RemoveNonFunctionPerson();
|
||||
|
||||
public void RemoveNonFunctionPerson()
|
||||
{
|
||||
List<T> removeList = new List<T>();
|
||||
foreach (T tmpPerson in this.Persons)
|
||||
{
|
||||
if (tmpPerson.Functions.Count < 1)
|
||||
{
|
||||
removeList.Add(tmpPerson);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (T removePerson in removeList)
|
||||
{
|
||||
this.Persons.Remove(removePerson);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Sets person identifier to function. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public void SetPersonIdToFunction()
|
||||
{
|
||||
foreach (T person in this.Persons)
|
||||
{
|
||||
person.SetPersonIdToFunction();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary> A data Model for the person. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.IPersonModel{T}"/>
|
||||
public class PersonModel<T> : IPersonModel<T> where T : IPersonFunctionModel
|
||||
/// <remarks> Stubbfel, 21.10.2013. </remarks>
|
||||
/// <typeparam name="T"> Generic type parameter (PersonFunctionModel). </typeparam>
|
||||
public class PersonModel<T> where T : PersonFunctionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
@@ -158,14 +158,10 @@ namespace CampusAppWPortalLib8.Model.Person
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
foreach (T item in this.functions)
|
||||
foreach (PersonFunctionModel function in this.functions)
|
||||
{
|
||||
IPersonFunctionModel function = item as IPersonFunctionModel;
|
||||
if (function != null)
|
||||
{
|
||||
function.PersonID = this.ID;
|
||||
function.FunctionIndex = index++;
|
||||
}
|
||||
function.PersonID = this.ID;
|
||||
function.FunctionIndex = index++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
78
CampusAppWP8/CampusAppWPortalLib8/Model/Utility/MapPoint.cs
Normal file
78
CampusAppWP8/CampusAppWPortalLib8/Model/Utility/MapPoint.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CampusAppWPortalLib8.Model.Utility
|
||||
{
|
||||
public class MapPoint : IEquatable<MapPoint>
|
||||
{
|
||||
|
||||
#region Constructor
|
||||
|
||||
public MapPoint(double x, double y)
|
||||
{
|
||||
this.X = x;
|
||||
this.Y = y;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region property
|
||||
|
||||
public double X { get; set; }
|
||||
|
||||
public double Y { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
public static MapPoint operator +(MapPoint mp1, MapPoint mp2)
|
||||
{
|
||||
return new MapPoint(mp1.X + mp2.X, mp1.Y + mp2.Y);
|
||||
}
|
||||
|
||||
public static MapPoint operator -(MapPoint mp1, MapPoint mp2)
|
||||
{
|
||||
return new MapPoint(mp1.X - mp2.X, mp1.Y - mp2.Y);
|
||||
}
|
||||
|
||||
public static MapPoint operator -(MapPoint mp1)
|
||||
{
|
||||
return new MapPoint(-mp1.X, -mp1.Y);
|
||||
}
|
||||
|
||||
public static MapPoint operator *(MapPoint mp1, MapPoint mp2)
|
||||
{
|
||||
return new MapPoint(mp1.X * mp2.X, mp1.Y * mp2.Y);
|
||||
}
|
||||
|
||||
public static MapPoint operator /(MapPoint mp1, MapPoint mp2)
|
||||
{
|
||||
return new MapPoint(mp1.X / mp2.X, mp1.Y / mp2.Y);
|
||||
}
|
||||
|
||||
public bool Equals(MapPoint other)
|
||||
{
|
||||
if (other != null && this.X == other.X && this.Y == other.Y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static double CalcDistance(MapPoint src, MapPoint dst)
|
||||
{
|
||||
MapPoint subPoint = dst - src;
|
||||
subPoint *= subPoint;
|
||||
double result = Math.Sqrt(subPoint.X + subPoint.Y);
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -129,6 +129,33 @@
|
||||
<data name="PathNews_NewsIndexPage" xml:space="preserve">
|
||||
<value>/Pages/News/NewsIndexPage.xaml</value>
|
||||
</data>
|
||||
<data name="PinType_CurrentPosition" xml:space="preserve">
|
||||
<value>CurrentPositionPin</value>
|
||||
</data>
|
||||
<data name="PinType_Hidden" xml:space="preserve">
|
||||
<value>HiddenPin</value>
|
||||
</data>
|
||||
<data name="PinType_Info" xml:space="preserve">
|
||||
<value>InfoPin</value>
|
||||
</data>
|
||||
<data name="PinType_InfoAccess" xml:space="preserve">
|
||||
<value>InfoAccesPin</value>
|
||||
</data>
|
||||
<data name="PinType_InfoLab" xml:space="preserve">
|
||||
<value>InfoLabPin</value>
|
||||
</data>
|
||||
<data name="PinType_InfoRed" xml:space="preserve">
|
||||
<value>InfoRedPin</value>
|
||||
</data>
|
||||
<data name="PinType_InfoWC" xml:space="preserve">
|
||||
<value>InfoWCPin</value>
|
||||
</data>
|
||||
<data name="PinType_Search" xml:space="preserve">
|
||||
<value>SearchPin</value>
|
||||
</data>
|
||||
<data name="PisInformationName_Layer" xml:space="preserve">
|
||||
<value>Ebene</value>
|
||||
</data>
|
||||
<data name="UniCBTelPrefix" xml:space="preserve">
|
||||
<value>035569</value>
|
||||
</data>
|
||||
|
||||
@@ -97,6 +97,87 @@ namespace CampusAppWPortalLib8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die CurrentPositionPin ähnelt.
|
||||
/// </summary>
|
||||
public static string PinType_CurrentPosition {
|
||||
get {
|
||||
return ResourceManager.GetString("PinType_CurrentPosition", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die HiddenPin ähnelt.
|
||||
/// </summary>
|
||||
public static string PinType_Hidden {
|
||||
get {
|
||||
return ResourceManager.GetString("PinType_Hidden", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die InfoPin ähnelt.
|
||||
/// </summary>
|
||||
public static string PinType_Info {
|
||||
get {
|
||||
return ResourceManager.GetString("PinType_Info", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die InfoAccesPin ähnelt.
|
||||
/// </summary>
|
||||
public static string PinType_InfoAccess {
|
||||
get {
|
||||
return ResourceManager.GetString("PinType_InfoAccess", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die InfoLabPin ähnelt.
|
||||
/// </summary>
|
||||
public static string PinType_InfoLab {
|
||||
get {
|
||||
return ResourceManager.GetString("PinType_InfoLab", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die InfoRedPin ähnelt.
|
||||
/// </summary>
|
||||
public static string PinType_InfoRed {
|
||||
get {
|
||||
return ResourceManager.GetString("PinType_InfoRed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die InfoWCPin ähnelt.
|
||||
/// </summary>
|
||||
public static string PinType_InfoWC {
|
||||
get {
|
||||
return ResourceManager.GetString("PinType_InfoWC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die SearchPin ähnelt.
|
||||
/// </summary>
|
||||
public static string PinType_Search {
|
||||
get {
|
||||
return ResourceManager.GetString("PinType_Search", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ebene ähnelt.
|
||||
/// </summary>
|
||||
public static string PisInformationName_Layer {
|
||||
get {
|
||||
return ResourceManager.GetString("PisInformationName_Layer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 035569 ähnelt.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user