This commit is contained in:
stubbfel
2013-10-21 15:14:18 +02:00
parent d296fe25ea
commit dcff024136
10 changed files with 65 additions and 63 deletions

View File

@@ -1,17 +1,16 @@
//-----------------------------------------------------------------------
// <copyright file="CampusBuildingLayerModel.cs" company="BTU/IIT">
// <copyright file="CampusBuildingLayerWp8Model.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>
// <date>21.10.2013</date>
// <summary>Implements the campus building layer wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
/// <summary> Class is model for buildings of a campus. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <summary> A data Model for the campus building layer wp 8. </summary>
/// <remarks> Stubbfel, 21.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.GeoDb.CampusBuildingLayerModel{CampusAppWP8.Model.GeoDb.PlaceWp8Model}"/>
public class CampusBuildingLayerWp8Model : CampusAppWPortalLib8.Model.GeoDb.CampusBuildingLayerModel<PlaceWp8Model>
{
}

View File

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

View File

@@ -1,26 +1,23 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceModel.cs" company="BTU/IIT">
// <copyright file="PlaceWp8Model.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 place model class</summary>
// <date>21.10.2013</date>
// <summary>Implements the place wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.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;
using CampusAppWPortalLib8.Model.GeoDb;
/// <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
{

View File

@@ -1,21 +1,18 @@
//-----------------------------------------------------------------------
// <copyright file="SpsModel.cs" company="BTU/IIT">
// <copyright file="SpsWp8Model.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 sps model class</summary>
// <date>21.10.2013</date>
// <summary>Implements the sps wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using CampusAppWPortalLib8.Model.GeoDb;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml.Serialization;
/// <summary> Model for a xml-response of the SPSService. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <summary> A data Model for the sps wp 8. </summary>
/// <remarks> Stubbfel, 21.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.GeoDb.SpsModel{CampusAppWP8.Model.GeoDb.PlaceWp8Model}"/>
[XmlRoot("root")]
public class SpsWp8Model : CampusAppWPortalLib8.Model.GeoDb.SpsModel<PlaceWp8Model>
{

View File

@@ -19,7 +19,6 @@ namespace CampusAppWP8.Pages.Campusmap
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Navigation;
using Windows.Networking.Proximity;
using CampusAppWP8.File.Places;
using CampusAppWP8.Model.Campusmap;
using CampusAppWP8.Model.GeoDb;
@@ -29,6 +28,7 @@ namespace CampusAppWP8.Pages.Campusmap
using CampusAppWP8.Utility.NDEF;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Windows.Networking.Proximity;
/// <summary> Class for the campusMap page. </summary>
/// <remarks> Stubbfel, 19.08.2013. </remarks>
@@ -163,8 +163,7 @@ namespace CampusAppWP8.Pages.Campusmap
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 +175,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 +183,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
@@ -466,6 +464,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);
@@ -517,7 +516,7 @@ namespace CampusAppWP8.Pages.Campusmap
}
else
{
//this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
// this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
if (place.ParentId.Equals(this.campusMap.CampusId))
{
this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
@@ -549,9 +548,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>
@@ -648,6 +646,7 @@ namespace CampusAppWP8.Pages.Campusmap
{
scrollPoint.Y = 0;
}
MapScroller.ScrollToVerticalOffset(scrollPoint.Y);
MapScroller.ScrollToHorizontalOffset(scrollPoint.X);
}
@@ -817,6 +816,7 @@ namespace CampusAppWP8.Pages.Campusmap
{
urlString += "&" + Constants.ParamRoomId + "=" + roomId;
}
Uri url = new Uri(urlString as string, UriKind.Relative);
this.NavigationService.Navigate(url);
}
@@ -848,9 +848,9 @@ namespace CampusAppWP8.Pages.Campusmap
{
this.SearchByText(sender, e);
this.MapScroller.Focus();
}
}
}
#endregion
#endregion

View File

@@ -8,6 +8,13 @@
//-----------------------------------------------------------------------
namespace CampusAppWP8.Pages.Campusmap
{
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Navigation;
using CampusAppWP8.File.Places;
using CampusAppWP8.Model.Campusmap;
using CampusAppWP8.Model.GeoDb;
@@ -16,13 +23,6 @@ namespace CampusAppWP8.Pages.Campusmap
using CampusAppWP8.Utility.Lui.MessageBoxes;
using CampusAppWPortalLib8.Model.Utility;
using Microsoft.Phone.Controls;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Navigation;
/// <summary> Class of the RoomListPage. </summary>
/// <remarks> Stubbfel, 14.10.2013. </remarks>

View File

@@ -11,21 +11,22 @@ namespace CampusAppWPortalLib8.Model.GeoDb
using System.Collections.Generic;
using CampusAppWPortalLib8.Resources;
/// <summary> Class is model for buildings of a campus. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <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 <see cref="CampusBuildingLayerModel" /> class.
/// </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="layerId"> id of the layer. </param>
/// <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)
{

View File

@@ -13,21 +13,23 @@ namespace CampusAppWPortalLib8.Model.GeoDb
/// <summary> Class is model for buildings of a campus. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <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 CampusBuildingModel class. </summary>
/// <remarks> Stubbfel, 21.10.2013. </remarks>
public CampusBuildingModel()
{
}
/// <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>
/// <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)
{
@@ -48,12 +50,17 @@ namespace CampusAppWPortalLib8.Model.GeoDb
/// <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)
@@ -120,7 +127,6 @@ namespace CampusAppWPortalLib8.Model.GeoDb
tmpPlace = layer.Rooms.GetPlaceById(placeId);
if (tmpPlace != null)
{
return layer.LayerId;
}
}

View File

@@ -11,11 +11,7 @@ namespace CampusAppWPortalLib8.Model.GeoDb
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
using CampusAppWPortalLib8.Resources;
using CampusAppWPortalLib8.Utility;
/// <summary> Model for a place of the SPSService. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>

View File

@@ -15,6 +15,7 @@ namespace CampusAppWPortalLib8.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<T> where T : PlaceModel
{