refactor all model

This commit is contained in:
stubbfel
2013-10-15 11:28:01 +02:00
parent 85c196df78
commit 354bbfc2e4
24 changed files with 551 additions and 593 deletions

View File

@@ -138,6 +138,7 @@
<Compile Include="Model\Person\PersonListWp8Model.cs" />
<Compile Include="Model\Person\PersonWp8Model.cs" />
<Compile Include="Model\Setting\AppSettings.cs" />
<Compile Include="Model\Setting\BTUTagHandlerTypes.cs" />
<Compile Include="Model\Setting\TagHandlerListPickerItemListModel.cs" />
<Compile Include="Model\Setting\UserProfilModel.cs" />
<Compile Include="Model\Utility\CourseListPickerItemListWp8Model.cs" />

View File

@@ -1,35 +1,36 @@
//-----------------------------------------------------------------------
// <copyright file="BinaryModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>03.09.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the binary model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model
{
using CampusAppWPortalLib8.Model;
/// <summary>Binary model.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <summary> Binary model. </summary>
/// <remarks> Stubbfel, 03.09.2013. </remarks>
/// <seealso cref="T:CampusAppWP8.Model.MainModel{System.Byte[]}"/>
public abstract class BinaryModel : MainModel<byte[]>
{
#region Constructor
/// <summary>Initializes a new instance of the BinaryModel class.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="modelType">Type of the model.</param>
/// <param name="fileName"> Filename of the file.</param>
/// <param name="url"> URL of the document.</param>
/// <summary> Initializes a new instance of the BinaryModel class. </summary>
/// <remarks> Stubbfel, 03.09.2013. </remarks>
/// <param name="modelType"> Type of the model. </param>
/// <param name="fileName"> Filename of the file. </param>
/// <param name="url"> URL of the document. </param>
public BinaryModel(ModelType modelType, string fileName, string url)
: base(modelType, fileName, url)
{
}
/// <summary>Initializes a new instance of the BinaryModel class.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="modelType"> Type of the model.</param>
/// <param name="sourceName">Name of the source.</param>
/// <summary> Initializes a new instance of the BinaryModel class. </summary>
/// <remarks> Stubbfel, 03.09.2013. </remarks>
/// <param name="modelType"> Type of the model. </param>
/// <param name="sourceName"> Name of the source. </param>
public BinaryModel(ModelType modelType, string sourceName)
: base(modelType, sourceName)
{
@@ -39,10 +40,10 @@ namespace CampusAppWP8.Model
#region Method
/// <summary>Deserialize model.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="modelData">Information describing the model.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
/// <summary> Deserialize model. </summary>
/// <remarks> Stubbfel, 03.09.2013. </remarks>
/// <param name="modelData"> Information describing the model. </param>
/// <returns> true if it succeeds, false if it fails. </returns>
protected override bool DeserializeModel(byte[] modelData)
{
bool retValue = true;
@@ -59,9 +60,9 @@ namespace CampusAppWP8.Model
return retValue;
}
/// <summary>Gets the serialize model.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <returns>an byte Array.</returns>
/// <summary> Gets the serialize model. </summary>
/// <remarks> Stubbfel, 03.09.2013. </remarks>
/// <returns> an byte Array. </returns>
protected override byte[] SerializeModel()
{
return this.Model;

View File

@@ -1,16 +1,18 @@
//-----------------------------------------------------------------------
// <copyright file="ExamListWp8Model.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>02.09.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the exam list wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Exams
{
using System.Xml.Serialization;
/// <summary>Exam list model.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
/// <summary> Exam list model. </summary>
/// <remarks> Stubbfel, 02.09.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Exams.ExamListModel{CampusAppWP8.Model.Exams.ExamWp8Model}"/>
[XmlRoot("links")]
public class ExamListWp8Model : CampusAppWPortalLib8.Model.Exams.ExamListModel<ExamWp8Model>
{

View File

@@ -1,22 +1,24 @@
//-----------------------------------------------------------------------
// <copyright file="ExamWp8Model.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>02.09.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the exam wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Exams
{
using CampusAppWP8.Utility;
/// <summary>Exam model.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
/// <summary> Exam model. </summary>
/// <remarks> Stubbfel, 02.09.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Exams.ExamModel"/>
public class ExamWp8Model : CampusAppWPortalLib8.Model.Exams.ExamModel
{
#region Property
/// <summary>Gets the caption.</summary>
/// <value>The caption.</value>
/// <summary> Gets the caption of the exam. </summary>
/// <value> The caption. </value>
public string Caption
{
get

View File

@@ -1,28 +1,28 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file="CampusBuildingLayerModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>23.09.2013</sience>
//-----------------------------------------------------------------------------
// <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>
/// <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.
/// Initializes a new instance of the <see cref="CampusBuildingLayerModel" /> class.
/// </summary>
/// <param name="layerId">id of the layer</param>
/// <param name="places">list of place which can be room of the layer</param>
/// <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;
@@ -42,14 +42,12 @@ namespace CampusAppWP8.Model.GeoDb
#region property
/// <summary>
/// Gets or sets Rooms
/// </summary>
/// <summary> Gets or sets Rooms. </summary>
/// <value> The rooms. </value>
public SpsModel Rooms { get; set; }
/// <summary>
/// Gets or sets LayerId
/// </summary>
/// <summary> Gets or sets LayerId. </summary>
/// <value> The identifier of the layer. </value>
public string LayerId { get; set; }
#endregion

View File

@@ -1,28 +1,28 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file="CampusBuildingModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>23.09.2013</sience>
//-----------------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the campus building model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System.Collections.Generic;
using CampusAppWP8.Resources;
/// <summary>
/// Class is model for buildings of a campus
/// </summary>
/// <summary> Class is model for buildings of a campus. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public class CampusBuildingModel
{
#region constructor
/// <summary>
/// Initializes a new instance of the <see cref="CampusBuildingModel" /> class.
/// Initializes a new instance of the <see cref="CampusBuildingModel" /> class.
/// </summary>
/// <param name="buildingId">id of the building</param>
/// <param name="places">list of place which can be room of the buildings</param>
/// <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)
{
this.Layers = new Dictionary<string, CampusBuildingLayerModel>();
@@ -57,25 +57,22 @@ namespace CampusAppWP8.Model.GeoDb
#region Property
/// <summary>
/// Gets the Layer of the building
/// </summary>
/// <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>
/// <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>
/// <param name="placeID">the placeId of the place</param>
/// <returns>The place by identifier.</returns>
/// <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)
{
PlaceModel result = null;
@@ -91,6 +88,10 @@ namespace CampusAppWP8.Model.GeoDb
return result;
}
/// <summary> Gets layer key. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="placeId"> Identifier for the place. </param>
/// <returns> The layer key. </returns>
public string GetLayerKey(string placeId)
{
PlaceModel tmpPlace = null;

View File

@@ -1,28 +1,30 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceInformation.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>19.08.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the place information class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System;
using System.Xml.Serialization;
/// <summary>Information about the place.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
/// <summary> Information about the place. </summary>
/// <remarks> Stubbfel, 19.08.2013. </remarks>
/// <seealso cref="T:System.IEquatable{CampusAppWP8.Model.GeoDb.PlaceInformation}"/>
public class PlaceInformation : IEquatable<PlaceInformation>
{
#region Property
/// <summary>Gets or sets the name of the information.</summary>
/// <value>The name of the information.</value>
/// <summary> Gets or sets the name of the information. </summary>
/// <value> The name of the information. </value>
[XmlAttribute("placeInformationName")]
public string InformationName { get; set; }
/// <summary>Gets or sets the information value.</summary>
/// <value>The information value.</value>
/// <summary> Gets or sets the information value. </summary>
/// <value> The information value. </value>
[XmlText]
public string InformationValue { get; set; }
@@ -30,10 +32,10 @@ namespace CampusAppWP8.Model.GeoDb
#region Method
/// <summary>Tests if this PlaceInformation is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place information to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
/// <summary> Tests if this PlaceInformation is considered equal to another. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="other"> The place information to compare to this object. </param>
/// <returns> true if the objects are considered equal, false if they are not. </returns>
public bool Equals(PlaceInformation other)
{
if (other.InformationName.Equals(this.InformationName))

View File

@@ -1,11 +1,11 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the place model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System;
@@ -18,33 +18,30 @@ namespace CampusAppWP8.Model.GeoDb
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Utility;
/// <summary>
/// Model for a place of the SPSService
/// </summary>
/// <summary> Model for a place of the SPSService. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <seealso cref="T:System.IEquatable{CampusAppWP8.Model.GeoDb.PlaceModel}"/>
public class PlaceModel : IEquatable<PlaceModel>
{
#region Property
/// <summary>
/// Gets or sets the placeId
/// </summary>
/// <summary> Gets or sets the placeId. </summary>
/// <value> The identifier of the place. </value>
[XmlAttribute("id")]
public string PlaceId { get; set; }
/// <summary>
/// Gets or sets the id of the "parent" of a place
/// </summary>
/// <summary> Gets or sets the id of the "parent" of a place. </summary>
/// <value> The identifier of the parent. </value>
[XmlAttribute("parentId")]
public string ParentId { get; set; }
/// <summary>
/// Gets or sets the ReferencePoint of a place
/// </summary>
/// <summary> Gets or sets the ReferencePoint of a place. </summary>
/// <value> The reference point. </value>
[XmlAttribute("refpoint")]
public string RefPoint { get; set; }
/// <summary>Gets the geo reference point.</summary>
/// <value>The geo reference point.</value>
/// <summary> Gets the geo reference point. </summary>
/// <value> The geo reference point. </value>
public GeoCoordinate GeoRefPoint
{
get
@@ -77,38 +74,39 @@ namespace CampusAppWP8.Model.GeoDb
}
}
/// <summary>Gets or sets the information.</summary>
/// <value>The information.</value>
/// <summary> Gets or sets the information. </summary>
/// <value> The information. </value>
[XmlElement("placeInformation")]
public ObservableCollection<PlaceInformation> Informations { get; set; }
/// <summary>Gets or sets the services.</summary>
/// <value>The services.</value>
/// <summary> Gets or sets the services. </summary>
/// <value> The services. </value>
[XmlElement("placeService")]
public ObservableCollection<PlaceService> Services { get; set; }
/// <summary>
/// Gets or sets a string, which is the caption of the place (e.g. for contents of UIElements)
/// Gets or sets a string, which is the caption of the place (e.g. for contents of UIElements)
/// </summary>
/// <value> The caption. </value>
public string Caption { get; set; }
#endregion
#region Method
/// <summary>Converts this object to a nfc string.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a string.</returns>
/// <summary> Converts this object to a nfc string. </summary>
/// <remarks> Stubbfel, 21.08.2013. </remarks>
/// <returns> This object as a string. </returns>
public string ToNfcString()
{
string nfcStr = "{\n\"url\":\"http://www.tu-cottbus.de/campusapp\",\n\"pid\":\"" + this.PlaceId + "\",\n\"parent\":\"" + this.ParentId + "\"\n}";
return nfcStr;
}
/// <summary>Tests if this PlaceModel is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place model to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
/// <summary> Tests if this PlaceModel is considered equal to another. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="other"> The place model to compare to this object. </param>
/// <returns> true if the objects are considered equal, false if they are not. </returns>
public bool Equals(PlaceModel other)
{
if (other.PlaceId.Equals(this.PlaceId))
@@ -119,9 +117,9 @@ namespace CampusAppWP8.Model.GeoDb
return false;
}
/// <summary>Adds a place information.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="placeInformations">The place information.</param>
/// <summary> Adds a place information. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="placeInformations"> The place information. </param>
public void AddPlaceInformations(List<PlaceInformation> placeInformations)
{
foreach (PlaceInformation info in placeInformations)
@@ -138,9 +136,9 @@ namespace CampusAppWP8.Model.GeoDb
}
}
/// <summary>Adds a place services.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="placeServices">The place services.</param>
/// <summary> Adds a place services. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="placeServices"> The place services. </param>
public void AddPlaceServices(List<PlaceService> placeServices)
{
foreach (PlaceService service in placeServices)
@@ -158,10 +156,10 @@ namespace CampusAppWP8.Model.GeoDb
}
}
/// <summary>Query if 'names' contains information names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="names">The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
/// <summary> Query if 'names' contains information names. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="names"> The names. </param>
/// <returns> true if it succeeds, false if it fails. </returns>
public bool ContainsInformationNames(List<string> names)
{
foreach (string name in names)
@@ -185,10 +183,10 @@ namespace CampusAppWP8.Model.GeoDb
return true;
}
/// <summary>Query if 'services' contains service names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="services">The services.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
/// <summary> Query if 'services' contains service names. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="services"> The services. </param>
/// <returns> true if it succeeds, false if it fails. </returns>
public bool ContainsServiceNames(List<string> services)
{
foreach (string name in services)
@@ -212,11 +210,10 @@ namespace CampusAppWP8.Model.GeoDb
return true;
}
/// <summary>
/// Method gets the InformationValue of a certain InformationName
/// </summary>
/// <param name="key">string for InformationName</param>
/// <returns>value of the information</returns>
/// <summary> Method gets the InformationValue of a certain InformationName. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="key"> string for InformationName. </param>
/// <returns> value of the information. </returns>
public string GetInformationsValue(string key)
{
foreach (PlaceInformation info in this.Informations)

View File

@@ -1,34 +1,35 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file="PlaceService.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>19.08.2013</sience>
//-----------------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the place service class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System;
using System.Xml.Serialization;
/// <summary>Place service.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
/// <summary> Place service. </summary>
/// <remarks> Stubbfel, 19.08.2013. </remarks>
/// <seealso cref="T:System.IEquatable{CampusAppWP8.Model.GeoDb.PlaceService}"/>
public class PlaceService : IEquatable<PlaceService>
{
#region Property
/// <summary>Gets or sets the name of the service.</summary>
/// <value>The name of the service.</value>
/// <summary> Gets or sets the name of the service. </summary>
/// <value> The name of the service. </value>
[XmlAttribute("placeServiceName")]
public string ServiceName { get; set; }
/// <summary>Gets or sets the SAP of an service.</summary>
/// <value>The sap.</value>
/// <summary> Gets or sets the SAP of an service. </summary>
/// <value> The sap. </value>
[XmlElement("sap")]
public string SAP { get; set; }
/// <summary>Gets or sets the request for a place.</summary>
/// <value>The request.</value>
/// <summary> Gets or sets the request for a place. </summary>
/// <value> The request. </value>
[XmlElement("request")]
public string Request { get; set; }
@@ -36,8 +37,8 @@ namespace CampusAppWP8.Model.GeoDb
#region Method
/// <summary>Gets the URL string.</summary>
/// <value>The URL string.</value>
/// <summary> Gets the URL string. </summary>
/// <value> The URL string. </value>
public string URLString
{
get
@@ -46,10 +47,10 @@ namespace CampusAppWP8.Model.GeoDb
}
}
/// <summary>Tests if this PlaceService is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place service to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
/// <summary> Tests if this PlaceService is considered equal to another. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="other"> The place service to compare to this object. </param>
/// <returns> true if the objects are considered equal, false if they are not. </returns>
public bool Equals(PlaceService other)
{
if (other.ServiceName.Equals(this.ServiceName))

View File

@@ -1,11 +1,11 @@
//-----------------------------------------------------------------------
// <copyright file="SpsModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the sps model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System.Collections.Generic;
@@ -13,16 +13,15 @@ namespace CampusAppWP8.Model.GeoDb
using System.Linq;
using System.Xml.Serialization;
/// <summary>
/// Model for a xml-response of the SPSService
/// </summary>
/// <summary> Model for a xml-response of the SPSService. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
[XmlRoot("root")]
public class SpsModel
{
#region Constructor
/// <summary>Initializes a new instance of the SpsModel class.</summary>
/// <remarks>Stubbfel, 20.08.2013.</remarks>
/// <summary> Initializes a new instance of the SpsModel class. </summary>
/// <remarks> Stubbfel, 20.08.2013. </remarks>
public SpsModel()
{
this.HasChanged = false;
@@ -33,14 +32,13 @@ namespace CampusAppWP8.Model.GeoDb
#region Property
/// <summary>
/// Gets or sets a list of places
/// </summary>
/// <summary> Gets or sets a list of places. </summary>
/// <value> The places. </value>
[XmlElement("place")]
public ObservableCollection<PlaceModel> 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>
/// <summary> Gets or sets a value indicating whether this object has changed. </summary>
/// <value> true if this object has changed, false if not. </value>
public bool HasChanged { get; set; }
#endregion
@@ -48,13 +46,13 @@ namespace CampusAppWP8.Model.GeoDb
#region Method
#region public
/// <summary>Gets places by information.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
/// <param name="query"> The query.</param>
/// <param name="ignoreCases"> (Optional) the ignore cases.</param>
/// <param name="informationNames">(Optional) name of the information.</param>
/// <returns>The places by information.</returns>
/// <summary> Gets places by information. </summary>
/// <remarks> Stubbfel, 19.08.2013. </remarks>
/// <param name="query"> The query. </param>
/// <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)
{
string querryStr = string.Empty;
@@ -71,9 +69,9 @@ namespace CampusAppWP8.Model.GeoDb
return resultplaces;
}
/// <summary>Adds the places.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="places">A list of places.</param>
/// <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)
{
foreach (PlaceModel place in places)
@@ -93,9 +91,9 @@ namespace CampusAppWP8.Model.GeoDb
this.HasChanged = true;
}
/// <summary>Creates PID list.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <returns>The new PID list.</returns>
/// <summary> Creates PID list. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <returns> The new PID list. </returns>
public List<string> CreatePidList()
{
List<string> pidList = new List<string>();
@@ -107,10 +105,10 @@ namespace CampusAppWP8.Model.GeoDb
return pidList;
}
/// <summary>Gets place by identifier.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="id">The identifier.</param>
/// <returns>The place by identifier.</returns>
/// <summary> Gets place by identifier. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="id"> The identifier. </param>
/// <returns> The place by identifier. </returns>
public PlaceModel GetPlaceById(string id)
{
foreach (PlaceModel place in this.Places)
@@ -124,11 +122,11 @@ namespace CampusAppWP8.Model.GeoDb
return null;
}
/// <summary>Query if 'pidList' contains information names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <param name="names"> The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
/// <summary> Query if 'pidList' contains information names. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="pidList"> List of pids. </param>
/// <param name="names"> The names. </param>
/// <returns> true if it succeeds, false if it fails. </returns>
public bool ContainsInformationNames(List<string> pidList, List<string> names)
{
foreach (string pid in pidList)
@@ -143,11 +141,11 @@ namespace CampusAppWP8.Model.GeoDb
return true;
}
/// <summary>Query if 'pidList' contains service names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <param name="names"> The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
/// <summary> Query if 'pidList' contains service names. </summary>
/// <remarks> Stubbfel, 09.09.2013. </remarks>
/// <param name="pidList"> List of pids. </param>
/// <param name="names"> The names. </param>
/// <returns> true if it succeeds, false if it fails. </returns>
public bool ContainsServiceNames(List<string> pidList, List<string> names)
{
foreach (string pid in pidList)
@@ -162,10 +160,10 @@ namespace CampusAppWP8.Model.GeoDb
return true;
}
/// <summary>Filter by PID.</summary>
/// <remarks>Stubbfel, 11.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <returns>filtered list of places.</returns>
/// <summary> Filter by PID. </summary>
/// <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)
{
List<PlaceModel> fitlerList = new List<PlaceModel>();
@@ -190,14 +188,13 @@ namespace CampusAppWP8.Model.GeoDb
#region private
/// <summary>
/// Method check if a certain place matched by query string
/// </summary>
/// <param name="place">the Place</param>
/// <param name="query">the Query</param>
/// <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>
/// <summary> Method check if a certain place matched by query string. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="place"> the Place. </param>
/// <param name="query"> the Query. </param>
/// <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)
{
string queryString = query;

View File

@@ -1,10 +1,11 @@
//-----------------------------------------------------------------------
// <copyright file="LecturePageModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>18.06.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the lecture page model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Lecture
{
using System.Runtime.Serialization;
@@ -12,79 +13,54 @@ namespace CampusAppWP8.Model.Lecture
using CampusAppWP8.Model.Utility;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>
/// Model for the LecturePage
/// </summary>
/// <summary> Model for the LecturePage. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
[DataContract]
public class LecturePageModel
{
#region Members
/// <summary>
/// Variable for the courseIndex
/// </summary>
/// <summary> Variable for the courseIndex. </summary>
[DataMember]
public int selectCourseIndex;
/// <summary>
/// Variable for the degreeIndex
/// </summary>
/// <summary> Variable for the degreeIndex. </summary>
[DataMember]
public int selectDegreeIndex;
/// <summary>
/// Variable for the semesterIndex
/// </summary>
/// <summary> Variable for the semesterIndex. </summary>
[DataMember]
public int selectSemesterIndex;
/// <summary>
/// Variable for the fromIndex
/// </summary>
/// <summary> Variable for the fromIndex. </summary>
[DataMember]
public int selectFromIndex;
/// <summary>
/// Variable for the toIndex
/// </summary>
/// <summary> Variable for the toIndex. </summary>
[DataMember]
public int selectToIndex;
/// <summary>
/// List for the courses of the BTU
/// </summary>
/// <remarks>
/// need to be extend to full list
/// </remarks>
/// <summary> List for the courses of the BTU. </summary>
private CourseListPickerItemListWp8Model courseList;
/// <summary>
/// List of the degrees
/// </summary>
/// <summary> List of the degrees. </summary>
private ListPickerItemListModel degreeList;
/// <summary>
/// List of the semester
/// </summary>
/// <summary> List of the semester. </summary>
private ListPickerItemListModel semesterList;
/// <summary>
/// List for the number of semester (from)
/// </summary>
/// <summary> List for the number of semester (from) </summary>
private ListPickerItemListModel fromNumberList;
/// <summary>
/// List for the number of semester (to)
/// </summary>
/// <summary> List for the number of semester (to) </summary>
private ListPickerItemListModel toNumberList;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="LecturePageModel" /> class.
/// </summary>
/// <summary> Initializes a new instance of the <see cref="LecturePageModel" /> class. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public LecturePageModel()
{
}
@@ -92,23 +68,19 @@ namespace CampusAppWP8.Model.Lecture
#region events
/// <summary>
/// Delegate of the OnIO callback function.
/// </summary>
/// <summary> Delegate of the OnIO callback function. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public delegate void OnIO();
/// <summary>
/// Callback pointer, called after loading.
/// </summary>
/// <summary> Callback pointer, called after loading. </summary>
public event OnIO OnLoaded = null;
#endregion
#region Proberty
/// <summary>
/// Gets or sets the selected course index
/// </summary>
/// <summary> Gets or sets the selected course index. </summary>
/// <value> The select course index. </value>
public int SelectCourseIndex
{
get
@@ -125,9 +97,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets or sets the selected degree index
/// </summary>
/// <summary> Gets or sets the selected degree index. </summary>
/// <value> The select degree index. </value>
public int SelectDegreeIndex
{
get
@@ -144,9 +115,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets or sets the selected semester-index
/// </summary>
/// <summary> Gets or sets the selected semester-index. </summary>
/// <value> The select semester index. </value>
public int SelectSemesterIndex
{
get
@@ -163,9 +133,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets or sets the selected from-index
/// </summary>
/// <summary> Gets or sets the selected from-index. </summary>
/// <value> The select from index. </value>
public int SelectFromIndex
{
get
@@ -182,9 +151,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets or sets the selected to-index
/// </summary>
/// <summary> Gets or sets the selected to-index. </summary>
/// <value> The select to index. </value>
public int SelectToIndex
{
get
@@ -201,9 +169,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets List for the courses of the BTU
/// </summary>
/// <summary> Gets List for the courses of the BTU. </summary>
/// <value> A List of courses. </value>
public ListPickerItemListModel CourseList
{
get
@@ -212,9 +179,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets List of the degrees
/// </summary>
/// <summary> Gets List of the degrees. </summary>
/// <value> A List of degrees. </value>
public ListPickerItemListModel DegreeList
{
get
@@ -223,9 +189,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets List of the semester
/// </summary>
/// <summary> Gets List of the semester. </summary>
/// <value> A List of semesters. </value>
public ListPickerItemListModel SemesterList
{
get
@@ -234,9 +199,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets List for the number of semester
/// </summary>
/// <summary> Gets List for the number of semester (from). </summary>
/// <value> A List of from numbers. </value>
public ListPickerItemListModel FromNumberList
{
get
@@ -245,9 +209,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets the NumberList
/// </summary>
/// <summary> Gets List for the number of semester (to). </summary>
/// <value> A List of to numbers. </value>
public ListPickerItemListModel ToNumberList
{
get
@@ -261,9 +224,8 @@ namespace CampusAppWP8.Model.Lecture
#region public
/// <summary>
/// Load all ListPickerLists
/// </summary>
/// <summary> Load all ListPickerLists. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public void LoadLists()
{
this.courseList = new CourseListPickerItemListWp8Model();
@@ -271,9 +233,8 @@ namespace CampusAppWP8.Model.Lecture
this.courseList.LoadCourseList();
}
/// <summary>
/// Load the NumberList
/// </summary>
/// <summary> Load the NumberList. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public void LoadFromNumberList()
{
string selectValue = null;
@@ -286,9 +247,8 @@ namespace CampusAppWP8.Model.Lecture
this.SelectFromIndex = this.fromNumberList.GetIndexOrDefault(selectValue);
}
/// <summary>
/// Load the NumberList
/// </summary>
/// <summary> Load the NumberList. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public void LoadToNumberList()
{
string selectValue = null;
@@ -305,8 +265,8 @@ namespace CampusAppWP8.Model.Lecture
#region private
/// <summary>Course list is ready.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
/// <summary> Course list is ready. </summary>
/// <remarks> Stubbfel, 10.09.2013. </remarks>
private void CourseListIsReady()
{
this.degreeList = new DegreeListPickerItemListModel();
@@ -324,12 +284,11 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Method create a NumberList
/// </summary>
/// <param name="startvalue">startValue of the list</param>
/// <param name="endvalue">endValue of the list</param>
/// <returns>return list</returns>
/// <summary> Method create a NumberList. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="startvalue"> startValue of the list. </param>
/// <param name="endvalue"> endValue of the list. </param>
/// <returns> return list. </returns>
private ListPickerItemListModel CreateNumberList(int startvalue, int endvalue)
{
ListPickerItemListModel list = new ListPickerItemListModel();

View File

@@ -1,33 +1,34 @@
//-----------------------------------------------------------------------
// <copyright file="LectureWp8Activity.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>13.06.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the lecture wp 8 activity class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Lecture
{
using System.Xml.Serialization;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.Lecture;
using System.Xml.Serialization;
using CampusAppWPortalLib8.Model.Lecture;
/// <summary>
/// Model for a Activity
/// </summary>
/// <summary> Model for a Activity. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Lecture.LectureActivity"/>
public class LectureWp8Activity : LectureActivity
{
#region Members
/// <summary>URL of the icon.</summary>
/// <summary> URL of the icon. </summary>
private string iconUrl;
#endregion
#region Proberty
/// <summary>Gets URL of the icon.</summary>
/// <value>The icon URL.</value>
/// <summary> Gets URL of the icon. </summary>
/// <value> The icon URL. </value>
public string IconUrl
{
get
@@ -37,9 +38,8 @@ namespace CampusAppWP8.Model.Lecture
}
}
/// <summary>
/// Gets or sets the topic of the Lecture
/// </summary>
/// <summary> Gets or sets the topic of the Lecture. </summary>
/// <value> The topic. </value>
[XmlElement("lehrinhalt")]
public new string Topic
{
@@ -62,8 +62,8 @@ namespace CampusAppWP8.Model.Lecture
#region private
/// <summary>Creates icon URL.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
/// <summary> Creates icon URL. </summary>
/// <remarks> Stubbfel, 12.09.2013. </remarks>
private void CreateIconUrl()
{
string typeStr = this.Type;

View File

@@ -1,28 +1,28 @@
//-----------------------------------------------------------------------
// <copyright file="LectureWp8List.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>10.06.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the lecture wp 8 list class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Lecture
{
using System.Linq;
using System.Xml.Serialization;
/// <summary>
/// Model for a List of LectureActivity
/// </summary>
/// <summary> Model for a List of LectureActivity. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Lecture.LectureList{CampusAppWP8.Model.Lecture.LectureWp8Activity}"/>
[XmlRoot("lsf_auszug")]
public class LectureWp8List : CampusAppWPortalLib8.Model.Lecture.LectureList<LectureWp8Activity>
{
#region Methods
/// <summary>
/// Method return a certain activity
/// </summary>
/// <param name="id"> id of the activity</param>
/// <returns> the activity (FirstOrDefault)</returns>
/// <summary> Method return a certain activity. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="id"> id of the activity. </param>
/// <returns> the activity (FirstOrDefault) </returns>
public new LectureWp8Activity GetActivity(int id)
{
LectureWp8Activity activity = this.Activities.Where(p => p.Id == id).FirstOrDefault();

View File

@@ -1,10 +1,11 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file="MainModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>fiedlchr</author>
// <sience>05.07.2013</sience>
//-----------------------------------------------------------------------------
// <date>15.10.2013</date>
// <summary>Implements the main model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model
{
using System;
@@ -13,30 +14,27 @@ namespace CampusAppWP8.Model
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model;
/// <summary>
/// Base model io handling class.
/// </summary>
/// <typeparam name="T">model type</typeparam>
/// <summary> Base model io handling class. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.AbstractMainModel{T}"/>
public abstract class MainModel<T> : AbstractMainModel<T>
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MainModel{T}" /> class.
/// </summary>
/// <param name="modelType">Model IO type</param>
/// <param name="fileName">name of the file</param>
/// <param name="url">url of the feed</param>
/// <summary> Initializes a new instance of the <see cref="MainModel{T}" /> class. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="modelType"> Model IO type. </param>
/// <param name="fileName"> name of the file. </param>
/// <param name="url"> url of the feed. </param>
public MainModel(ModelType modelType, string fileName, string url)
: base(modelType, fileName, url)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="MainModel{T}" /> class.
/// </summary>
/// <param name="modelType">Model IO type</param>
/// <param name="sourceName">name of the file or the url of the feed</param>
/// <summary> Initializes a new instance of the <see cref="MainModel{T}" /> class. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="modelType"> Model IO type. </param>
/// <param name="sourceName"> name of the file or the url of the feed. </param>
public MainModel(ModelType modelType, string sourceName)
: base(modelType, sourceName)
{
@@ -46,31 +44,25 @@ namespace CampusAppWP8.Model
#region Events
/// <summary>
/// Delegate of the IsFileUpToDate callback function.
/// </summary>
/// <param name="model">data model</param>
/// <param name="fileInfo">info of the file</param>
/// <returns>true, is file is up to date</returns>
/// <summary> Delegate of the IsFileUpToDate callback function. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="model"> data model. </param>
/// <param name="fileInfo"> info of the file. </param>
/// <returns> true, is file is up to date. </returns>
public delegate bool IsFileUpToDate(T model, FileInfo fileInfo);
/// <summary>
/// Callback pointer, for checking if file is up to date at loading.
/// </summary>
/// <summary> Callback pointer, for checking if file is up to date at loading. </summary>
public event IsFileUpToDate IsFileUpToDateOnLoad = null;
/// <summary>
/// Callback pointer, for checking if file is up to date at saving.
/// </summary>
/// <summary> Callback pointer, for checking if file is up to date at saving. </summary>
public event IsFileUpToDate IsFileUpToDateOnSave = null;
#endregion
#region property
/// <summary>
/// Gets or sets the file
/// </summary>
/// <summary> Gets the file. </summary>
/// <value> The file. </value>
public new CampusAppWP8.Utility.File File
{
get
@@ -84,9 +76,8 @@ namespace CampusAppWP8.Model
}
}
/// <summary>
/// Gets or sets the api
/// </summary>
/// <summary> Gets the api. </summary>
/// <value> The API. </value>
public new HttpRequest Api
{
get
@@ -105,36 +96,32 @@ namespace CampusAppWP8.Model
#region protected
/// <summary>
/// Method overrides the base CheckLoadFileIsNotUpToDate Method
/// </summary>
/// <returns>true if it is not up-to-date, otherwise false</returns>
/// <summary> Method overrides the base CheckLoadFileIsNotUpToDate Method. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <returns> true if it is not up-to-date, otherwise false. </returns>
protected override bool CheckLoadFileIsNotUpToDate()
{
return this.CheckIsNotUpToDate(this.IsFileUpToDateOnLoad);
}
/// <summary>
/// Method overrides the base CheckSaveFileIsNotUpToDate Method
/// </summary>
/// <returns>true if it is not up-to-date, otherwise false</returns>
/// <summary> Method overrides the base CheckSaveFileIsNotUpToDate Method. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <returns> true if it is not up-to-date, otherwise false. </returns>
protected override bool CheckSaveFileIsNotUpToDate()
{
return this.CheckIsNotUpToDate(this.IsFileUpToDateOnSave);
}
/// <summary>
/// Method overrides the base SendHttpGet Method
/// </summary>
/// <param name="url">the url</param>
/// <summary> Method overrides the base SendHttpGet Method. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="url"> the url. </param>
protected override void SendHttpGet(Uri url)
{
((HttpRequest)this.Api).HttpGet(url, this.OnLoadDataComplete);
}
/// <summary>
/// Initializes the file object.
/// </summary>
/// <summary> Initializes the file object. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
protected override void InitFile()
{
if ((this.IsFile() == true)
@@ -144,9 +131,8 @@ namespace CampusAppWP8.Model
}
}
/// <summary>
/// Initializes the web object.
/// </summary>
/// <summary> Initializes the web object. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
protected override void InitHttpApi()
{
if ((this.IsHttpApi() == true)
@@ -156,9 +142,10 @@ namespace CampusAppWP8.Model
}
}
/// <summary>Check if model or file is not up to date.</summary>
/// <param name="checkFunc">The check function.</param>
/// <returns>true if model or file is not up to date, false if it is.</returns>
/// <summary> Check if model or file is not up to date. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="checkFunc"> The check function. </param>
/// <returns> true if model or file is not up to date, false if it is. </returns>
protected override bool CheckIsNotUpToDate(object checkFunc)
{
bool retValue = false;
@@ -189,11 +176,10 @@ namespace CampusAppWP8.Model
#region private
/// <summary>
/// Is called after the loading from web is complete.
/// </summary>
/// <param name="sender">sending object</param>
/// <param name="e">event args</param>
/// <summary> Is called after the loading from web is complete. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="sender"> sending object. </param>
/// <param name="e"> event args. </param>
private void OnLoadDataComplete(object sender, OpenReadCompletedEventArgs e)
{
Exception downloadError = e.Error;

View File

@@ -1,23 +1,25 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file="PersonFunctionWp8Model.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>05.09.2013</sience>
//-----------------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the person function wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Person
{
using System.Xml.Serialization;
using CampusAppWP8.Utility;
/// <summary>Person function model.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
/// <summary> Person function model. </summary>
/// <remarks> Stubbfel, 05.09.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.PersonFunctionModel"/>
public class PersonFunctionWp8Model : CampusAppWPortalLib8.Model.Person.PersonFunctionModel
{
#region Property
/// <summary>Gets or sets the function.</summary>
/// <value>The function.</value>
/// <summary> Gets or sets the function. </summary>
/// <value> The function. </value>
[XmlAttribute("funktion")]
public new string Function
{
@@ -35,8 +37,8 @@ namespace CampusAppWP8.Model.Person
}
}
/// <summary>Gets or sets the appointment.</summary>
/// <value>The appointment.</value>
/// <summary> Gets or sets the appointment. </summary>
/// <value> The appointment. </value>
[XmlAttribute("einrichtung")]
public new string Appointment
{
@@ -54,8 +56,8 @@ namespace CampusAppWP8.Model.Person
}
}
/// <summary>Gets or sets the building.</summary>
/// <value>The building.</value>
/// <summary> Gets or sets the building. </summary>
/// <value> The building. </value>
[XmlAttribute("gebaeude")]
public new string Building
{

View File

@@ -1,30 +1,27 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file="PersonListWp8Model.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>05.09.2013</sience>
//-----------------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the person list wp 8 model class</summary>
//-----------------------------------------------------------------------
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>
/// <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>
{
/// <summary>Gets a person.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
/// <param name="id">The identifier.</param>
/// <returns>The person.</returns>
/// <summary>Gets a person.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
/// <param name="id">The identifier.</param>
/// <returns>The person.</returns>
/// <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)
@@ -38,9 +35,8 @@ namespace CampusAppWP8.Model.Person
return null;
}
/// <summary>Removes the non function person.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
/// <summary> Removes the non function person. </summary>
/// <remarks> Stubbfel, 05.09.2013. </remarks>
public override void RemoveNonFunctionPerson()
{
List<PersonWp8Model> removeList = new List<PersonWp8Model>();
@@ -58,8 +54,8 @@ namespace CampusAppWP8.Model.Person
}
}
/// <summary>Sets person identifier to function.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
/// <summary> Sets person identifier to function. </summary>
/// <remarks> Stubbfel, 05.09.2013. </remarks>
public override void SetPersonIdToFunction()
{
foreach (PersonWp8Model person in this.Persons)

View File

@@ -1,23 +1,25 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file="PersonWp8Model.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>05.09.2013</sience>
//-----------------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the person wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Person
{
using System.Xml.Serialization;
using CampusAppWP8.Utility;
/// <summary>Person model.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
/// <summary> Person model. </summary>
/// <remarks> Stubbfel, 05.09.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.PersonModel{CampusAppWP8.Model.Person.PersonFunctionWp8Model}"/>
public class PersonWp8Model : CampusAppWPortalLib8.Model.Person.PersonModel<PersonFunctionWp8Model>
{
#region property
/// <summary>Gets or sets the akadgrad.</summary>
/// <value>The akadgrad.</value>
/// <summary> Gets or sets the akadgrad. </summary>
/// <value> The akadgrad. </value>
[XmlAttribute("akadgrad")]
public new string Akadgrad
{
@@ -35,8 +37,8 @@ namespace CampusAppWP8.Model.Person
}
}
/// <summary>Gets or sets the name of the sur.</summary>
/// <value>The name of the sur.</value>
/// <summary> Gets or sets the name of the sur. </summary>
/// <value> The name of the sur. </value>
[XmlAttribute("nachname")]
public new string SurName
{
@@ -54,8 +56,8 @@ namespace CampusAppWP8.Model.Person
}
}
/// <summary>Gets or sets the person's first name.</summary>
/// <value>The name of the first.</value>
/// <summary> Gets or sets the person's first name. </summary>
/// <value> The name of the first. </value>
[XmlAttribute("vorname")]
public new string FirstName
{

View File

@@ -1,35 +1,37 @@
//-----------------------------------------------------------------------
// <copyright file="AppSettings.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the application settings class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Setting
{
using CampusAppWP8.Resources;
/// <summary>
/// Model for settings of the app
/// </summary>
/// <summary> Model for settings of the app. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public class AppSettings
{
#region Enum
/// <summary> Values that represent BTUTagDefaultHandler. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public enum BTUTagDefaultHandler
{
/// <summary> An enum constant representing the information page option. </summary>
InfoPage = 0,
/// <summary> An enum constant representing the campus map option. </summary>
CampusMap = 1
}
#endregion
#region Property
/// <summary>
/// Gets or sets a value indicating whether the GeoWatch-Flag
/// </summary>
/// <summary> Gets or sets a value indicating whether the GeoWatch-Flag. </summary>
/// <value> true if geo watch enable, false if not. </value>
public bool GeoWatchEnable
{
get
@@ -43,9 +45,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>
/// Gets or sets a value indicating whether the InitializationApp-Flag
/// </summary>
/// <summary> Gets or sets a value indicating whether the InitializationApp-Flag. </summary>
/// <value> true if initialise application, false if not. </value>
public bool InitApp
{
get
@@ -59,8 +60,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>Gets or sets a value indicating whether the development mode.</summary>
/// <value>true if development mode, false if not.</value>
/// <summary> Gets or sets a value indicating whether the development mode. </summary>
/// <value> true if development mode, false if not. </value>
public bool DevMode
{
get
@@ -74,8 +75,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>Gets or sets a value indicating whether the uni network.</summary>
/// <value>true if uni network, false if not.</value>
/// <summary> Gets or sets a value indicating whether the uni network. </summary>
/// <value> true if uni network, false if not. </value>
public bool UniNetwork
{
get
@@ -89,8 +90,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>Gets or sets a value indicating whether this object is WiFi enable.</summary>
/// <value>true if WiFi enable, false if not.</value>
/// <summary> Gets or sets a value indicating whether this object is WiFi enable. </summary>
/// <value> true if WiFi enable, false if not. </value>
public bool WifiEnable
{
get
@@ -104,8 +105,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>Gets or sets a value indicating whether the only WiFi.</summary>
/// <value>true if only wifi, false if not.</value>
/// <summary> Gets or sets a value indicating whether the only WiFi. </summary>
/// <value> true if only wifi, false if not. </value>
public bool OnlyWifi
{
get
@@ -119,28 +120,30 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>
/// Gets or sets the DeploymentNumber of the app
/// </summary>
/// <summary> Gets or sets the DeploymentNumber of the app. </summary>
/// <value> The deployment number. </value>
public int DeploymentNumber
{
get
{
return App.LoadFromAppState<int>(Constants.AppSetting_DeploymentNumber);
}
set
{
App.SaveToAppState<int>(Constants.AppSetting_DeploymentNumber,value);
App.SaveToAppState<int>(Constants.AppSetting_DeploymentNumber, value);
}
}
/// <summary> Gets or sets the tag default handler. </summary>
/// <value> The tag default handler. </value>
public BTUTagDefaultHandler TagDefaultHandler
{
get
{
return App.LoadFromAppState<BTUTagDefaultHandler>(Constants.AppSetting_BTUTagDefaultHandler);
}
set
{
App.SaveToAppState<BTUTagDefaultHandler>(Constants.AppSetting_BTUTagDefaultHandler, value);

View File

@@ -0,0 +1,21 @@
//-----------------------------------------------------------------------
// <copyright file="BTUTagHandlerTypes.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 btu tag handler types class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Setting
{
/// <summary> Values that represent BTUTagDefaultHandler. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public enum BTUTagDefaultHandler
{
/// <summary> An enum constant representing the information page option. </summary>
InfoPage = 0,
/// <summary> An enum constant representing the campus map option. </summary>
CampusMap = 1
}
}

View File

@@ -1,25 +1,28 @@
// <copyright file="RoleListPickerItemListModel.cs" company="BTU/IIT">
// Company copyright tag.List
//-----------------------------------------------------------------------
// <copyright file="TagHandlerListPickerItemListModel.cs" company="BTU/IIT">
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>25.07.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the tag handler list picker item list model class</summary>
//-----------------------------------------------------------------------
namespace CampusApp8.Model.Setting
{
using CampusAppWPortalLib8.Model.Utility;
using CampusAppWP8.Model.Setting;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>
/// Class for the RoleList
/// </summary>
/// <summary> A data Model for the tag handler list picker item list. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel"/>
public class TagHandlerListPickerItemListModel : ListPickerItemListModel
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="RoleListPickerItemListModel" /> class.
/// Initializes a new instance of the TagHandlerListPickerItemListModel class.
/// </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public TagHandlerListPickerItemListModel()
: base()
{
@@ -30,9 +33,9 @@ namespace CampusApp8.Model.Setting
#region Method
/// <summary>
/// Overrides the LoadList-Method <see cref="ListPickerItemListModel"/>
/// </summary>
/// <summary> Overrides the LoadList-Method <see cref="ListPickerItemListModel"/> </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <seealso cref="M:CampusAppWPortalLib8.Model.Utility.ListPickerItemListModel.LoadList()"/>
protected override void LoadList()
{
this.AddItem(new ListPickerItemModel(AppSettings.BTUTagDefaultHandler.InfoPage.ToString(), AppResources.Setting_TagHandlerInfo));

View File

@@ -1,46 +1,39 @@
//-----------------------------------------------------------------------
// <copyright file="UserProfilModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>23.07.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the user profil model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Setting
{
using System.Xml.Serialization;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Settings;
/// <summary>
/// Model for the profile of an user
/// </summary>
/// <summary> Model for the profile of an user. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
[XmlRoot("root")]
public class UserProfilModel
{
#region Members
/// <summary>
/// constant for the first validate semester
/// </summary>
/// <summary> constant for the first validate semester. </summary>
private static readonly int FirstSemester = int.Parse(Constants.Valid_FirstSemseter);
/// <summary>
/// constant for the last validate semester
/// </summary>
/// <summary> constant for the last validate semester. </summary>
private static readonly int LastSemester = int.Parse(Constants.Valid_LastSemseter);
/// <summary>
/// constant for the max. number of a validate course
/// </summary>
/// <summary> constant for the max. number of a validate course. </summary>
private static readonly int MaxCourseNumber = int.Parse(Constants.Valid_MaxCourseNumber);
#endregion
#region Proberties
/// <summary>
/// Gets or sets the course of the user
/// </summary>
/// <summary> Gets or sets the course of the user. </summary>
/// <value> The course. </value>
public int Course
{
get
@@ -57,9 +50,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>
/// Gets or sets the defaultCampus of the user
/// </summary>
/// <summary> Gets or sets the defaultCampus of the user. </summary>
/// <value> The default campus. </value>
public Campus DefaultCampus
{
get
@@ -73,9 +65,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>
/// Gets or sets the role of the user
/// </summary>
/// <summary> Gets or sets the role of the user. </summary>
/// <value> The role. </value>
public RoleType Role
{
get
@@ -89,9 +80,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>
/// Gets or sets the degree of the user
/// </summary>
/// <summary> Gets or sets the degree of the user. </summary>
/// <value> The degree. </value>
public DegreeType Degree
{
get
@@ -105,9 +95,8 @@ namespace CampusAppWP8.Model.Setting
}
}
/// <summary>
/// Gets or sets the semester of the user
/// </summary>
/// <summary> Gets or sets the semester of the user. </summary>
/// <value> The semester. </value>
public int Semester
{
get
@@ -127,11 +116,10 @@ namespace CampusAppWP8.Model.Setting
#region Methods
/// <summary>
/// Methods check if a value could be a valid semester
/// </summary>
/// <param name="possibleSemester">value which has to be checked</param>
/// <returns>true if it is an valid semester, otherwise false</returns>
/// <summary> Methods check if a value could be a valid semester. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="possibleSemester"> value which has to be checked. </param>
/// <returns> true if it is an valid semester, otherwise false. </returns>
private bool ValditateSemester(int possibleSemester)
{
if (possibleSemester < UserProfilModel.FirstSemester || possibleSemester > UserProfilModel.LastSemester)
@@ -142,11 +130,10 @@ namespace CampusAppWP8.Model.Setting
return true;
}
/// <summary>
/// Methods check if a value could be a valid course
/// </summary>
/// <param name="possibleCourse">value which has to be checked</param>
/// <returns>true if it is an valid course, otherwise false</returns>
/// <summary> Methods check if a value could be a valid course. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <param name="possibleCourse"> value which has to be checked. </param>
/// <returns> true if it is an valid course, otherwise false. </returns>
private bool ValditateCourse(int possibleCourse)
{
if (possibleCourse > UserProfilModel.MaxCourseNumber)

View File

@@ -1,9 +1,11 @@
// <copyright file="CourseListPickerItemListWp8Model.cs" company="BTU/IIT">
// Company copyright tag.List
//-----------------------------------------------------------------------
// <copyright file="CourseListPickerItemListWp8Model.cs" company="BTU/IIT">
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>stubbfel</author>
// <sience>25.07.2013</sience>
//----------------------------------------------------------------------
// <author>Stubbfel</author>
// <date>15.10.2013</date>
// <summary>Implements the course list picker item list wp 8 model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model.Utility
{
using System.Collections.Generic;
@@ -12,14 +14,14 @@ namespace CampusAppWP8.Model.Utility
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>
/// This is a class for the courseList
/// </summary>
/// <summary> This is a class for the courseList. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.CourseListPickerItemListModel"/>
public class CourseListPickerItemListWp8Model : CampusAppWPortalLib8.Model.Utility.CourseListPickerItemListModel
{
#region Member
/// <summary>List of courses.</summary>
/// <summary> List of courses. </summary>
private CourseFeed courseList;
#endregion
@@ -27,8 +29,9 @@ namespace CampusAppWP8.Model.Utility
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="CourseListPickerItemListWp8Model" /> class.
/// Initializes a new instance of the <see cref="CourseListPickerItemListWp8Model" /> class.
/// </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public CourseListPickerItemListWp8Model()
{
}
@@ -37,14 +40,11 @@ namespace CampusAppWP8.Model.Utility
#region Events
/// <summary>
/// Delegate of the OnIO callback function.
/// </summary>
/// <summary> Delegate of the OnIO callback function. </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public delegate void OnIO();
/// <summary>
/// Callback pointer, called after loading.
/// </summary>
/// <summary> Callback pointer, called after loading. </summary>
public event OnIO OnLoaded = null;
#endregion
@@ -53,9 +53,8 @@ namespace CampusAppWP8.Model.Utility
#region public
/// <summary>
/// Overrides the LoadList-Method <see cref="ListPickerItemListModel"/>
/// </summary>
/// <summary> Overrides the LoadList-Method <see cref="ListPickerItemListModel"/> </summary>
/// <remarks> Stubbfel, 15.10.2013. </remarks>
public void LoadCourseList()
{
if (this.courseList == null || this.courseList.Model == null)
@@ -76,25 +75,25 @@ namespace CampusAppWP8.Model.Utility
#region private
/// <summary>Feed is fail.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
/// <summary> Feed is fail. </summary>
/// <remarks> Stubbfel, 10.09.2013. </remarks>
private void FeedIsFail()
{
this.FallBackList();
this.CallOnLoaded();
}
/// <summary>Feed is ready.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
/// <summary> Feed is ready. </summary>
/// <remarks> Stubbfel, 10.09.2013. </remarks>
private void FeedIsReady()
{
this.ConvertToListPickerItemModel(this.courseList.Model.CreateCourseList());
this.CallOnLoaded();
}
/// <summary>Converts a courseList to a list picker item model.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
/// <param name="courseList">List of courses.</param>
/// <summary> Converts a courseList to a list picker item model. </summary>
/// <remarks> Stubbfel, 10.09.2013. </remarks>
/// <param name="courseList"> List of courses. </param>
private void ConvertToListPickerItemModel(List<CourseModel> courseList)
{
foreach (CourseModel course in courseList)
@@ -106,8 +105,8 @@ namespace CampusAppWP8.Model.Utility
this.courseList.SaveData();
}
/// <summary>Call on loaded.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
/// <summary> Call on loaded. </summary>
/// <remarks> Stubbfel, 10.09.2013. </remarks>
private void CallOnLoaded()
{
if (this.OnLoaded != null)

View File

@@ -1,31 +1,31 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file="XmlModel.cs" company="BTU/IIT">
// Company copyright tag.
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>fiedlchr</author>
// <sience>05.07.2013</sience>
//-----------------------------------------------------------------------------
// <date>15.10.2013</date>
// <summary>Implements the XML model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWP8.Model
{
using System.Text;
using CampusAppWPortalLib8.Utility;
using CampusAppWPortalLib8.Model;
using CampusAppWPortalLib8.Resources;
/// <summary>
/// Xml model io handler class.
/// </summary>
/// <typeparam name="T">model type</typeparam>
/// <summary> Xml model io handler class. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <seealso cref="T:CampusAppWP8.Model.MainModel{T}"/>
/// <seealso cref="T:CampusAppWPortalLib8.Model.IXmlModel"/>
public abstract class XmlModel<T> : MainModel<T>, IXmlModel
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="XmlModel{T}" /> class.
/// </summary>
/// <param name="modelType">model io type</param>
/// <param name="fileName">filename of the data file</param>
/// <param name="url">url of the feed data</param>
/// <summary> Initializes a new instance of the <see cref="XmlModel{T}" /> class. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="modelType"> model io type. </param>
/// <param name="fileName"> filename of the data file. </param>
/// <param name="url"> url of the feed data. </param>
public XmlModel(ModelType modelType, string fileName, string url)
: base(modelType, fileName, url)
{
@@ -33,11 +33,12 @@ namespace CampusAppWP8.Model
}
/// <summary>
/// Initializes a new instance of the <see cref="XmlModel{T}" /> class.
/// Use only if the model io type is file or feed, not both.
/// Initializes a new instance of the <see cref="XmlModel{T}" /> class. Use only if the model
/// io type is file or feed, not both.
/// </summary>
/// <param name="modelType">model io type</param>
/// <param name="sourceName">name of the file or the url of the feed</param>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="modelType"> model io type. </param>
/// <param name="sourceName"> name of the file or the url of the feed. </param>
public XmlModel(ModelType modelType, string sourceName)
: base(modelType, sourceName)
{
@@ -48,20 +49,18 @@ namespace CampusAppWP8.Model
#region Property
/// <summary>
/// Gets or sets for the name of the root-tag
/// </summary>
/// <summary> Gets or sets for the name of the root-tag. </summary>
/// <seealso cref="P:CampusAppWPortalLib8.Model.IXmlModel.ValidRootName"/>
public string ValidRootName { get; set; }
#endregion
#region Method
/// <summary>
/// Create the model from a xml byte array.
/// </summary>
/// <param name="modelData">model data</param>
/// <returns>true, if succeeded</returns>
/// <summary> Create the model from a xml byte array. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <param name="modelData"> model data. </param>
/// <returns> true, if succeeded. </returns>
protected override bool DeserializeModel(byte[] modelData)
{
bool retValue = true;
@@ -81,10 +80,9 @@ namespace CampusAppWP8.Model
return retValue;
}
/// <summary>
/// Serializes the model to a byte array.
/// </summary>
/// <returns>model data</returns>
/// <summary> Serializes the model to a byte array. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
/// <returns> model data. </returns>
protected override byte[] SerializeModel()
{
byte[] retValue = null;

View File

@@ -41,7 +41,7 @@
<StackPanel Grid.Row="1">
<toolkit:ToggleSwitch Name="OnlyWiFiToggle" Content="{Binding Path=LocalizedResources.Setting_AppOnlyWifi, Source={StaticResource LocalizedStrings}}"></toolkit:ToggleSwitch>
</StackPanel>
<StackPanel Grid.Row="2">
<StackPanel Grid.Row="2" Margin="12,0,0,0">
<TextBlock Text="{Binding Path=LocalizedResources.Setting_TagHandler, Source={StaticResource LocalizedStrings}}"/>
<toolkit:ListPicker Name="TagHandler" ExpansionMode="FullScreenOnly" FullModeHeader="{Binding Path=LocalizedResources.ListPickerHeaderTag, Source={StaticResource LocalizedStrings}}" >
<toolkit:ListPicker.ItemTemplate>