Merge branch 'feature/#251' into develop
Conflicts: CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CampusSpsApi.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>12.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the campus sps API class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Api.GeoApi
|
||||
{
|
||||
using System;
|
||||
@@ -12,16 +13,15 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for SPSAPI
|
||||
/// </summary>
|
||||
/// <summary> Class for SPSAPI. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Api.GeoApi.SpsApi"/>
|
||||
public class CampusSpsApi : SpsApi
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CampusSpsApi" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="CampusSpsApi" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public CampusSpsApi()
|
||||
: base()
|
||||
{
|
||||
@@ -32,18 +32,18 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method set the UriParameter of a campusRequest for a given latitude and longitude
|
||||
/// Method set the UriParameter of a campusRequest for a given latitude and longitude.
|
||||
/// </summary>
|
||||
/// <param name="lat">latitude parameter</param>
|
||||
/// <param name="log">longitude parameter</param>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="lat"> latitude parameter. </param>
|
||||
/// <param name="log"> longitude parameter. </param>
|
||||
public void SetupCampusRequest(string lat, string log)
|
||||
{
|
||||
this.SetupPlaceRequest(lat, log, Constants.SpsApi_CampusDomain);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the UriParameter of a campusRequest for the actualPosition
|
||||
/// </summary>
|
||||
/// <summary> Method set the UriParameter of a campusRequest for the actualPosition. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public void SetupCurrentCampusRequest()
|
||||
{
|
||||
Utilities.DetermineAndStoreCurrentPosition();
|
||||
@@ -52,10 +52,9 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
this.SetupCampusRequest(lat, log);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method return the campus of the placeList
|
||||
/// </summary>
|
||||
/// <returns>actual campus</returns>
|
||||
/// <summary> Method return the campus of the placeList. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <returns> actual campus. </returns>
|
||||
public CampusAppWPortalLib8.Model.Settings.Campus GetCampus()
|
||||
{
|
||||
if (this.Model == null)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PisApi.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>09.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the pis API class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Api.GeoApi
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
@@ -15,14 +15,15 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
using CampusAppWPortalLib8.Model;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary>Pis api.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <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>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the PisApi class.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the PisApi class. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
public PisApi()
|
||||
: base(ModelType.Feed, Constants.UrlPisService)
|
||||
{
|
||||
@@ -32,10 +33,10 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Sets up the information request.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="pidList"> List of pids.</param>
|
||||
/// <param name="infoNames">(Optional) list of names of the information.</param>
|
||||
/// <summary> Sets up the information request. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="pidList"> List of pids. </param>
|
||||
/// <param name="infoNames"> (Optional) list of names of the information. </param>
|
||||
public void SetupInformationRequest(List<string> pidList, List<string> infoNames = null)
|
||||
{
|
||||
string pidListStr = string.Empty;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PssApi.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>09.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the pss API class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Api.GeoApi
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
@@ -15,14 +15,15 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
using CampusAppWPortalLib8.Model;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary>Pss api.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <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>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the PssApi class.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the PssApi class. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
public PssApi()
|
||||
: base(ModelType.Feed, Constants.UrlPssService)
|
||||
{
|
||||
@@ -32,10 +33,10 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Sets up the service request.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="pidList"> List of pids.</param>
|
||||
/// <param name="serviceNames">(Optional) list of names of the services.</param>
|
||||
/// <summary> Sets up the service request. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="pidList"> List of pids. </param>
|
||||
/// <param name="serviceNames"> (Optional) list of names of the services. </param>
|
||||
public void SetupServiceRequest(List<string> pidList, List<string> serviceNames = null)
|
||||
{
|
||||
string pidListStr = string.Empty;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="SpsApi.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>06.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the sps API class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Api.GeoApi
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
@@ -15,16 +16,15 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
using CampusAppWPortalLib8.Model;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for SPSAPI
|
||||
/// </summary>
|
||||
/// <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>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SpsApi" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="SpsApi" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public SpsApi()
|
||||
: base(ModelType.Feed, Constants.UrlSpsService)
|
||||
{
|
||||
@@ -35,11 +35,12 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method set the UriParameter of a placeRequest for a given latitude and longitude
|
||||
/// Method set the UriParameter of a placeRequest for a given latitude and longitude.
|
||||
/// </summary>
|
||||
/// <param name="lat">latitude of the place</param>
|
||||
/// <param name="log">longitude of the place</param>
|
||||
/// <param name="domian">request domain</param>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="lat"> latitude of the place. </param>
|
||||
/// <param name="log"> longitude of the place. </param>
|
||||
/// <param name="domian"> (Optional) request domain. </param>
|
||||
public void SetupPlaceRequest(string lat, string log, string domian = null)
|
||||
{
|
||||
List<UrlParamModel> parameterList = new List<UrlParamModel>();
|
||||
@@ -53,9 +54,9 @@ namespace CampusAppWP8.Api.GeoApi
|
||||
this.SetUriParams(parameterList);
|
||||
}
|
||||
|
||||
/// <summary>Sets up the current place request.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="domian">(Optional) request domain.</param>
|
||||
/// <summary> Sets up the current place request. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="domian"> (Optional) request domain. </param>
|
||||
public void SetupCurrentPlaceRequest(string domian = null)
|
||||
{
|
||||
Utilities.DetermineAndStoreCurrentPosition();
|
||||
|
||||
@@ -1,30 +1,27 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureApi.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>14.10.2013</date>
|
||||
// <summary>Implements the lecture API class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Api.Lecture
|
||||
{
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the feed of the Lecture
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// need the XmlAPI
|
||||
/// </remarks>
|
||||
|
||||
/// <summary> Class for the feed of the Lecture. </summary>
|
||||
/// <remarks> need the XmlAPI. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.Lecture.LectureWp8List}"/>
|
||||
public class LectureApi : XmlModel<LectureWp8List>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureApi" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LectureApi" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public LectureApi()
|
||||
: base(ModelType.Feed, Constants.UrlLecture_ApiBaseAddr)
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PersonSearchApi.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>14.10.2013</date>
|
||||
// <summary>Implements the person search API class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Api.Person
|
||||
{
|
||||
using CampusAppWP8.Model;
|
||||
@@ -13,14 +13,15 @@ namespace CampusAppWP8.Api.Person
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>Person search api.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <summary> Person search api. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.Person.PersonListWp8Model}"/>
|
||||
public class PersonSearchApi : XmlModel<PersonListWp8Model>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the PersonSearchApi class.</summary>
|
||||
/// <remarks>Stubbfel, 05.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the PersonSearchApi class. </summary>
|
||||
/// <remarks> Stubbfel, 05.09.2013. </remarks>
|
||||
public PersonSearchApi()
|
||||
: base(ModelType.Feed, Constants.UrlPerson_PersonSearchByName)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
@@ -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" />
|
||||
@@ -200,7 +201,9 @@
|
||||
<Compile Include="Feed\StudentCouncil\StudentCouncilFeed.cs" />
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="Model\Campusmap\MapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\MapPinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\MapPinModel.cs">
|
||||
<ExcludeFromStyleCop>False</ExcludeFromStyleCop>
|
||||
</Compile>
|
||||
<Compile Include="Model\Lecture\LectureWp8Activity.cs" />
|
||||
<Compile Include="Model\Lecture\LectureWp8List.cs" />
|
||||
<Compile Include="Model\Lecture\LecturePageModel.cs" />
|
||||
@@ -432,8 +435,6 @@
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Assets\psd\holo_optionsbuttons.psd" />
|
||||
<None Include="Assets\psd\iconbutton_effects2.psd" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\AppManifest.xml" />
|
||||
<None Include="Properties\WMAppManifest.xml">
|
||||
@@ -445,7 +446,6 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\AlignmentGrid.png" />
|
||||
<Content Include="Assets\ApplicationIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -543,24 +543,6 @@
|
||||
<Content Include="Assets\Lens.Screen-WXGA.png" />
|
||||
<Content Include="Assets\Maps\IKMZ.png" />
|
||||
<Content Include="Assets\Maps\MZG.png" />
|
||||
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileMediumLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\kachel_large.png" />
|
||||
<Content Include="Assets\Tiles\kachel_medium.png" />
|
||||
<Content Include="Assets\Tiles\kachel_small.png" />
|
||||
<Content Include="File\Campusmap\BuildingsMaps.xml" />
|
||||
<Content Include="File\Campusmap\Offlinemap.xml">
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DepartmentFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the department feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Departments
|
||||
{
|
||||
using System;
|
||||
@@ -14,18 +15,17 @@ namespace CampusAppWP8.Feed.Departments
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
using CampusAppWPortalLib8.Model.Departments;
|
||||
|
||||
/// <summary>
|
||||
/// Feed class for the department information.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Feed class for the department information. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWPortalLib8.Model.Departments.DepartmentModel}"/>
|
||||
public class DepartmentFeed : XmlModel<DepartmentModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DepartmentFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="autoLoad">automatic loading of the data</param>
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="DepartmentFeed" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="autoLoad"> (Optional) automatic loading of the data. </param>
|
||||
public DepartmentFeed(bool autoLoad = true)
|
||||
: base(ModelType.FileAndFeed, Constants.FileDepartment_Name, Constants.UrlDepartment_Addr)
|
||||
{
|
||||
@@ -44,11 +44,10 @@ namespace CampusAppWP8.Feed.Departments
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(DepartmentModel model)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -65,12 +64,11 @@ namespace CampusAppWP8.Feed.Departments
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <param name="info"> file info object. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnLoad(DepartmentModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -87,12 +85,11 @@ namespace CampusAppWP8.Feed.Departments
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <param name="info"> file info object. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnSave(DepartmentModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -112,10 +109,10 @@ namespace CampusAppWP8.Feed.Departments
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>Check if the model or file is up-to-date.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <param name="lastModified">Date of the last modification.</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false.</returns>
|
||||
/// <summary> Check if the model or file is up-to-date. </summary>
|
||||
/// <remarks> fiedlchr, 12.09.2013. </remarks>
|
||||
/// <param name="lastModified"> Date of the last modification. </param>
|
||||
/// <returns> true, if is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 30);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="EventFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the event feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Events
|
||||
{
|
||||
using System;
|
||||
@@ -15,17 +16,16 @@ namespace CampusAppWP8.Feed.Events
|
||||
using CampusAppWPortalLib8.Model.RSS;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>
|
||||
/// Event Feed.
|
||||
/// </summary>
|
||||
/// <summary> Event Feed. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWPortalLib8.Model.RSS.RSSViewModel}"/>
|
||||
public class EventFeed : XmlModel<RSSViewModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EventFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="autoLoad">automatic loading of the data</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="EventFeed" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="autoLoad"> (Optional) automatic loading of the data. </param>
|
||||
public EventFeed(bool autoLoad = true)
|
||||
: base(ModelType.FileAndFeed, Constants.FileEvents_Name, CampusAppWPortalLib8.Resources.Constants.UrlEvents_Addr)
|
||||
{
|
||||
@@ -43,11 +43,10 @@ namespace CampusAppWP8.Feed.Events
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/> </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(RSSViewModel model)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -64,12 +63,11 @@ namespace CampusAppWP8.Feed.Events
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/> </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <param name="info"> file info object. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnLoad(RSSViewModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -86,12 +84,11 @@ namespace CampusAppWP8.Feed.Events
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/> </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <param name="info"> file info object. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnSave(RSSViewModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -111,10 +108,10 @@ namespace CampusAppWP8.Feed.Events
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>Check if the model or file is up-to-date.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <param name="lastModified">Date of the last modification.</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false.</returns>
|
||||
/// <summary> Check if the model or file is up-to-date. </summary>
|
||||
/// <remarks> fiedlchr, 12.09.2013. </remarks>
|
||||
/// <param name="lastModified"> Date of the last modification. </param>
|
||||
/// <returns> true, if is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 1.0);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ExamFeed.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>14.10.2013</date>
|
||||
// <summary>Implements the exam feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Exams
|
||||
{
|
||||
using System.IO;
|
||||
@@ -14,14 +15,15 @@ namespace CampusAppWP8.Feed.Exams
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>Exam feed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Exam feed. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.Exams.ExamListWp8Model}"/>
|
||||
public class ExamFeed : XmlModel<ExamListWp8Model>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the ExamFeed class.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the ExamFeed class. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
public ExamFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileExamApp_ExamFeed, Constants.UrlExamApp_ExamFeed)
|
||||
{
|
||||
@@ -35,10 +37,10 @@ namespace CampusAppWP8.Feed.Exams
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Check is model up to date.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <param name="model">The model.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
/// <summary> Check is model up to date. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
/// <param name="model"> The model. </param>
|
||||
/// <returns> true if it succeeds, false if it fails. </returns>
|
||||
private bool CheckIsModelUpToDate(ExamListWp8Model model)
|
||||
{
|
||||
if (model == null)
|
||||
@@ -49,11 +51,11 @@ namespace CampusAppWP8.Feed.Exams
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Check is file up to date.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <param name="model"> The model.</param>
|
||||
/// <param name="fileInfo">Information describing the file.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
/// <summary> Check is file up to date. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
/// <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(ExamListWp8Model model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ClubLinkFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the club link feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Link
|
||||
{
|
||||
using System;
|
||||
@@ -15,16 +16,15 @@ namespace CampusAppWP8.Feed.Link
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for ClubLinkFeeds
|
||||
/// </summary>
|
||||
/// <summary> This Class is for ClubLinkFeeds. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWPortalLib8.Model.Link.LinkListModel}"/>
|
||||
public class ClubLinkFeed : XmlModel<LinkListModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClubLinkFeed" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="ClubLinkFeed" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public ClubLinkFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileLink_ClubLinks, Constants.UrlLink_ClubLinks)
|
||||
{
|
||||
@@ -37,11 +37,10 @@ namespace CampusAppWP8.Feed.Link
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedModel is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(LinkListModel model)
|
||||
{
|
||||
if (model == null)
|
||||
@@ -53,12 +52,11 @@ namespace CampusAppWP8.Feed.Link
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedFile is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <param name="fileInfo"> info about the file. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
@@ -70,11 +68,10 @@ namespace CampusAppWP8.Feed.Link
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
/// <summary> Check if the model or file is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="lastModified"> Date of the last modification. </param>
|
||||
/// <returns> true, if is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CommonLinkFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the common link feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Link
|
||||
{
|
||||
using System;
|
||||
@@ -15,16 +16,15 @@ namespace CampusAppWP8.Feed.Link
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for CommonLinkFeeds
|
||||
/// </summary>
|
||||
/// <summary> This Class is for CommonLinkFeeds. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWPortalLib8.Model.Link.LinkListModel}"/>
|
||||
public class CommonLinkFeed : XmlModel<LinkListModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CommonLinkFeed" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="CommonLinkFeed" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public CommonLinkFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileLink_CommonLinks, Constants.UrlLink_CommonLinks)
|
||||
{
|
||||
@@ -37,11 +37,10 @@ namespace CampusAppWP8.Feed.Link
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedModel is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(LinkListModel model)
|
||||
{
|
||||
if (model == null)
|
||||
@@ -53,12 +52,11 @@ namespace CampusAppWP8.Feed.Link
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedFile is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <param name="fileInfo"> info about the file. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
@@ -70,11 +68,10 @@ namespace CampusAppWP8.Feed.Link
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
/// <summary> Check if the model or file is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="lastModified"> Date of the last modification. </param>
|
||||
/// <returns> true, if is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MensaFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the mensa feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Mensa
|
||||
{
|
||||
using System;
|
||||
@@ -13,18 +14,17 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
using CampusAppWPortalLib8.Model.Mensa;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for MensaFeeds
|
||||
/// </summary>
|
||||
/// <summary> This Class is for MensaFeeds. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWPortalLib8.Model.Mensa.MenuWeekModel}"/>
|
||||
public abstract class MensaFeed : XmlModel<MenuWeekModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MensaFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="fileName">name of the file</param>
|
||||
/// <param name="feedUrl">url of the feed</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="MensaFeed" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="fileName"> name of the file. </param>
|
||||
/// <param name="feedUrl"> url of the feed. </param>
|
||||
protected MensaFeed(string fileName, string feedUrl)
|
||||
: base(ModelType.FileAndFeed, fileName, feedUrl)
|
||||
{
|
||||
@@ -37,8 +37,8 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the title.</summary>
|
||||
/// <value>The title.</value>
|
||||
/// <summary> Gets the title. </summary>
|
||||
/// <value> The title. </value>
|
||||
public string Title { get; protected set; }
|
||||
|
||||
#endregion
|
||||
@@ -47,11 +47,10 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method creates a MensaFeed depends of certain Campus
|
||||
/// </summary>
|
||||
/// <param name="campus"> camus parameter </param>
|
||||
/// <returns> the correct mensaFeed</returns>
|
||||
/// <summary> Method creates a MensaFeed depends of certain Campus. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="campus"> camus parameter. </param>
|
||||
/// <returns> the correct mensaFeed. </returns>
|
||||
public static MensaFeed CreateCampusMensaFeed(CampusAppWPortalLib8.Model.Settings.Campus campus)
|
||||
{
|
||||
switch (campus)
|
||||
@@ -73,11 +72,10 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
|
||||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedModel is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(MenuWeekModel model)
|
||||
{
|
||||
if (model == null)
|
||||
@@ -89,12 +87,11 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedFile is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <param name="fileInfo"> info about the file. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDate(MenuWeekModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
@@ -106,11 +103,10 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the last modification was later as the NewMenuWeekDay
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the last modification was later as the NewMenuWeekDay. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="lastModified"> Date of the last modification. </param>
|
||||
/// <returns> true, if is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
int diff = lastModified.CompareTo(MenuWeekModel.CalcFirstWeekDay());
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MensaFeedCBMain.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>12.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the mensa feed cb main class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Mensa
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// MensaFeed for main campus of cottbus
|
||||
/// </summary>
|
||||
/// <summary> MensaFeed for main campus of cottbus. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Feed.Mensa.MensaFeed"/>
|
||||
public class MensaFeedCBMain : MensaFeed
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MensaFeedCBMain" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="MensaFeedCBMain" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public MensaFeedCBMain()
|
||||
: base(Constants.FileMensa_Shedule_CBMain, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBMain)
|
||||
{
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MensaFeedCBNorth.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>12.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the mensa feed cb north class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Mensa
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// MensaFeed for main campus of cottbus
|
||||
/// </summary>
|
||||
/// <summary> MensaFeed for main campus of cottbus. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Feed.Mensa.MensaFeed"/>
|
||||
public class MensaFeedCBNorth : MensaFeed
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MensaFeedCBNorth" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="MensaFeedCBNorth" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public MensaFeedCBNorth()
|
||||
: base(Constants.FileMensa_Shedule_CBNorth, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBNorth)
|
||||
{
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MensaFeedCBSouth.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>12.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the mensa feed cb south class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Mensa
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// MensaFeed for main campus of cottbus
|
||||
/// </summary>
|
||||
/// <summary> MensaFeed for main campus of cottbus. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Feed.Mensa.MensaFeed"/>
|
||||
public class MensaFeedCBSouth : MensaFeed
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MensaFeedCBSouth" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="MensaFeedCBSouth" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public MensaFeedCBSouth()
|
||||
: base(Constants.FileMensa_Shedule_CBSouth, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBSouth)
|
||||
{
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MensaFeedSBFMain.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>12.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the mensa feed sbf main class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Mensa
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// MensaFeed for main campus of cottbus
|
||||
/// </summary>
|
||||
/// <summary> MensaFeed for main campus of cottbus. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Feed.Mensa.MensaFeed"/>
|
||||
public class MensaFeedSBFMain : MensaFeed
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MensaFeedSBFMain" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="MensaFeedSBFMain" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public MensaFeedSBFMain()
|
||||
: base(Constants.FileMensa_Shedule_SBFMain, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_SBFMain)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NewsFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the news feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.News
|
||||
{
|
||||
using System;
|
||||
@@ -15,17 +16,16 @@ namespace CampusAppWP8.Feed.News
|
||||
using CampusAppWPortalLib8.Model.RSS;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>
|
||||
/// News Feed.
|
||||
/// </summary>
|
||||
/// <summary> News Feed. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWPortalLib8.Model.RSS.RSSViewModel}"/>
|
||||
public class NewsFeed : XmlModel<RSSViewModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NewsFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="autoLoad">automatic loading of the data</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="NewsFeed" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="autoLoad"> (Optional) automatic loading of the data. </param>
|
||||
public NewsFeed(bool autoLoad = true)
|
||||
: base(ModelType.FileAndFeed, Constants.FileNews_Name, CampusAppWPortalLib8.Resources.Constants.UrlNews_Addr)
|
||||
{
|
||||
@@ -43,11 +43,10 @@ namespace CampusAppWP8.Feed.News
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/> </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(RSSViewModel model)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -64,12 +63,11 @@ namespace CampusAppWP8.Feed.News
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">info object of the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/> </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <param name="info"> info object of the file. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnLoad(RSSViewModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -84,13 +82,12 @@ namespace CampusAppWP8.Feed.News
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">info object of the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
|
||||
/// <summary> Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/> </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <param name="info"> info object of the file. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnSave(RSSViewModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -110,10 +107,10 @@ namespace CampusAppWP8.Feed.News
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>Check if the model or file is up-to-date.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <param name="lastModified">Date of the last modification.</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false.</returns>
|
||||
/// <summary> Check if the model or file is up-to-date. </summary>
|
||||
/// <remarks> fiedlchr, 12.09.2013. </remarks>
|
||||
/// <param name="lastModified"> Date of the last modification. </param>
|
||||
/// <returns> true, if is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 1.0);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the openinghours feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Openinghours
|
||||
{
|
||||
using System;
|
||||
@@ -14,17 +15,16 @@ namespace CampusAppWP8.Feed.Openinghours
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for MesaFeeds
|
||||
/// </summary>
|
||||
|
||||
/// <summary> This Class is for MesaFeeds. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWP8.Model.Openinghours.OpeninghoursWp8Model}"/>
|
||||
public class OpeninghoursFeed : XmlModel<OpeninghoursWp8Model>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursFeed" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="OpeninghoursFeed" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
public OpeninghoursFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileOpeningHours_OpeningHours, Constants.UrlOpeningHours_OpeningHours)
|
||||
{
|
||||
@@ -37,11 +37,10 @@ namespace CampusAppWP8.Feed.Openinghours
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedModel is up-to-date. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(OpeninghoursWp8Model model)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -58,12 +57,11 @@ namespace CampusAppWP8.Feed.Openinghours
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="info">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedFile is up-to-date. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <param name="info"> info about the file. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnLoad(OpeninghoursWp8Model model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -79,12 +77,11 @@ namespace CampusAppWP8.Feed.Openinghours
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="info">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedFile is up-to-date. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <param name="info"> info about the file. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnSave(OpeninghoursWp8Model model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -103,10 +100,10 @@ namespace CampusAppWP8.Feed.Openinghours
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>Check if the model or file is up-to-date.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <param name="lastModified">Date of the last modification.</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false.</returns>
|
||||
/// <summary> Check if the model or file is up-to-date. </summary>
|
||||
/// <remarks> fiedlchr, 12.09.2013. </remarks>
|
||||
/// <param name="lastModified"> Date of the last modification. </param>
|
||||
/// <returns> true, if is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0);
|
||||
|
||||
@@ -15,16 +15,15 @@ namespace CampusAppWP8.Feed.StudentCouncil
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWPortalLib8.Model;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for StudentCouncilFeed
|
||||
/// </summary>
|
||||
/// <summary> This Class is for StudentCouncilFeed. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWPortalLib8.Model.StudentCouncil.StudentCouncilListModel}"/>
|
||||
public class StudentCouncilFeed : XmlModel<StudentCouncilListModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilFeed" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="StudentCouncilFeed" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public StudentCouncilFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileStudentCouncil_StudentCouncils, Constants.UrlStudentCouncil_StudentCouncils)
|
||||
{
|
||||
@@ -37,11 +36,10 @@ namespace CampusAppWP8.Feed.StudentCouncil
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedModel is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(StudentCouncilListModel model)
|
||||
{
|
||||
if (model == null)
|
||||
@@ -53,12 +51,11 @@ namespace CampusAppWP8.Feed.StudentCouncil
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method check if the FeedFile is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="model"> reference of the FeedModel. </param>
|
||||
/// <param name="fileInfo"> info about the file. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDate(StudentCouncilListModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
@@ -70,11 +67,10 @@ namespace CampusAppWP8.Feed.StudentCouncil
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
/// <summary> Check if the model or file is up-to-date. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="lastModified"> Date of the last modification. </param>
|
||||
/// <returns> true, if is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0);
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CourseFeed.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>14.10.2013</date>
|
||||
// <summary>Implements the course feed class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Utility
|
||||
{
|
||||
using CampusAppWP8.Feed.Exams;
|
||||
|
||||
/// <summary>Course Feed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Course Feed. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Feed.Exams.ExamFeed"/>
|
||||
public class CourseFeed : ExamFeed
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DepartmentFavoriteFile.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>01.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the department favorite file class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.File.Departments
|
||||
{
|
||||
using System.IO;
|
||||
@@ -13,16 +14,16 @@ namespace CampusAppWP8.File.Departments
|
||||
using CampusAppWPortalLib8.Model;
|
||||
using CampusAppWPortalLib8.Model.Departments;
|
||||
|
||||
/// <summary>
|
||||
/// Feed object to handle favorite department feeds.
|
||||
/// </summary>
|
||||
/// <summary> Feed object to handle favorite department feeds. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.XmlModel{CampusAppWPortalLib8.Model.Departments.DepartmentModel}"/>
|
||||
public class DepartmentFavoriteFile : XmlModel<DepartmentModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the DepartmentFavoriteFile class.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <param name="autoLoad">(Optional) the automatic load.</param>
|
||||
/// <summary> Initializes a new instance of the DepartmentFavoriteFile class. </summary>
|
||||
/// <remarks> fiedlchr, 12.09.2013. </remarks>
|
||||
/// <param name="autoLoad"> (Optional) the automatic load. </param>
|
||||
public DepartmentFavoriteFile(bool autoLoad = true)
|
||||
: base(ModelType.File, Constants.FileDepartment_Favorite_Name, string.Empty)
|
||||
{
|
||||
@@ -40,11 +41,10 @@ namespace CampusAppWP8.File.Departments
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <returns> true, if model is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsModelUpToDate(DepartmentModel model)
|
||||
{
|
||||
bool retValue = true;
|
||||
@@ -59,12 +59,11 @@ namespace CampusAppWP8.File.Departments
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <param name="info"> file info object. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnLoad(DepartmentModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = false;
|
||||
@@ -77,12 +76,11 @@ namespace CampusAppWP8.File.Departments
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
/// <summary> Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>. </summary>
|
||||
/// <remarks> fiedlchr, 14.10.2013. </remarks>
|
||||
/// <param name="model"> model object. </param>
|
||||
/// <param name="info"> file info object. </param>
|
||||
/// <returns> true, if file is up-to-date, otherwise false. </returns>
|
||||
private bool CheckIsFileUpToDateOnSave(DepartmentModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = false;
|
||||
|
||||
@@ -1,34 +1,35 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ExamFile.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>14.10.2013</date>
|
||||
// <summary>Implements the exam file class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.File.Exams
|
||||
{
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using Windows.Storage;
|
||||
|
||||
/// <summary>Exam file.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <summary> Exam file. </summary>
|
||||
/// <remarks> Stubbfel, 03.09.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.BinaryModel"/>
|
||||
public class ExamFile : BinaryModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The storage file.</summary>
|
||||
/// <summary> The storage file. </summary>
|
||||
private StorageFile storageFile;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the ExamFile class.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="fileName">Filename of the file.</param>
|
||||
/// <param name="url"> URL of the document.</param>
|
||||
/// <summary> Initializes a new instance of the ExamFile class. </summary>
|
||||
/// <remarks> Stubbfel, 03.09.2013. </remarks>
|
||||
/// <param name="fileName"> Filename of the file. </param>
|
||||
/// <param name="url"> URL of the document. </param>
|
||||
public ExamFile(string fileName, string url)
|
||||
: base(CampusAppWPortalLib8.Model.ModelType.FileAndFeed, fileName, url)
|
||||
{
|
||||
@@ -46,6 +47,9 @@ namespace CampusAppWP8.File.Exams
|
||||
/// <summary>Executes the file operation.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
#pragma warning disable 4014
|
||||
|
||||
/// <summary> Executes the file operation. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public async void LaunchFile()
|
||||
{
|
||||
if (this.storageFile == null)
|
||||
@@ -62,8 +66,8 @@ namespace CampusAppWP8.File.Exams
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>Saves the and launch file.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <summary> Saves the and launch file. </summary>
|
||||
/// <remarks> Stubbfel, 03.09.2013. </remarks>
|
||||
public void SaveAndLaunchFile()
|
||||
{
|
||||
if (this.File.Exist())
|
||||
@@ -79,10 +83,10 @@ namespace CampusAppWP8.File.Exams
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>Check is model up to date.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="model">The model.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
/// <summary> Check is model up to date. </summary>
|
||||
/// <remarks> Stubbfel, 03.09.2013. </remarks>
|
||||
/// <param name="model"> The model. </param>
|
||||
/// <returns> true if it succeeds, false if it fails. </returns>
|
||||
private bool CheckIsModelUpToDate(byte[] model)
|
||||
{
|
||||
if (model == null)
|
||||
@@ -93,11 +97,11 @@ namespace CampusAppWP8.File.Exams
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Check is file up to date.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="model"> The model.</param>
|
||||
/// <param name="fileInfo">Information describing the file.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
/// <summary> Check is file up to date. </summary>
|
||||
/// <remarks> Stubbfel, 03.09.2013. </remarks>
|
||||
/// <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(byte[] model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1 || model != null)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PlacesFile.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>09.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the places file class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.File.Places
|
||||
{
|
||||
using CampusAppWP8.Model;
|
||||
@@ -13,14 +13,15 @@ namespace CampusAppWP8.File.Places
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>Places file.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <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>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the PlacesFile class.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the PlacesFile class. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
public PlacesFile()
|
||||
: base(CampusAppWPortalLib8.Model.ModelType.File, Constants.FilePlace_AllPlaces)
|
||||
{
|
||||
@@ -33,11 +34,11 @@ namespace CampusAppWP8.File.Places
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Check is file up to date.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="model"> The model.</param>
|
||||
/// <param name="fileInfo">Information describing the file.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
/// <summary> Check is file up to date. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <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)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1 || (model != null && model.HasChanged))
|
||||
@@ -48,9 +49,8 @@ namespace CampusAppWP8.File.Places
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method load OfflineMap as Fallback
|
||||
/// </summary>
|
||||
/// <summary> Method load OfflineMap as Fallback. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public void FallBackLoad()
|
||||
{
|
||||
SpsModel fallBackModel = XmlManager.DeserializationFileToModel<SpsModel>(Constants.FileMap_OfflineMap);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,25 +1,35 @@
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="BuildingMapModel.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 building map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.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
|
||||
{
|
||||
/// <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);
|
||||
if (buildings == null)
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
this.ImageSource = building.GetInformationsValue("ImageSource");
|
||||
@@ -29,7 +39,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageWidth = tmpVal;
|
||||
}
|
||||
|
||||
if (double.TryParse(building.GetInformationsValue("ImageHeight"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal))
|
||||
if (double.TryParse(building.GetInformationsValue("ImageHeight"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal))
|
||||
{
|
||||
this.ImageHeight = tmpVal;
|
||||
}
|
||||
@@ -52,6 +62,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
double x;
|
||||
double y;
|
||||
|
||||
@@ -60,7 +71,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
return;
|
||||
}
|
||||
|
||||
this.RefPoint = new Point(x,y);
|
||||
this.RefPoint = new Point(x, y);
|
||||
|
||||
if (double.TryParse(building.GetInformationsValue("ScaleX"), NumberStyles.Number, CultureInfo.InvariantCulture, out tmpVal))
|
||||
{
|
||||
@@ -74,7 +85,6 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
this.GeoOffsetX = building.GeoRefPoint.Longitude;
|
||||
this.GeoOffsetY = building.GeoRefPoint.Latitude;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,37 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CBMainMapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the main map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
using CampusAppWP8.File.Places;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using System.Collections.Generic;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MapModel of the mainCampus of cottbus
|
||||
/// </summary>
|
||||
/// <summary> Class for the MapModel of the mainCampus of cottbus. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.CampusMapModel"/>
|
||||
public class CBMainMapModel : CampusMapModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>Variable for the identify of the campus.</summary>
|
||||
/// <summary> Variable for the identify of the campus. </summary>
|
||||
private static readonly string Campus = ((int)CampusAppWPortalLib8.Model.Settings.Campus.CB_MAIN).ToString();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CBMainMapModel" /> class.
|
||||
/// </summary>
|
||||
public CBMainMapModel(List<PlaceModel> placeList) : base (placeList,CBMainMapModel.Campus)
|
||||
/// <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)
|
||||
: base(placeList, CBMainMapModel.Campus)
|
||||
{
|
||||
this.ImageSource = Constants.FileMap_CBMainMap;
|
||||
this.ImageWidth = 2000;
|
||||
|
||||
@@ -1,31 +1,25 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="CBMainMapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CBMainMapRoomModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the main map room model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MapModel of the mainCampus of cottbus
|
||||
/// </summary>
|
||||
/// <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
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CampusMapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>26.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the campus map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the CampusMapModel
|
||||
/// </summary>
|
||||
/// <summary> Class for the CampusMapModel. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.MapModel"/>
|
||||
public class CampusMapModel : MapModel
|
||||
{
|
||||
#region constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CampusMapModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="placeList">list of places</param>
|
||||
/// <param name="campusId">id of the campus</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="CampusMapModel" /> class. </summary>
|
||||
/// <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)
|
||||
{
|
||||
this.CampusId = campusId;
|
||||
@@ -30,6 +29,8 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.IsReady = true;
|
||||
}
|
||||
|
||||
/// <summary> Initializes a new instance of the CampusMapModel class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public CampusMapModel()
|
||||
{
|
||||
}
|
||||
@@ -38,18 +39,17 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
#region property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the campusId
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the campusId. </summary>
|
||||
/// <value> The identifier of the campus. </value>
|
||||
public string CampusId { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region method
|
||||
|
||||
/// <summary>Loads the spatial./.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="placeList">list of places</param>
|
||||
/// <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)
|
||||
{
|
||||
List<PlaceModel> campusPlaces = new List<PlaceModel>();
|
||||
|
||||
@@ -1,42 +1,39 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ClickAblePlacePinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>26.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the click able place pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
|
||||
/// <summary>
|
||||
/// abstract class for click abel bins
|
||||
/// </summary>
|
||||
/// <summary> abstract class for click abel bins. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.MapPinModel"/>
|
||||
public abstract class ClickAblePlacePinModel : MapPinModel
|
||||
{
|
||||
#region property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Callback Function, to show place information of the Pin
|
||||
/// </summary>
|
||||
/// <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; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets place which are associative with this pin
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets place which are associative with this pin. </summary>
|
||||
/// <value> The associated places. </value>
|
||||
public List<PlaceModel> AssocPlaces { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Show Information of this pin places
|
||||
/// </summary>
|
||||
/// <param name="sender">sender of the Event</param>
|
||||
/// <param name="e">MouseButtonEvent Arguments</param>
|
||||
/// <summary> Show Information of this pin places. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="sender"> sender of the Event. </param>
|
||||
/// <param name="e"> MouseButtonEvent Arguments. </param>
|
||||
public void ShowInfo(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
this.CallBack(this.AssocPlaces);
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CurrentPositionPinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>27.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the current position pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Current position pin model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Current position pin model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.MapPinModel"/>
|
||||
public class CurrentPositionPinModel : MapPinModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the CurrentPositionPinModel class.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the CurrentPositionPinModel class. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
public CurrentPositionPinModel()
|
||||
{
|
||||
this.ImageSource = Icons.CurrentPosition;
|
||||
@@ -26,7 +27,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -25;
|
||||
this.PinImageOffsetY = -34;
|
||||
this.Tag = MapPinModel.CurrendPositionPlacePinString;
|
||||
this.Tag = MapPinModel.CurrentPositionPlacePinString;
|
||||
this.ZIndex = 3;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="HiddenPinPlaceModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>13.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the hidden pin place model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
/// <summary>Hidden pin place model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Hidden pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.MapPinModel"/>
|
||||
public class HiddenPinPlaceModel : MapPinModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HiddenPinPlaceModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public HiddenPinPlaceModel()
|
||||
{
|
||||
this.Tag = MapPinModel.HiddenPlacePinString;
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="InfoLabPlacePinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>27.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information lab place pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Search pin place model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.InfoPlacePinModel"/>
|
||||
public class InfoLabPlacePinModel : InfoPlacePinModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InfoPlacePinModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the <see cref="InfoPlacePinModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
public InfoLabPlacePinModel()
|
||||
{
|
||||
this.ImageSource = Icons.PlaceLab;
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="InfoLabPlacePinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// <copyright file="InfoPlaceAccessPinModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>27.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information place access pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Search pin place model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.InfoPlacePinModel"/>
|
||||
public class InfoPlaceAccessPinModel : InfoPlacePinModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InfoPlacePinModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the <see cref="InfoPlacePinModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
public InfoPlaceAccessPinModel()
|
||||
{
|
||||
this.ImageSource = Icons.PlaceInfoAccess;
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="InfoPlacePinModel.cs" company="BTU/IIT">
|
||||
// BTU/IIT
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>27.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information place pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Search pin place model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.ClickAblePlacePinModel"/>
|
||||
public class InfoPlacePinModel : ClickAblePlacePinModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InfoPlacePinModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the <see cref="InfoPlacePinModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
public InfoPlacePinModel()
|
||||
{
|
||||
this.ImageSource = Icons.PlaceInfo;
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="InfoLabPlacePinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// <copyright file="InfoPlaceWCPinModel.cs" company="BTU/IIT">
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>27.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the information place wc pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Search pin place model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.InfoPlacePinModel"/>
|
||||
public class InfoPlaceWCPinModel : InfoPlacePinModel
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InfoPlacePinModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the InfoPlaceWCPinModel class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public InfoPlaceWCPinModel()
|
||||
{
|
||||
this.ImageSource = Icons.PlaceInfoWc;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the map model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System;
|
||||
@@ -15,25 +16,22 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
using System.Windows.Media.Imaging;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
|
||||
/// <summary>
|
||||
/// This Class manage the properties of a Map
|
||||
/// </summary>
|
||||
/// <summary> This Class manage the properties of a Map. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public class MapModel
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MapModel" /> class.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <param name="placeList">list of places</param>
|
||||
/// <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<PlaceModel> placeList)
|
||||
{
|
||||
this.IsReady = false;
|
||||
@@ -45,77 +43,63 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
#region Events
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for MapInfo
|
||||
/// </summary>
|
||||
/// <param name="places">list of places</param>
|
||||
/// <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);
|
||||
|
||||
/// <summary>
|
||||
/// Event ShowMapInfo
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// <summary> Gets or sets the spatial of the map. </summary>
|
||||
/// <value> The spatial. </value>
|
||||
public SpsModel Spatial { get; set; }
|
||||
|
||||
#endregion
|
||||
@@ -124,23 +108,20 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate the coordinates of ScrollToOffsets point
|
||||
/// </summary>
|
||||
/// <param name="point">input point</param>
|
||||
/// <returns>point (in pixel)</returns>
|
||||
/// <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>
|
||||
/// <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;
|
||||
@@ -149,13 +130,13 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
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>
|
||||
/// <param name="y"> the y-coordinate.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="places">list of places</param>
|
||||
/// <returns>image of the pin.</returns>
|
||||
/// <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>
|
||||
/// <param name="y"> the y-coordinate. </param>
|
||||
/// <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)
|
||||
{
|
||||
Point position = new Point(x, y);
|
||||
@@ -166,12 +147,12 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// Method create in image, which can show at a certain position depend of the
|
||||
/// <see cref="RefPoint" />
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="x"> the x-coordinate.</param>
|
||||
/// <param name="y"> the y-coordinate.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="places">list of places</param>
|
||||
/// <returns>image of the pin.</returns>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <param name="x"> the x-coordinate. </param>
|
||||
/// <param name="y"> the y-coordinate. </param>
|
||||
/// <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)
|
||||
{
|
||||
Point position = new Point(this.RefPoint.X + x, this.RefPoint.Y - y);
|
||||
@@ -182,22 +163,22 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// Method create in image, which can show at a certain position depend of the
|
||||
/// <see cref="RefPoint" />
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="position">input point.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="places">list of places</param>
|
||||
/// <returns>image of the pin.</returns>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <param name="position"> input point. </param>
|
||||
/// <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)
|
||||
{
|
||||
return this.AddPinFromRefPoint(position.X, position.Y, type, places);
|
||||
}
|
||||
|
||||
/// <summary>Method create in image, which can show at a certain position.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="position">input point.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="places">list of places</param>
|
||||
/// <returns>image of the pin.</returns>
|
||||
/// <summary> Method create in image, which can show at a certain position. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <param name="position"> input point. </param>
|
||||
/// <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)
|
||||
{
|
||||
Image pinImg = new Image();
|
||||
@@ -216,43 +197,40 @@ 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>
|
||||
/// <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>
|
||||
/// <param name="point">not scaled point</param>d
|
||||
/// <returns>Point in pixel-size</returns>
|
||||
/// <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>
|
||||
/// <param name="x">the x-coordinate</param>
|
||||
/// <param name="y">the y-coordinate</param>
|
||||
/// <returns>Point in pixel-size</returns>
|
||||
/// <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>
|
||||
/// <param name="point">not scaled point</param>
|
||||
/// <returns>Point in pixel-size</returns>
|
||||
/// <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);
|
||||
@@ -262,9 +240,9 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>Loads the spatial./</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="placeList">list of places</param>
|
||||
/// <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();
|
||||
@@ -275,12 +253,12 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>Creates a pin.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="places">list of places</param>
|
||||
/// <param name="pinImg">image of the pin</param>
|
||||
/// <returns>The new pin.</returns>
|
||||
/// <summary> Creates a pin. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <param name="type"> The type. </param>
|
||||
/// <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)
|
||||
{
|
||||
MapPinModel pin;
|
||||
|
||||
@@ -1,67 +1,56 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapPinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the map pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This Class manage the properties of a MapPin
|
||||
/// </summary>
|
||||
/// <summary> This Class manage the properties of a MapPin. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public abstract class MapPinModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// String for info pins
|
||||
/// </summary>
|
||||
/// <summary> String for info pins. </summary>
|
||||
private static string infoPlacePinString = MapPinModel.PinTypeToString(PinType.InfoPlace);
|
||||
|
||||
/// <summary>
|
||||
/// String for info pins
|
||||
/// </summary>
|
||||
/// <summary> String for info pins. </summary>
|
||||
private static string infoLabPlacePinString = MapPinModel.PinTypeToString(PinType.InfoLabPlace);
|
||||
|
||||
/// <summary>
|
||||
/// String for hidden pins
|
||||
/// </summary>
|
||||
/// <summary> String for hidden pins. </summary>
|
||||
private static string hiddenPlacePinString = MapPinModel.PinTypeToString(PinType.Hidden);
|
||||
|
||||
/// <summary>
|
||||
/// String for search pins
|
||||
/// </summary>
|
||||
/// <summary> String for search pins. </summary>
|
||||
private static string searchPlacePinString = MapPinModel.PinTypeToString(PinType.SearchPlace);
|
||||
|
||||
/// <summary>
|
||||
/// String for current position pins
|
||||
/// </summary>
|
||||
private static string currendPositionPlacePinString = MapPinModel.PinTypeToString(PinType.CurrentPosition);
|
||||
/// <summary> String for current position pins. </summary>
|
||||
private static string currentPositionPlacePinString = MapPinModel.PinTypeToString(PinType.CurrentPosition);
|
||||
|
||||
/// <summary> The information wc place pin string. </summary>
|
||||
private static string infoWcPlacePinString = MapPinModel.PinTypeToString(PinType.InfoWcPlace);
|
||||
|
||||
/// <summary> The information access place pin string. </summary>
|
||||
private static string infoAccesPlacePinString = MapPinModel.PinTypeToString(PinType.InfoAccesPlace);
|
||||
|
||||
/// <summary> The information red place pin string. </summary>
|
||||
private static string infoRedPlacePinString = MapPinModel.PinTypeToString(PinType.InfoRedPlace);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Variable of the actual position of the pin
|
||||
/// </summary>
|
||||
/// <summary> Variable of the actual position of the pin. </summary>
|
||||
private Point position;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MapPinModel" /> class.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="MapPinModel" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
public MapPinModel()
|
||||
{
|
||||
}
|
||||
@@ -69,8 +58,9 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
#endregion
|
||||
|
||||
#region enums
|
||||
/// <summary>Values that represent PinType.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
|
||||
/// <summary> Values that represent PinType. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
public enum PinType
|
||||
{
|
||||
/// <summary>An enum constant representing the hidden option.</summary>
|
||||
@@ -84,100 +74,105 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
|
||||
/// <summary>An enum constant representing the info place option.</summary>
|
||||
InfoPlace = 3,
|
||||
|
||||
/// <summary> An enum constant representing the information lab place option. </summary>
|
||||
InfoLabPlace = 4,
|
||||
|
||||
/// <summary> An enum constant representing the information wc place option. </summary>
|
||||
InfoWcPlace = 5,
|
||||
|
||||
/// <summary> An enum constant representing the information red place option. </summary>
|
||||
InfoRedPlace = 6,
|
||||
|
||||
/// <summary> An enum constant representing the information access place option. </summary>
|
||||
InfoAccesPlace = 7
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary> Gets the information red place pin string. </summary>
|
||||
/// <value> The information red place pin string. </value>
|
||||
public static string InfoRedPlacePinString
|
||||
{
|
||||
get { return MapPinModel.infoRedPlacePinString; }
|
||||
}
|
||||
|
||||
/// <summary> Gets the information access place pin string. </summary>
|
||||
/// <value> The information access place pin string. </value>
|
||||
public static string InfoAccesPlacePinString
|
||||
{
|
||||
get { return MapPinModel.infoAccesPlacePinString; }
|
||||
}
|
||||
|
||||
/// <summary> Gets the information wc place pin string. </summary>
|
||||
/// <value> The information wc place pin string. </value>
|
||||
public static string InfoWcPlacePinString
|
||||
{
|
||||
get { return MapPinModel.infoWcPlacePinString; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the string of current position pins
|
||||
/// </summary>
|
||||
public static string CurrendPositionPlacePinString
|
||||
/// <summary> Gets the string of current position pins. </summary>
|
||||
/// <value> The current position place pin string. </value>
|
||||
public static string CurrentPositionPlacePinString
|
||||
{
|
||||
get { return MapPinModel.currendPositionPlacePinString; }
|
||||
get { return MapPinModel.currentPositionPlacePinString; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the string of search pins
|
||||
/// </summary>
|
||||
/// <summary> Gets the string of search pins. </summary>
|
||||
/// <value> The search place pin string. </value>
|
||||
public static string SearchPlacePinString
|
||||
{
|
||||
get { return MapPinModel.searchPlacePinString; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the string of hidden pins
|
||||
/// </summary>
|
||||
/// <summary> Gets the string of hidden pins. </summary>
|
||||
/// <value> The hidden place pin string. </value>
|
||||
public static string HiddenPlacePinString
|
||||
{
|
||||
get { return MapPinModel.hiddenPlacePinString; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the string of info pins
|
||||
/// </summary>
|
||||
/// <summary> Gets the string of info pins. </summary>
|
||||
/// <value> The information place pin string. </value>
|
||||
public static string InfoPlacePinString
|
||||
{
|
||||
get { return MapPinModel.infoPlacePinString; }
|
||||
}
|
||||
|
||||
/// <summary> Gets the information lab place pin string. </summary>
|
||||
/// <value> The information lab place pin string. </value>
|
||||
public static string InfoLabPlacePinString
|
||||
{
|
||||
get { return MapPinModel.infoLabPlacePinString; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageSource of the pin
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the ImageSource of the pin. </summary>
|
||||
/// <value> The image source. </value>
|
||||
public string ImageSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageWidth of the pin
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the ImageWidth of the pin. </summary>
|
||||
/// <value> The width of the image. </value>
|
||||
public double ImageWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageHeight of the pin
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the ImageHeight of the pin. </summary>
|
||||
/// <value> The height of the image. </value>
|
||||
public double ImageHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ZIndex of the pin
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the ZIndex of the pin. </summary>
|
||||
/// <value> The z coordinate index. </value>
|
||||
public int ZIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetX of the pin
|
||||
/// </summary>
|
||||
/// <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 ImageOffsetY of the pin
|
||||
/// </summary>
|
||||
/// <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 position of the pin
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets position of the pin. </summary>
|
||||
/// <value> The position. </value>
|
||||
public Point Position
|
||||
{
|
||||
get
|
||||
@@ -213,20 +208,18 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tag of the pin
|
||||
/// </summary>
|
||||
/// <summary> Gets or sets the tag of the pin. </summary>
|
||||
/// <value> The tag. </value>
|
||||
public object Tag { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method convert PinType to a string
|
||||
/// </summary>
|
||||
/// <param name="type">type of the Pin</param>
|
||||
/// <returns>PinType as string</returns>
|
||||
/// <summary> Method convert PinType to a string. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="type"> type of the Pin. </param>
|
||||
/// <returns> PinType as string. </returns>
|
||||
public static string PinTypeToString(PinType type)
|
||||
{
|
||||
string result = null;
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="SearchPlacePinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>27.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>14.10.2013</date>
|
||||
// <summary>Implements the search place pin model class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Search pin place model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Search pin place model. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWP8.Model.Campusmap.ClickAblePlacePinModel"/>
|
||||
public class SearchPlacePinModel : ClickAblePlacePinModel
|
||||
{
|
||||
#region Constructor
|
||||
@@ -19,7 +20,7 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SearchPlacePinModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
public SearchPlacePinModel()
|
||||
{
|
||||
this.ImageSource = Icons.SearchPlace;
|
||||
|
||||
@@ -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>
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="BTUTagInfo.xaml.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 info.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.BTTTag
|
||||
{
|
||||
using System;
|
||||
@@ -6,15 +13,21 @@ namespace CampusAppWP8.Pages.BTTTag
|
||||
using CampusApp8.Model.Setting;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary> Information about the btu tag. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class BTUTagInfo : PhoneApplicationPage
|
||||
{
|
||||
|
||||
#region Member
|
||||
/// <summary> The taghandler model. </summary>
|
||||
private TagHandlerListPickerItemListModel taghandlerModel;
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary> Initializes a new instance of the BTUTagInfo class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public BTUTagInfo()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -28,10 +41,9 @@ namespace CampusAppWP8.Pages.BTTTag
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedFrom method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedFrom method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CampusMapPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>13.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the campus map page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
using System;
|
||||
@@ -29,51 +30,43 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
/// <summary>Class for the campusMap page.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <summary> Class for the campusMap page. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class CampusMapPage : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The device.</summary>
|
||||
/// <summary> The device. </summary>
|
||||
private readonly ProximityDevice device = ProximityDevice.GetDefault();
|
||||
|
||||
/// <summary>Variable for the map model.</summary>
|
||||
/// <summary> Variable for the map model. </summary>
|
||||
private CampusMapModel campusMap;
|
||||
|
||||
/// <summary>
|
||||
/// Variable for the PlaceFile
|
||||
/// </summary>
|
||||
/// <summary> Variable for the PlaceFile. </summary>
|
||||
private PlacesFile file;
|
||||
|
||||
/// <summary>
|
||||
/// List of information names
|
||||
/// </summary>
|
||||
/// <summary> List of information names. </summary>
|
||||
private List<string> informationsNames;
|
||||
|
||||
/// <summary>
|
||||
/// Flag which indicates if an qrCode scan is running
|
||||
/// </summary>
|
||||
/// <summary> Flag which indicates if an qrCode scan is running. </summary>
|
||||
private bool qrcodeScan = false;
|
||||
|
||||
/// <summary>
|
||||
/// Variable for the last query
|
||||
/// </summary>
|
||||
/// <summary> Variable for the last query. </summary>
|
||||
private string lastQuery;
|
||||
|
||||
/// <summary>
|
||||
/// Flag which indicates the map show information of all buildings
|
||||
/// </summary>
|
||||
/// <summary> Flag which indicates the map show information of all buildings. </summary>
|
||||
private bool buildInfoEnable;
|
||||
|
||||
/// <summary> Identifier for the ndef. </summary>
|
||||
private long ndefId;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="CampusMapPage" /> class.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the <see cref="CampusMapPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
public CampusMapPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -110,15 +103,12 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
#region Events
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for LoadingPlace events
|
||||
/// </summary>
|
||||
/// <param name="args">the events args</param>
|
||||
/// <summary> Delegate for LoadingPlace events. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="args"> the events args. </param>
|
||||
public delegate void LoadingPlace(string args);
|
||||
|
||||
/// <summary>
|
||||
/// Event for loading places
|
||||
/// </summary>
|
||||
/// <summary> Event for loading places. </summary>
|
||||
public event LoadingPlace OnLoadingPlace;
|
||||
|
||||
#endregion
|
||||
@@ -127,9 +117,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>Methods overrides the OnNavigatedTo-Method.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="e">some NavigationEventArgs.</param>
|
||||
/// <summary> Methods overrides the OnNavigatedTo-Method. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -189,10 +179,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedFrom-Method
|
||||
/// </summary>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
/// <summary> Methods overrides the OnNavigatedFrom-Method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
this.device.StopSubscribingForMessage(ndefId);
|
||||
@@ -205,21 +194,19 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Method set the lastQuery and register to OnLoadingPlace-Event
|
||||
/// </summary>
|
||||
/// <param name="query">the query string</param>
|
||||
/// <param name="action">the event callback</param>
|
||||
/// <summary> Method set the lastQuery and register to OnLoadingPlace-Event. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="query"> the query string. </param>
|
||||
/// <param name="action"> the event callback. </param>
|
||||
private void SetLastQuery(string query, Action<string> action)
|
||||
{
|
||||
this.lastQuery = query;
|
||||
this.OnLoadingPlace = new CampusMapPage.LoadingPlace(action);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method shows certain places as hidden Pin
|
||||
/// </summary>
|
||||
/// <param name="query">the query string</param>
|
||||
/// <summary> Method shows certain places as hidden Pin. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="query"> the query string. </param>
|
||||
private void ShowPlacesByQueryAsHiddenPin(string query)
|
||||
{
|
||||
if (!this.IsMapReady())
|
||||
@@ -232,10 +219,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method shows certain places as search Pin
|
||||
/// </summary>
|
||||
/// <param name="query">the query string</param>
|
||||
/// <summary> Method shows certain places as search Pin. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="query"> the query string. </param>
|
||||
private void ShowPlacesByQueryAsSearchPin(string query)
|
||||
{
|
||||
if (!this.IsMapReady())
|
||||
@@ -254,32 +240,33 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method show all places, which match with the query as a pin
|
||||
/// </summary>
|
||||
/// <param name="query">the query string</param>
|
||||
/// <param name="pintype">the type of the pin</param>
|
||||
/// <param name="allPlaces">if its true then send query to the place file otherwise to the CampusMapModel</param>
|
||||
/// <summary> Method show all places, which match with the query as a pin. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="query"> the query string. </param>
|
||||
/// <param name="pintype"> the type of the pin. </param>
|
||||
/// <param name="allPlaces">
|
||||
/// if its true then send query to the place file otherwise to the CampusMapModel.
|
||||
/// </param>
|
||||
private void ShowPlacesByQuery(string query, MapPinModel.PinType pintype, bool allPlaces)
|
||||
{
|
||||
this.AddPins(this.SearchPlaces(query, allPlaces), pintype);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method show all places by placeId
|
||||
/// </summary>
|
||||
/// <param name="placeId">the placeId</param>
|
||||
/// <param name="pintype">the type of the pin</param>
|
||||
/// <param name="allPlaces">if its true then send query to the place file otherwise to the CampusMapModel</param>
|
||||
/// <summary> Method show all places by placeId. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="placeId"> the placeId. </param>
|
||||
/// <param name="pintype"> the type of the pin. </param>
|
||||
/// <param name="allPlaces">
|
||||
/// if its true then send query to the place file otherwise to the CampusMapModel.
|
||||
/// </param>
|
||||
private void ShowPlacesByPlaceId(string placeId, MapPinModel.PinType pintype, bool allPlaces)
|
||||
{
|
||||
this.AddPinsByPids(new List<string>() { placeId }, pintype, false, allPlaces);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method shows places by placeId from place file as search Pin
|
||||
/// </summary>
|
||||
/// <param name="placeId">the placeId</param>
|
||||
/// <summary> Method shows places by placeId from place file as search Pin. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="placeId"> the placeId. </param>
|
||||
private void ShowAllPlacesByPlaceIdAsSearchPin(string placeId)
|
||||
{
|
||||
if (!this.IsMapReady())
|
||||
@@ -292,10 +279,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method shows places by placeId from CampusMapModel as search Pin
|
||||
/// </summary>
|
||||
/// <param name="placeId">the placeId</param>
|
||||
/// <summary> Method shows places by placeId from CampusMapModel as search Pin. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="placeId"> the placeId. </param>
|
||||
private void ShowPlacesByPlaceIdAsSearchPin(string placeId)
|
||||
{
|
||||
if (!this.IsMapReady())
|
||||
@@ -308,10 +294,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method show all buildings of a campus
|
||||
/// </summary>
|
||||
/// <param name="campusId">the id of the campus</param>
|
||||
/// <summary> Method show all buildings of a campus. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="campusId"> the id of the campus. </param>
|
||||
private void ShowAllCampusBuilding(string campusId)
|
||||
{
|
||||
if (!this.IsMapReady())
|
||||
@@ -324,10 +309,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the map loading is finish
|
||||
/// </summary>
|
||||
/// <returns>true, if the map is ready to use, otherwise false</returns>
|
||||
/// <summary> Method check if the map loading is finish. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <returns> true, if the map is ready to use, otherwise false. </returns>
|
||||
private bool IsMapReady()
|
||||
{
|
||||
if (this.campusMap == null || !this.campusMap.IsReady)
|
||||
@@ -338,9 +322,8 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the place file is ready
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the place file is ready. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FileIsReady()
|
||||
{
|
||||
this.campusMap = new CBMainMapModel(this.file.Model.Places.ToList());
|
||||
@@ -352,10 +335,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>TextSearch click method.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="sender">caller object.</param>
|
||||
/// <param name="e"> some EventArgs.</param>
|
||||
/// <summary> TextSearch click method. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="sender"> caller object. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void SearchByText(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string query = QString.Text.Trim();
|
||||
@@ -369,11 +352,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
this.ShowPlacesByQueryAsSearchPin(query);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method insert or remove the buildings pins
|
||||
/// </summary>
|
||||
/// <param name="sender">caller object.</param>
|
||||
/// <param name="e"> some EventArgs.</param>
|
||||
/// <summary> Method insert or remove the buildings pins. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> caller object. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void ShowBuildingsInformation(object sender, EventArgs e)
|
||||
{
|
||||
string menuText;
|
||||
@@ -394,10 +376,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
item.Text = menuText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method clear the Map
|
||||
/// </summary>
|
||||
/// <param name="removeTags">(optional) tags of the UIElement</param>
|
||||
/// <summary> Method clear the Map. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="removeTags"> (optional) tags of the UIElement. </param>
|
||||
private void ClearMap(List<string> removeTags = null)
|
||||
{
|
||||
if (removeTags == null)
|
||||
@@ -424,13 +405,14 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method adds pin to the map by given list of placeId
|
||||
/// </summary>
|
||||
/// <param name="pidList">list of placeId</param>
|
||||
/// <param name="pinType">type of pin</param>
|
||||
/// <param name="clearCanvas">(optional) if its true, clear canvas before adding</param>
|
||||
/// <param name="allPlaces">(optional) if its true, load place from place file, otherwise from CampusMapModel</param>
|
||||
/// <summary> Method adds pin to the map by given list of placeId. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="pidList"> list of placeId. </param>
|
||||
/// <param name="pinType"> type of pin. </param>
|
||||
/// <param name="clearCanvas"> (optional) if its true, clear canvas before adding. </param>
|
||||
/// <param name="allPlaces">
|
||||
/// (optional) if its true, load place from place file, otherwise from CampusMapModel.
|
||||
/// </param>
|
||||
private void AddPinsByPids(List<string> pidList, MapPinModel.PinType pinType, bool clearCanvas = true, bool allPlaces = false)
|
||||
{
|
||||
// clear canvas
|
||||
@@ -477,11 +459,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method start a NFCScan
|
||||
/// </summary>
|
||||
/// <param name="sender">sender of event</param>
|
||||
/// <param name="e">the event args</param>
|
||||
/// <summary> Method start a NFCScan. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> sender of event. </param>
|
||||
/// <param name="e"> the event args. </param>
|
||||
private void SearchPlaceByNFC_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBoxes.ShowMainModelInfoMessageBox(AppResources.ScarNfc_Search);
|
||||
@@ -490,11 +471,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method start a QRCodeScan
|
||||
/// </summary>
|
||||
/// <param name="sender">sender of event</param>
|
||||
/// <param name="e">the event args</param>
|
||||
/// <summary> Method start a QRCodeScan. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> sender of event. </param>
|
||||
/// <param name="e"> the event args. </param>
|
||||
private void SearchPlaceByQR_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.qrcodeScan = true;
|
||||
@@ -504,11 +484,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
this.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method handle the result of a NFCScan
|
||||
/// </summary>
|
||||
/// <param name="sender">the sender device</param>
|
||||
/// <param name="message">the message of the device</param>
|
||||
/// <summary> Method handle the result of a NFCScan. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> the sender device. </param>
|
||||
/// <param name="message"> the message of the device. </param>
|
||||
private void NDEFHandler(ProximityDevice sender, ProximityMessage message)
|
||||
{
|
||||
// create ndefMessage
|
||||
@@ -575,11 +554,13 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Searches for the first places.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <param name="allPlaces">(optional) if its true, search places in place file, otherwise in CampusMapModel</param>
|
||||
/// <returns>The found places.</returns>
|
||||
/// <summary> Searches for the first places. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="query"> The query. </param>
|
||||
/// <param name="allPlaces">
|
||||
/// (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)
|
||||
{
|
||||
SpsModel spatial;
|
||||
@@ -609,11 +590,11 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
return spatial.GetPlacesByInformation(query, true, this.informationsNames);
|
||||
}
|
||||
|
||||
/// <summary>Adds the pins.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="places">The places.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
/// <summary> Adds the pins. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <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)
|
||||
{
|
||||
foreach (PlaceModel place in places)
|
||||
@@ -633,13 +614,15 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Add Pin to an certain position.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="x"> longitude parameter.</param>
|
||||
/// <param name="y"> latitude parameter.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
/// <param name="assocPlaces">(Optional) List of places, whose are associative with the pin</param>
|
||||
/// <summary> Add Pin to an certain position. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="x"> longitude parameter. </param>
|
||||
/// <param name="y"> latitude parameter. </param>
|
||||
/// <param name="type"> The type. </param>
|
||||
/// <param name="scroll"> (Optional) the scroll. </param>
|
||||
/// <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)
|
||||
{
|
||||
Point scrollPoint = this.campusMap.GetScrollPoint(this.campusMap.ConverToPixelPoint(this.campusMap.ConverToMapPoint(x, y)));
|
||||
@@ -670,18 +653,18 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>On clicking the update button in the ApplicationBar.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="sender">caller object.</param>
|
||||
/// <param name="e"> some EventArgs.</param>
|
||||
/// <summary> On clicking the update button in the ApplicationBar. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="sender"> caller object. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void UpdateButtonAppBar_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
this.ShowCurrentPositionDispatcher();
|
||||
}
|
||||
|
||||
/// <summary>execute ShowCurrentPosition-Method via Dispatcher.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
/// <summary> execute ShowCurrentPosition-Method via Dispatcher. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="scroll"> (Optional) the scroll. </param>
|
||||
private void ShowCurrentPositionDispatcher(bool scroll = true)
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
@@ -690,9 +673,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
/// <summary>Method add a pin on the at the position of the phone.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
/// <summary> Method add a pin on the at the position of the phone. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="scroll"> (Optional) the scroll. </param>
|
||||
private void ShowCurrentPosition(bool scroll = true)
|
||||
{
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
@@ -720,9 +703,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sets pin to current position.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
/// <summary> Sets pin to current position. </summary>
|
||||
/// <remarks> Stubbfel, 19.08.2013. </remarks>
|
||||
/// <param name="scroll"> (Optional) the scroll. </param>
|
||||
private void SetPinToCurrentPosition(bool scroll = true)
|
||||
{
|
||||
string lat = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Lat);
|
||||
@@ -738,17 +721,17 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ClearMap(new List<string>() { MapPinModel.CurrendPositionPlacePinString });
|
||||
this.ClearMap(new List<string>() { MapPinModel.CurrentPositionPlacePinString });
|
||||
this.SetPinToPosition(lat, log, MapPinModel.PinType.CurrentPosition, scroll);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sets pin to position.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="latitude"> The latitude.</param>
|
||||
/// <param name="longitude">The longitude.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="scroll"> (Optional) the scroll.</param>
|
||||
/// <summary> Sets pin to position. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
/// <param name="latitude"> The latitude. </param>
|
||||
/// <param name="longitude"> The longitude. </param>
|
||||
/// <param name="type"> The type. </param>
|
||||
/// <param name="scroll"> (Optional) the scroll. </param>
|
||||
private void SetPinToPosition(string latitude, string longitude, MapPinModel.PinType type, bool scroll = true)
|
||||
{
|
||||
double x;
|
||||
@@ -762,10 +745,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method show same PlaceInformation
|
||||
/// </summary>
|
||||
/// <param name="places">List of places</param>
|
||||
/// <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)
|
||||
{
|
||||
if (places == null)
|
||||
@@ -821,6 +803,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Go to room list. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="buildingId"> Identifier for the building. </param>
|
||||
/// <param name="roomId"> (Optional) identifier for the room. </param>
|
||||
private void GoToRoomList(string buildingId, string roomId = null)
|
||||
{
|
||||
string urlString = Constants.PathCampusmap_RoomListPage;
|
||||
@@ -833,12 +819,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
this.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Method check if a certain place has some rooms
|
||||
/// </summary>
|
||||
/// <param name="placeId">the place id</param>
|
||||
/// <returns>true, if the place has got rooms, otherwise false</returns>
|
||||
/// <summary> Method check if a certain place has some rooms. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="placeId"> the place id. </param>
|
||||
/// <returns> true, if the place has got rooms, otherwise false. </returns>
|
||||
private bool HasRooms(string placeId)
|
||||
{
|
||||
foreach (PlaceModel place in this.file.Model.Places)
|
||||
@@ -852,7 +836,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary> Event handler. Called by Button for key down events. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> caller object. </param>
|
||||
/// <param name="e"> Key event information. </param>
|
||||
private void Button_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
|
||||
@@ -1,29 +1,28 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RoomListPage.xaml.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 room list page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWP8.Model.Campusmap;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using CampusAppWP8.Utility;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Model.Campusmap;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary> Class of the RoomListPage. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
@@ -42,10 +41,13 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
/// <summary> true to pinch run. </summary>
|
||||
private bool pinchRun = false;
|
||||
/// <summary> The mappoint. </summary>
|
||||
|
||||
/// <summary> The MapPoint. </summary>
|
||||
private Point mappoint;
|
||||
|
||||
/// <summary> The offset point. </summary>
|
||||
private Point offsetPoint;
|
||||
|
||||
/// <summary> The layer list picker. </summary>
|
||||
private ListPickerItemListModel layerListPicker;
|
||||
|
||||
@@ -109,8 +111,8 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamBuildingId))
|
||||
{
|
||||
this.setupCanvas(NavigationContext.QueryString[Constants.ParamBuildingId]);
|
||||
this.createLayerListPicker();
|
||||
this.SetupCanvas(NavigationContext.QueryString[Constants.ParamBuildingId]);
|
||||
this.CreateLayerListPicker();
|
||||
|
||||
if (this.building != null && this.building.Layers != null && this.building.Layers.Count > 0)
|
||||
{
|
||||
@@ -120,10 +122,11 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
if (layerKey != null)
|
||||
{
|
||||
this.Layer.SelectedIndex = this.layerListPicker.GetIndexOrDefault(layerKey);
|
||||
this.showCurrentRoom(NavigationContext.QueryString[Constants.ParamRoomId]);
|
||||
this.ShowCurrentRoom(NavigationContext.QueryString[Constants.ParamRoomId]);
|
||||
}
|
||||
}
|
||||
this.showLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value);
|
||||
|
||||
this.ShowLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -134,15 +137,13 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary> Shows the current room. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="placeId"> Identifier for the place. </param>
|
||||
private void showCurrentRoom(string placeId)
|
||||
private void ShowCurrentRoom(string placeId)
|
||||
{
|
||||
|
||||
double x;
|
||||
double y;
|
||||
|
||||
@@ -153,7 +154,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
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 - mappoint.X + offsetPoint.X, roompoint.Y - mappoint.Y + offsetPoint.Y);
|
||||
Point viewPoint = new Point(roompoint.X - this.mappoint.X + this.offsetPoint.X, roompoint.Y - this.mappoint.Y + this.offsetPoint.Y);
|
||||
|
||||
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, MapPinModel.PinType.InfoRedPlace, new List<PlaceModel> { room }));
|
||||
}
|
||||
@@ -167,11 +168,13 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string msgText = string.Empty;
|
||||
if (places == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (PlaceModel place in places)
|
||||
{
|
||||
msgText += AppResources.PlaceLabel_Name + ": ";
|
||||
@@ -228,7 +231,6 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
double scaleVal = pinch.CumulativeScale;
|
||||
if (scaleVal < 1)
|
||||
{
|
||||
|
||||
scaleVal = 1;
|
||||
}
|
||||
else if (scaleVal > 1.5)
|
||||
@@ -239,8 +241,6 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
scale.ScaleX = scaleVal;
|
||||
scale.ScaleY = scaleVal;
|
||||
|
||||
|
||||
|
||||
var newCenter = e.PinchManipulation.Current.Center;
|
||||
scale.CenterX = newCenter.X;
|
||||
scale.CenterY = newCenter.Y;
|
||||
@@ -266,21 +266,22 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
/// <summary> Creates layer list picker. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
private void createLayerListPicker()
|
||||
private void CreateLayerListPicker()
|
||||
{
|
||||
layerListPicker = new ListPickerItemListModel();
|
||||
this.layerListPicker = new ListPickerItemListModel();
|
||||
|
||||
foreach (string layername in this.building.Layers.Keys)
|
||||
{
|
||||
layerListPicker.AddItem(layername, layername);
|
||||
this.layerListPicker.AddItem(layername, layername);
|
||||
}
|
||||
this.Layer.ItemsSource = layerListPicker.List;
|
||||
|
||||
this.Layer.ItemsSource = this.layerListPicker.List;
|
||||
}
|
||||
|
||||
/// <summary> Shows the layer places. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="layerKey"> (Optional) the layer key. </param>
|
||||
private void showLayerPlaces(string layerKey = null)
|
||||
private void ShowLayerPlaces(string layerKey = null)
|
||||
{
|
||||
if (layerKey == null)
|
||||
{
|
||||
@@ -298,7 +299,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
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 - mappoint.X + offsetPoint.X, roompoint.Y - mappoint.Y + offsetPoint.Y);
|
||||
Point viewPoint = new Point(roompoint.X - this.mappoint.X + this.offsetPoint.X, roompoint.Y - this.mappoint.Y + this.offsetPoint.Y);
|
||||
|
||||
MapPinModel.PinType type;
|
||||
|
||||
@@ -318,8 +319,8 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
default:
|
||||
type = MapPinModel.PinType.InfoPlace;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, type, new List<PlaceModel> { room }));
|
||||
}
|
||||
|
||||
@@ -329,16 +330,16 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <summary> Shows the layer places. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="index"> (Optional) zero-based index of the. </param>
|
||||
private void showLayerPlaces(int index = 0)
|
||||
private void ShowLayerPlaces(int index = 0)
|
||||
{
|
||||
string layerKey = this.building.Layers.Keys.ElementAt(index);
|
||||
this.showLayerPlaces(layerKey);
|
||||
this.ShowLayerPlaces(layerKey);
|
||||
}
|
||||
|
||||
/// <summary> Sets up the canvas. </summary>
|
||||
/// <remarks> Stubbfel, 14.10.2013. </remarks>
|
||||
/// <param name="buildingId"> Identifier for the building. </param>
|
||||
private void setupCanvas(string buildingId)
|
||||
private void SetupCanvas(string buildingId)
|
||||
{
|
||||
this.building = new CampusBuildingModel(buildingId, this.placeFile.Model.Places.ToList());
|
||||
|
||||
@@ -348,13 +349,13 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
double y = this.building.Building.GeoRefPoint.Latitude;
|
||||
double x = this.building.Building.GeoRefPoint.Longitude;
|
||||
mappoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
offsetPoint = new Point(-this.buildingMap.MapImageOffsetX, -this.buildingMap.MapImageOffsetY);
|
||||
this.mappoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
|
||||
this.offsetPoint = new Point(-this.buildingMap.MapImageOffsetX, -this.buildingMap.MapImageOffsetY);
|
||||
|
||||
this.MapCanvas.DataContext = buildingMap;
|
||||
this.MapCanvas.DataContext = this.buildingMap;
|
||||
|
||||
Canvas.SetLeft(this.imgMap, -1 * mappoint.X);
|
||||
Canvas.SetTop(this.imgMap, -1 * mappoint.Y);
|
||||
Canvas.SetLeft(this.imgMap, -1 * this.mappoint.X);
|
||||
Canvas.SetTop(this.imgMap, -1 * this.mappoint.Y);
|
||||
Canvas.SetZIndex(this.imgMap, 0);
|
||||
}
|
||||
|
||||
@@ -364,7 +365,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <param name="e"> Selection changed event information. </param>
|
||||
private void Layer_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
this.showLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value);
|
||||
this.ShowLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value);
|
||||
}
|
||||
|
||||
/// <summary> Clears the map described by removeTags. </summary>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NFC.xaml.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 nfc .xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Dev
|
||||
{
|
||||
using System;
|
||||
@@ -14,36 +14,37 @@ namespace CampusAppWP8.Pages.Dev
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Campusmap;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Windows.Networking.Proximity;
|
||||
using CampusAppWP8.File.Places;
|
||||
|
||||
/// <summary>Nfc page.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <summary> Nfc page. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class NFC : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The device.</summary>
|
||||
/// <summary> The device. </summary>
|
||||
private readonly ProximityDevice device = ProximityDevice.GetDefault();
|
||||
|
||||
/// <summary>Zero-based index of the act ndef.</summary>
|
||||
/// <summary> Zero-based index of the act ndef. </summary>
|
||||
private int actNDEFIndex;
|
||||
|
||||
/// <summary>List of ndefs.</summary>
|
||||
/// <summary> List of ndefs. </summary>
|
||||
private List<NDEFMessage> ndefList;
|
||||
|
||||
/// <summary> The file. </summary>
|
||||
private PlacesFile file;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the NFC class.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the NFC class. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
public NFC()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -56,32 +57,18 @@ namespace CampusAppWP8.Pages.Dev
|
||||
this.file.OnLoaded += new PlacesFile.OnIO(this.FileIsReady);
|
||||
this.file.LoadData();
|
||||
|
||||
|
||||
|
||||
this.actNDEFIndex = 0;
|
||||
}
|
||||
|
||||
private void FileIsReady()
|
||||
{
|
||||
this.ndefList = new List<NDEFMessage>();
|
||||
//MapModel map = new CBMainMapModel(this.file.Model.Places.ToList());
|
||||
foreach (PlaceModel place in this.file.Model.Places.ToList())
|
||||
{
|
||||
this.ndefList.Add(new NDEFMessage(place.ToNfcString(), NDEFMessage.TYPEVAL.TEXT));
|
||||
}
|
||||
|
||||
this.Writecontent.Text = this.ndefList[this.actNDEFIndex].GetContent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>Override the OnNavigatedTo method.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <param name="e">Arguments of navigation.</param>
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -91,20 +78,35 @@ namespace CampusAppWP8.Pages.Dev
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>Handler, called when the publish.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <param name="sender"> The sender.</param>
|
||||
/// <param name="messageId">Identifier for the message.</param>
|
||||
/// <summary> File is ready. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FileIsReady()
|
||||
{
|
||||
this.ndefList = new List<NDEFMessage>();
|
||||
|
||||
// MapModel map = new CBMainMapModel(this.file.Model.Places.ToList());
|
||||
foreach (PlaceModel place in this.file.Model.Places.ToList())
|
||||
{
|
||||
this.ndefList.Add(new NDEFMessage(place.ToNfcString(), NDEFMessage.TYPEVAL.TEXT));
|
||||
}
|
||||
|
||||
this.Writecontent.Text = this.ndefList[this.actNDEFIndex].GetContent();
|
||||
}
|
||||
|
||||
/// <summary> Handler, called when the publish. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <param name="sender"> The sender. </param>
|
||||
/// <param name="messageId"> Identifier for the message. </param>
|
||||
private void PublishHandler(ProximityDevice sender, long messageId)
|
||||
{
|
||||
this.device.StopPublishingMessage(messageId);
|
||||
this.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show("Writed:" + this.actNDEFIndex)));
|
||||
}
|
||||
|
||||
/// <summary>Handler, called when the ndef.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <param name="sender"> The sender.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
/// <summary> Handler, called when the ndef. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <param name="sender"> The sender. </param>
|
||||
/// <param name="message"> The message. </param>
|
||||
private void NDEFHandler(ProximityDevice sender, ProximityMessage message)
|
||||
{
|
||||
this.device.StopSubscribingForMessage(message.SubscriptionId);
|
||||
@@ -115,19 +117,19 @@ namespace CampusAppWP8.Pages.Dev
|
||||
this.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show(ndef.GetContent())));
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by Read for click events.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e"> Routed event information.</param>
|
||||
/// <summary> Event handler. Called by Read for click events. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <param name="sender"> The sender. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void Read_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.device.SubscribeForMessage("NDEF", this.NDEFHandler);
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by Next for click events.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e"> Routed event information.</param>
|
||||
/// <summary> Event handler. Called by Next for click events. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <param name="sender"> The sender. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void Next_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.actNDEFIndex < this.ndefList.Count - 1)
|
||||
@@ -137,10 +139,10 @@ namespace CampusAppWP8.Pages.Dev
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by Prev for click events.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e"> Routed event information.</param>
|
||||
/// <summary> Event handler. Called by Prev for click events. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <param name="sender"> The sender. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void Prev_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.actNDEFIndex > 0)
|
||||
@@ -150,10 +152,10 @@ namespace CampusAppWP8.Pages.Dev
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by Write for click events.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e"> Routed event information.</param>
|
||||
/// <summary> Event handler. Called by Write for click events. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <param name="sender"> The sender. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void Write_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.device.PublishBinaryMessage("NDEF:WriteTag", this.ndefList[this.actNDEFIndex].ToByteArray().AsBuffer(), this.PublishHandler);
|
||||
|
||||
@@ -1,66 +1,67 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="QRScanner.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>15.08.2013</sience>
|
||||
// <remarks>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the qr scanner.xaml class</summary>
|
||||
// <remarks>
|
||||
// This Class uses the ZXing library, which is under the Apache License 2.0.
|
||||
//
|
||||
//
|
||||
// Therefor, see:
|
||||
// http://zxingnet.codeplex.com/license
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
// </remarks>
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Pages.Dev
|
||||
{
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Imaging;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Devices;
|
||||
using Microsoft.Phone.Controls;
|
||||
using ZXing;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
|
||||
/// <summary>
|
||||
/// QR Code scanner.
|
||||
/// </summary>
|
||||
/// <summary> QR Code scanner. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class QRScanner : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The camera object.</summary>
|
||||
/// <summary> The camera object. </summary>
|
||||
private PhotoCamera cam = null;
|
||||
|
||||
/// <summary>Thread for transfer the preview image to the reader.</summary>
|
||||
/// <summary> Thread for transfer the preview image to the reader. </summary>
|
||||
private Thread captureThread = null;
|
||||
|
||||
/// <summary>For ending the thread.</summary>
|
||||
/// <summary> For ending the thread. </summary>
|
||||
private volatile bool captureThreadExit = false;
|
||||
|
||||
/// <summary>QR reader object.</summary>
|
||||
/// <summary> QR reader object. </summary>
|
||||
private IBarcodeReader barcodeReader = null;
|
||||
|
||||
/// <summary>Bitmap for transfer the camera image to the reader.</summary>
|
||||
/// <summary> Bitmap for transfer the camera image to the reader. </summary>
|
||||
private WriteableBitmap bit = null;
|
||||
|
||||
/// <summary>true if this object is in autofocus. </summary>
|
||||
/// <summary> true if this object is in autofocus. </summary>
|
||||
private bool isInAutofocus = false;
|
||||
|
||||
/// <summary>
|
||||
/// Variable for the storage key of the result
|
||||
/// </summary>
|
||||
/// <summary> Variable for the storage key of the result. </summary>
|
||||
private string resultAppStoreKey;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="QRScanner" /> class. </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="QRScanner" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
public QRScanner()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -73,10 +74,9 @@ namespace CampusAppWP8.Pages.Dev
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Is called when this page will become the current page of a frame.
|
||||
/// </summary>
|
||||
/// <param name="e">event args.</param>
|
||||
/// <summary> Is called when this page will become the current page of a frame. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
|
||||
{
|
||||
if (PhotoCamera.IsCameraTypeSupported(CameraType.Primary) == true)
|
||||
@@ -85,6 +85,7 @@ namespace CampusAppWP8.Pages.Dev
|
||||
{
|
||||
this.resultAppStoreKey = NavigationContext.QueryString[Constants.ParamQRResultKey];
|
||||
}
|
||||
|
||||
this.isInAutofocus = true;
|
||||
this.cam = new PhotoCamera(CameraType.Primary);
|
||||
this.cam.Initialized += new EventHandler<CameraOperationCompletedEventArgs>(this.Cam_Initialized);
|
||||
@@ -102,10 +103,9 @@ namespace CampusAppWP8.Pages.Dev
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called when this page will not be the current page of a frame.
|
||||
/// </summary>
|
||||
/// <param name="e">event args.</param>
|
||||
/// <summary> Is called when this page will not be the current page of a frame. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs)"/>
|
||||
protected override void OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs e)
|
||||
{
|
||||
if (this.cam != null)
|
||||
@@ -116,7 +116,6 @@ namespace CampusAppWP8.Pages.Dev
|
||||
{
|
||||
this.captureThread.Join();
|
||||
}
|
||||
|
||||
|
||||
this.cam.Dispose();
|
||||
|
||||
@@ -124,10 +123,9 @@ namespace CampusAppWP8.Pages.Dev
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called after the orientation has changed.
|
||||
/// </summary>
|
||||
/// <param name="e">event args.</param>
|
||||
/// <summary> Is called after the orientation has changed. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:Microsoft.Phone.Controls.PhoneApplicationPage.OnOrientationChanged(OrientationChangedEventArgs)"/>
|
||||
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
|
||||
{
|
||||
base.OnOrientationChanged(e);
|
||||
@@ -159,11 +157,10 @@ namespace CampusAppWP8.Pages.Dev
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Event handler. Called by Cam for initialized events.
|
||||
/// </summary>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e">Camera operation completed event information.</param>
|
||||
/// <summary> Event handler. Called by Cam for initialized events. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Camera operation completed event information. </param>
|
||||
private void Cam_Initialized(object sender, Microsoft.Devices.CameraOperationCompletedEventArgs e)
|
||||
{
|
||||
if (e.Succeeded)
|
||||
@@ -179,21 +176,18 @@ namespace CampusAppWP8.Pages.Dev
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event handler. Called by Cam for automatic focus completed events.
|
||||
/// </summary>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e">Camera operation completed event information.</param>
|
||||
/// <summary> Event handler. Called by Cam for automatic focus completed events. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Camera operation completed event information. </param>
|
||||
private void Cam_AutoFocusCompl(object sender, CameraOperationCompletedEventArgs e)
|
||||
{
|
||||
//this.isInAutofocus = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event handler. Called by CamView for tap events.
|
||||
/// </summary>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e">Gesture event information.</param>
|
||||
/// <summary> Event handler. Called by CamView for tap events. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Gesture event information. </param>
|
||||
private void CamView_Tap(object sender, System.Windows.Input.GestureEventArgs e)
|
||||
{
|
||||
if (this.cam != null && this.isInAutofocus == false)
|
||||
@@ -213,12 +207,11 @@ namespace CampusAppWP8.Pages.Dev
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the capture image action.
|
||||
/// </summary>
|
||||
/// <param name="img">The image.</param>
|
||||
/// <param name="width">The width.</param>
|
||||
/// <param name="height">The height.</param>
|
||||
/// <summary> Executes the capture image action. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="img"> The image. </param>
|
||||
/// <param name="width"> The width. </param>
|
||||
/// <param name="height"> The height. </param>
|
||||
private void OnCaptureImage(int[] img, int width, int height)
|
||||
{
|
||||
Array.Copy(img, this.bit.Pixels, img.Length);
|
||||
@@ -266,6 +259,9 @@ namespace CampusAppWP8.Pages.Dev
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Go to campus-mappage. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="tagContent"> The tag content. </param>
|
||||
private void GoToCampusMappage(string tagContent)
|
||||
{
|
||||
string pid = Wp8StringManager.FilterPlaceIdinQRResultString(tagContent);
|
||||
@@ -275,9 +271,8 @@ namespace CampusAppWP8.Pages.Dev
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Capture thread function.
|
||||
/// </summary>
|
||||
/// <summary> Capture thread function. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
private void CaptureThreadFunc()
|
||||
{
|
||||
Size resolution = this.cam.PreviewResolution;
|
||||
@@ -285,13 +280,10 @@ namespace CampusAppWP8.Pages.Dev
|
||||
|
||||
while (!this.captureThreadExit)
|
||||
{
|
||||
//if (this.isInAutofocus == false)
|
||||
//{
|
||||
this.cam.GetPreviewBufferArgb32(buffer);
|
||||
|
||||
this.OnCaptureImage(buffer, (int)resolution.Width, (int)resolution.Height);
|
||||
this.isInAutofocus = true;
|
||||
//}
|
||||
|
||||
System.Threading.Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
// <copyright file="Exams.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="Exams.xaml.cs" company="BTU/IIT">
|
||||
// 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 exams.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Exams
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
@@ -16,27 +20,26 @@ namespace CampusAppWP8.Pages.Exams
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using System.Threading;
|
||||
using System;
|
||||
|
||||
/// <summary>class of ExamsPage.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> class of ExamsPage. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class Exams : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The feed.</summary>
|
||||
/// <summary> The feed. </summary>
|
||||
private ExamFeed feed;
|
||||
|
||||
/// <summary>The exam file.</summary>
|
||||
/// <summary> The exam file. </summary>
|
||||
private ExamFile file;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the Exams class.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the Exams class. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
public Exams()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -52,9 +55,9 @@ namespace CampusAppWP8.Pages.Exams
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <param name="e">Ein Objekt, das die Ereignisdaten enthält.</param>
|
||||
/// <summary> Is called when this page will become the current page of a frame. </summary>
|
||||
/// <remarks> stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -67,14 +70,11 @@ namespace CampusAppWP8.Pages.Exams
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
Thread thread = new Thread(new ThreadStart(this.LoadingFeed));
|
||||
thread.Start();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wird aufgerufen, wenn eine Seite nicht mehr die aktive Seite in einem Frame ist.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <param name="e">Ein Objekt, das die Ereignisdaten enthält.</param>
|
||||
/// <summary> Is called when this page will not be the current page of a frame. </summary>
|
||||
/// <remarks> stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
@@ -99,9 +99,8 @@ namespace CampusAppWP8.Pages.Exams
|
||||
this.feed.LoadData(Utilities.GetLoadModus<Model.Exams.ExamListWp8Model>());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>Method initialize the Feed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Method initialize the Feed. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
private void InitializeFeed()
|
||||
{
|
||||
this.feed = new ExamFeed();
|
||||
@@ -110,8 +109,8 @@ namespace CampusAppWP8.Pages.Exams
|
||||
this.feed.OnFailedFile += new ExamFeed.OnFailed(this.FeedIsFailFile);
|
||||
}
|
||||
|
||||
/// <summary>Method will be execute if the feed is ready.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Method will be execute if the feed is ready. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
private void FeedIsReady()
|
||||
{
|
||||
if (this.Dispatcher != null)
|
||||
@@ -124,16 +123,16 @@ namespace CampusAppWP8.Pages.Exams
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Executes the PDF reader operation.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <summary> Executes the PDF reader operation. </summary>
|
||||
/// <remarks> Stubbfel, 03.09.2013. </remarks>
|
||||
private void LaunchPDFReader()
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
this.file.SaveAndLaunchFile();
|
||||
}
|
||||
|
||||
/// <summary>Sets up the exam list.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Sets up the exam list. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
private void SetupExamList()
|
||||
{
|
||||
var bachelorList = from exam in this.feed.Model.Exams
|
||||
@@ -158,9 +157,9 @@ namespace CampusAppWP8.Pages.Exams
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>Calculates the selected index.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <returns>The calculated selected index.</returns>
|
||||
/// <summary> Calculates the selected index. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
/// <returns> The calculated selected index. </returns>
|
||||
private int CalcSelectedIndex()
|
||||
{
|
||||
int result = App.LoadFromIsolatedStorage<int>(Constants.ExamPageModelKey);
|
||||
@@ -184,12 +183,12 @@ namespace CampusAppWP8.Pages.Exams
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>Method will be execute if the feed is failed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
private void FeedIsFailWeb()
|
||||
{
|
||||
if (this.Dispatcher != null)
|
||||
@@ -200,29 +199,30 @@ namespace CampusAppWP8.Pages.Exams
|
||||
{
|
||||
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
|
||||
}
|
||||
|
||||
this.feed.ForceReadFile();
|
||||
}
|
||||
|
||||
/// <summary>Method will be execute if the feed is failed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 02.09.2013. </remarks>
|
||||
private void FeedIsFailFile()
|
||||
{
|
||||
if (this.Dispatcher != null)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile)));
|
||||
this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile)));
|
||||
this.Dispatcher.BeginInvoke(new Action(() => this.DefHeader.ProgressVisibility = Visibility.Collapsed));
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by Button for click events.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e"> Routed event information.</param>
|
||||
/// <summary> Event handler. Called by Button for click events. </summary>
|
||||
/// <remarks> Stubbfel, 03.09.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Button button = sender as Button;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LecturePage.xaml.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 page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
@@ -18,38 +19,28 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Class for the LecturePage
|
||||
/// </summary>
|
||||
/// <summary> Class for the LecturePage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class LecturePage : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// actual LectureAPI
|
||||
/// </summary>
|
||||
/// <summary> actual LectureAPI. </summary>
|
||||
private LectureApi api;
|
||||
|
||||
/// <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 LecturePageModel pageModel;
|
||||
|
||||
/// <summary>
|
||||
/// flag for initialed page
|
||||
/// </summary>
|
||||
/// <summary> flag for initialed page. </summary>
|
||||
private bool init;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LecturePage" /> class.
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Initializes a new instance of the <see cref="LecturePage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LecturePage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -63,10 +54,9 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedFrom-Method
|
||||
/// </summary>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
/// <summary> Methods overrides the OnNavigatedFrom-Method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
@@ -88,9 +78,8 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Load the PageModel
|
||||
/// </summary>
|
||||
/// <summary> Load the PageModel. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void LoadPageModel()
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
@@ -99,9 +88,8 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
this.pageModel.LoadLists();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method sets the ItemSource of the ListPickers
|
||||
/// </summary>
|
||||
/// <summary> Method sets the ItemSource of the ListPickers. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SetupListPickers()
|
||||
{
|
||||
this.Course.ItemsSource = this.pageModel.CourseList.List;
|
||||
@@ -122,10 +110,9 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the last selected index of the ListPickers
|
||||
/// </summary>
|
||||
/// <param name="lastPageModel">Last PageModel</param>
|
||||
/// <summary> Method set the last selected index of the ListPickers. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="lastPageModel"> Last PageModel. </param>
|
||||
private void SetLastSelectedIndex(LecturePageModel lastPageModel)
|
||||
{
|
||||
this.pageModel.SelectCourseIndex = lastPageModel.SelectCourseIndex;
|
||||
@@ -135,9 +122,8 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
this.pageModel.SelectSemesterIndex = lastPageModel.SelectSemesterIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the last selected index of the ListPickers
|
||||
/// </summary>
|
||||
/// <summary> Method set the last selected index of the ListPickers. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SetSelectedIndex()
|
||||
{
|
||||
this.Course.SelectedIndex = this.pageModel.SelectCourseIndex;
|
||||
@@ -147,9 +133,8 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
this.To.SelectedIndex = this.pageModel.SelectToIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method store the actual selectIndex to the models
|
||||
/// </summary>
|
||||
/// <summary> Method store the actual selectIndex to the models. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void StoreSelectedIndex()
|
||||
{
|
||||
this.pageModel.SelectCourseIndex = this.Course.SelectedIndex;
|
||||
@@ -159,11 +144,10 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
this.pageModel.SelectToIndex = this.To.SelectedIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method send a request to the Feed
|
||||
/// </summary>
|
||||
/// <param name="sender">sender of this event</param>
|
||||
/// <param name="e"> events arguments</param>
|
||||
/// <summary> Method send a request to the Feed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> sender of this event. </param>
|
||||
/// <param name="e"> events arguments. </param>
|
||||
private void SendRequest(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.api = new LectureApi();
|
||||
@@ -176,9 +160,10 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method read the values from the inputs and put them in a list of parameters
|
||||
/// Method read the values from the inputs and put them in a list of parameters.
|
||||
/// </summary>
|
||||
/// <returns>a list of parameters</returns>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <returns> a list of parameters. </returns>
|
||||
private List<UrlParamModel> CreateUrlParameter()
|
||||
{
|
||||
ListPickerItemModel semester = (ListPickerItemModel)this.Semester.SelectedItem;
|
||||
@@ -196,9 +181,8 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
return parameterList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is ready
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is ready. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void ApiIsReady()
|
||||
{
|
||||
string query = this.ActivtyName.Text;
|
||||
@@ -213,11 +197,10 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// EventHandler for changed degree selection
|
||||
/// </summary>
|
||||
/// <param name="sender">sender object</param>
|
||||
/// <param name="e">some args</param>
|
||||
/// <summary> EventHandler for changed degree selection. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> sender object. </param>
|
||||
/// <param name="e"> some args. </param>
|
||||
private void DegreeSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (!this.init)
|
||||
@@ -230,11 +213,10 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
this.From.ItemsSource = this.pageModel.FromNumberList.List;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// EventHandler for changed from selection
|
||||
/// </summary>
|
||||
/// <param name="sender">sender object</param>
|
||||
/// <param name="e">some args</param>
|
||||
/// <summary> EventHandler for changed from selection. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> sender object. </param>
|
||||
/// <param name="e"> some args. </param>
|
||||
private void FromSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (!this.init)
|
||||
@@ -248,9 +230,8 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
this.To.ItemsSource = this.pageModel.ToNumberList.List;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void ApiIsFail()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ModulWebPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the modul web page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
@@ -12,16 +13,15 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows Webpages from the BaseAddress <see cref="Constants.UrlLecture_ModulBaseAddr" />
|
||||
/// </summary>
|
||||
/// <summary> A modul web page. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class ModulWebPage : PhoneApplicationPage
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModulWebPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="ModulWebPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public ModulWebPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -31,10 +31,9 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelLecture_ModulNumber))
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ResultDetailPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the result detail page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System.Windows.Navigation;
|
||||
@@ -12,16 +13,15 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows details of an activity
|
||||
/// </summary>
|
||||
/// <summary> Class for the page which shows details of an activity. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class ResultDetailPage : PhoneApplicationPage
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ResultDetailPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="ResultDetailPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public ResultDetailPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -32,10 +32,10 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
#region Method
|
||||
|
||||
#region protected
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelLecture_ActivityId))
|
||||
@@ -51,10 +51,9 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Method load a certain Activity from the model
|
||||
/// </summary>
|
||||
/// <param name="activityId">id of the activity</param>
|
||||
/// <summary> Method load a certain Activity from the model. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="activityId"> id of the activity. </param>
|
||||
private void LoadActivity(int activityId)
|
||||
{
|
||||
LectureWp8List list = App.LoadFromIsolatedStorage<LectureWp8List>(Constants.IsolatedStorage_LectureModel);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ResultPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the result page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
@@ -16,16 +17,15 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows the results of an LectureRequest
|
||||
/// </summary>
|
||||
/// <summary> Class for the page which shows the results of an LectureRequest. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class ResultPage : PhoneApplicationPage
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ResultPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="ResultPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public ResultPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -35,10 +35,9 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LinkPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the link page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Links
|
||||
{
|
||||
using System;
|
||||
@@ -16,35 +17,28 @@ namespace CampusAppWP8.Pages.Links
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the LinkPage
|
||||
/// </summary>
|
||||
/// <summary> Class for the LinkPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class LinkPage : PhoneApplicationPage
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// the feed of the CommonLinks
|
||||
/// </summary>
|
||||
/// <summary> the feed of the CommonLinks. </summary>
|
||||
private CommonLinkFeed commonLinkFeed;
|
||||
|
||||
/// <summary>
|
||||
/// the feed of the ClubLinks
|
||||
/// </summary>
|
||||
/// <summary> the feed of the ClubLinks. </summary>
|
||||
private ClubLinkFeed clubLinkFeed;
|
||||
|
||||
/// <summary>
|
||||
/// how many feeds are currently loading
|
||||
/// </summary>
|
||||
/// <summary> how many feeds are currently loading. </summary>
|
||||
private int loadingFeeds;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LinkPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="LinkPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public LinkPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -56,10 +50,9 @@ namespace CampusAppWP8.Pages.Links
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -77,10 +70,9 @@ namespace CampusAppWP8.Pages.Links
|
||||
this.clubLinkFeed.LoadData(Utilities.GetLoadModus<CampusAppWPortalLib8.Model.Link.LinkListModel>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedFrom method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedFrom method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
this.clubLinkFeed.SaveData();
|
||||
@@ -90,9 +82,8 @@ namespace CampusAppWP8.Pages.Links
|
||||
#endregion
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Method initialize the Feeds
|
||||
/// </summary>
|
||||
/// <summary> Method initialize the Feeds. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void InitializeFeeds()
|
||||
{
|
||||
if (this.commonLinkFeed == null)
|
||||
@@ -106,9 +97,8 @@ namespace CampusAppWP8.Pages.Links
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method initialize the CommonLinkFeed
|
||||
/// </summary>
|
||||
/// <summary> Method initialize the CommonLinkFeed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void InitializeCommonLinkFeed()
|
||||
{
|
||||
this.commonLinkFeed = new CommonLinkFeed();
|
||||
@@ -117,9 +107,8 @@ namespace CampusAppWP8.Pages.Links
|
||||
this.commonLinkFeed.OnFailedFile += new CommonLinkFeed.OnFailed(this.FeedIsFailFile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method initialize the ClubLinkFeed
|
||||
/// </summary>
|
||||
/// <summary> Method initialize the ClubLinkFeed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void InitializeClubLinkFeed()
|
||||
{
|
||||
this.clubLinkFeed = new ClubLinkFeed();
|
||||
@@ -128,46 +117,42 @@ namespace CampusAppWP8.Pages.Links
|
||||
this.clubLinkFeed.OnFailedFile += new ClubLinkFeed.OnFailed(this.FeedIsFailFile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the CommonLinkFeed is ready
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the CommonLinkFeed is ready. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void CommonLinkFeedIsReady()
|
||||
{
|
||||
this.SetupCommonPivot();
|
||||
this.SetupProgressBarVisibilityCollapsed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the ClubLinkFeed is ready
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the ClubLinkFeed is ready. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void ClubLinkFeedIsReady()
|
||||
{
|
||||
this.SetupClubPivot();
|
||||
this.SetupProgressBarVisibilityCollapsed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set ItemSource for the CommonLinkPanel
|
||||
/// </summary>
|
||||
/// <summary> Method set ItemSource for the CommonLinkPanel. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SetupCommonPivot()
|
||||
{
|
||||
this.CommonLinkPanel.ItemsSource = this.commonLinkFeed.Model.Links;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set ItemSource for the ClubLinkPanel
|
||||
/// </summary>
|
||||
/// <summary> Method set ItemSource for the ClubLinkPanel. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SetupClubPivot()
|
||||
{
|
||||
this.ClubLinkPanel.ItemsSource = this.clubLinkFeed.Model.Links;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the update button in the ApplicationBar.
|
||||
/// Force a data update from the web.
|
||||
/// On clicking the update button in the ApplicationBar. Force a data update from the web.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> button object. </param>
|
||||
/// <param name="e"> event args. </param>
|
||||
private void LinkForceUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.loadingFeeds = 2;
|
||||
@@ -177,27 +162,24 @@ namespace CampusAppWP8.Pages.Links
|
||||
this.clubLinkFeed.ForceWebUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void ClubLinkFeedIsFailWeb()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
|
||||
this.clubLinkFeed.ForceReadFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void CommonLinkFeedIsFailWeb()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
|
||||
this.commonLinkFeed.ForceReadFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FeedIsFailFile()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
@@ -205,8 +187,9 @@ namespace CampusAppWP8.Pages.Links
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the visibility of the ProgressBar to Collapsed if loadingFeeds less then 1
|
||||
/// Method set the visibility of the ProgressBar to Collapsed if loadingFeeds less then 1.
|
||||
/// </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SetupProgressBarVisibilityCollapsed()
|
||||
{
|
||||
this.loadingFeeds--;
|
||||
@@ -216,11 +199,10 @@ namespace CampusAppWP8.Pages.Links
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method handle OrientationPage
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
/// <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)
|
||||
|
||||
@@ -1,51 +1,43 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MensaPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>04.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the mensa page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Api.GeoApi;
|
||||
using CampusAppWP8.Feed.Mensa;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWPortalLib8.Model.Mensa;
|
||||
using CampusAppWPortalLib8.Model.Settings;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWPortalLib8.Model.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MensaPage
|
||||
/// </summary>
|
||||
/// <summary> Class for the MensaPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class MensaPage : PhoneApplicationPage
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// the feed of the mensa
|
||||
/// </summary>
|
||||
/// <summary> the feed of the mensa. </summary>
|
||||
private MensaFeed feed;
|
||||
|
||||
/// <summary>
|
||||
/// Index representing the weekday of today
|
||||
/// 0 - Monday(Default)
|
||||
/// 1 - Tuesday
|
||||
/// 2 - Wednesday
|
||||
/// 3 - Thursday
|
||||
/// 4 - Friday
|
||||
/// Index representing the weekday of today 0 - Monday(Default)
|
||||
/// 1 - Tuesday 2 - Wednesday 3 - Thursday 4 - Friday.
|
||||
/// </summary>
|
||||
private int selectedIndex;
|
||||
|
||||
/// <summary>
|
||||
/// Flag indicate that the feed was refreshed
|
||||
/// </summary>
|
||||
/// <summary> Flag indicate that the feed was refreshed. </summary>
|
||||
private bool refreshed = false;
|
||||
|
||||
/// <summary>
|
||||
@@ -53,18 +45,15 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
// private CampusSpsApi campusApi;
|
||||
|
||||
/// <summary>
|
||||
/// Flag for forcing webLoad
|
||||
/// </summary>
|
||||
/// <summary> Flag for forcing webLoad. </summary>
|
||||
private bool forceLoad = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MensaPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="MensaPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public MensaPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -96,10 +85,9 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -108,13 +96,13 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
|
||||
this.InitializeFeed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedFrom method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedFrom method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (this.feed != null)
|
||||
@@ -154,9 +142,8 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
}
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
/// Method determine campus and load data from correct feed
|
||||
/// </summary>
|
||||
/// <summary> Method determine campus and load data from correct feed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void DeterminCurrentCampusAndLoadFeed()
|
||||
{
|
||||
Campus mensaCampus = Utilities.DetermineCampus();
|
||||
@@ -171,7 +158,6 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(new Action(() => this.InitializeFeed(mensaCampus)));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -192,10 +178,9 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
this.campusApi.LoadData();*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method initialize the Feed depends of a campus
|
||||
/// </summary>
|
||||
/// <param name="campus">campus parameter</param>
|
||||
/// <summary> Method initialize the Feed depends of a campus. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="campus"> campus parameter. </param>
|
||||
private void InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus campus)
|
||||
{
|
||||
this.feed = MensaFeed.CreateCampusMensaFeed(campus);
|
||||
@@ -215,9 +200,8 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method initialize the Feed
|
||||
/// </summary>
|
||||
/// <summary> Method initialize the Feed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void InitializeFeed()
|
||||
{
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
@@ -231,36 +215,32 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is ready
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is ready. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FeedIsReady()
|
||||
{
|
||||
this.SetupMensaPivot();
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FeedIsFailWeb()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
|
||||
this.feed.ForceReadFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FeedIsFailFile()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set ItemSource and SelectedIndex for the pivot
|
||||
/// </summary>
|
||||
/// <summary> Method set ItemSource and SelectedIndex for the pivot. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SetupMensaPivot()
|
||||
{
|
||||
this.DefHeader.HeaderName = AppResources.MensaApp_Title + ": " + this.feed.Title;
|
||||
@@ -270,9 +250,8 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
this.MensaPivot.SelectedIndex = this.selectedIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create the IconsUrl for the meals
|
||||
/// </summary>
|
||||
/// <summary> Method create the IconsUrl for the meals. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void CreatesMealIcons()
|
||||
{
|
||||
foreach (MenuModel menus in this.feed.Model.Menus)
|
||||
@@ -316,9 +295,8 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate which pivot has to be selected
|
||||
/// </summary>
|
||||
/// <summary> Method calculate which pivot has to be selected. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void CalcSelectedIndex()
|
||||
{
|
||||
DayOfWeek today = DateTime.Now.DayOfWeek;
|
||||
@@ -349,11 +327,11 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the update button in the ApplicationBar.
|
||||
/// Force a data update from the web.
|
||||
/// On clicking the update button in the ApplicationBar. Force a data update from the web.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> button object. </param>
|
||||
/// <param name="e"> event args. </param>
|
||||
private void MensaForceUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
@@ -362,41 +340,40 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
this.refreshed = true;
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
/// <summary> Event handler. Called by ApplicationBarMenuItem for click events. </summary>
|
||||
/// <remarks> Stubbfel, 26.08.2013. </remarks>
|
||||
/// <param name="sender"> button object. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ApplicationBarMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.CB_MAIN);
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem2 for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
/// <summary> Event handler. Called by ApplicationBarMenuItem2 for click events. </summary>
|
||||
/// <remarks> Stubbfel, 26.08.2013. </remarks>
|
||||
/// <param name="sender"> button object. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ApplicationBarMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.CB_SOUTH);
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem3 for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
/// <summary> Event handler. Called by ApplicationBarMenuItem3 for click events. </summary>
|
||||
/// <remarks> Stubbfel, 26.08.2013. </remarks>
|
||||
/// <param name="sender"> button object. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ApplicationBarMenuItem3_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.SFB_MAIN);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method handle OrientationPage
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
/// <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)
|
||||
@@ -418,8 +395,9 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
FrameworkElement frameelement = sender as FrameworkElement;
|
||||
if (frameelement == null)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
string copyText = frameelement.Tag.ToString() + " (" + AppResources.Setting_UserCampus + " " + this.feed.Title + ")";
|
||||
Clipboard.SetText(copyText);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PersonPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>09.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the person page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Person
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using CampusAppWP8.Api.Person;
|
||||
using CampusAppWP8.Model.Person;
|
||||
@@ -18,24 +20,23 @@ namespace CampusAppWP8.Pages.Person
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Controls;
|
||||
|
||||
/// <summary>Person page.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Person page. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class PersonPage : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The API.</summary>
|
||||
/// <summary> The API. </summary>
|
||||
private PersonSearchApi api;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the PersonPage class.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the PersonPage class. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
public PersonPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -45,10 +46,10 @@ namespace CampusAppWP8.Pages.Person
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Sends a request.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e"> Routed event information.</param>
|
||||
/// <summary> Sends a request. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void SendRequest(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string query = this.SearchName.Text.Trim();
|
||||
@@ -66,10 +67,10 @@ namespace CampusAppWP8.Pages.Person
|
||||
this.api.LoadData();
|
||||
}
|
||||
|
||||
/// <summary>Creates URL parameter.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>The new URL parameter.</returns>
|
||||
/// <summary> Creates URL parameter. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="name"> The name. </param>
|
||||
/// <returns> The new URL parameter. </returns>
|
||||
private List<UrlParamModel> CreateUrlParameter(string name)
|
||||
{
|
||||
List<UrlParamModel> parameterList = new List<UrlParamModel>();
|
||||
@@ -77,24 +78,24 @@ namespace CampusAppWP8.Pages.Person
|
||||
return parameterList;
|
||||
}
|
||||
|
||||
/// <summary>API is fail.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> API is fail. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void ApiIsFail()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>API is ready.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> API is ready. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void ApiIsReady()
|
||||
{
|
||||
this.SetupResultBox();
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>Sets up the result box.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Sets up the result box. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void SetupResultBox()
|
||||
{
|
||||
this.api.Model.RemoveNonFunctionAndSetIdsPerson();
|
||||
@@ -105,10 +106,10 @@ namespace CampusAppWP8.Pages.Person
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by Button for click events.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e"> Routed event information.</param>
|
||||
/// <summary> Event handler. Called by Button for click events. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AddPersonButton btn = sender as AddPersonButton;
|
||||
@@ -144,20 +145,23 @@ namespace CampusAppWP8.Pages.Person
|
||||
saveContactTask.Show();
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by SearchName for key down events. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Key event information. </param>
|
||||
private void SearchName_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
this.SendRequest(sender,e);
|
||||
this.SendRequest(sender, e);
|
||||
this.ResultBox.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method is called when the selection in the listbox is changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">listbox object.</param>
|
||||
/// <param name="e">event args.</param>
|
||||
/// <summary> Method is called when the selection in the ListBox is changed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> ListBox object. </param>
|
||||
/// <param name="e"> event args. </param>
|
||||
private void Box_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
(sender as ListBox).SelectedIndex = -1;
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PlaceNews.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>09.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the place news.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.PlaceNews
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -21,49 +22,50 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Windows.Networking.Proximity;
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
/// <summary>Place news.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Place news. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class PlaceNews : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
/// <summary>The sps API.</summary>
|
||||
|
||||
/// <summary> The device. </summary>
|
||||
private readonly ProximityDevice device = ProximityDevice.GetDefault();
|
||||
|
||||
/// <summary> The sps API. </summary>
|
||||
private SpsApi spsApi;
|
||||
|
||||
/// <summary>The pis API.</summary>
|
||||
/// <summary> The pis API. </summary>
|
||||
private PisApi pisApi;
|
||||
|
||||
/// <summary>The pss API.</summary>
|
||||
/// <summary> The pss API. </summary>
|
||||
private PssApi pssApi;
|
||||
|
||||
/// <summary>The places.</summary>
|
||||
/// <summary> The places. </summary>
|
||||
private PlacesFile places;
|
||||
|
||||
/// <summary>variable indicates how many apis are running.</summary>
|
||||
/// <summary> variable indicates how many apis are running. </summary>
|
||||
private int waitForApi;
|
||||
|
||||
/// <summary>true to force request.</summary>
|
||||
/// <summary> true to force request. </summary>
|
||||
private bool forceRequest;
|
||||
|
||||
/// <summary>List of search pids.</summary>
|
||||
/// <summary> List of search pids. </summary>
|
||||
private List<string> searchPidList;
|
||||
|
||||
/// <summary> true to qr scan. </summary>
|
||||
private bool qrScan = false;
|
||||
|
||||
/// <summary>The device.</summary>
|
||||
private readonly ProximityDevice device = ProximityDevice.GetDefault();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the PlaceNews class.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the PlaceNews class. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
public PlaceNews()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -76,9 +78,9 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="e">Ein Objekt, das die Ereignisdaten enthält.</param>
|
||||
/// <summary> Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -91,9 +93,9 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.places.Model = App.LoadFromIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces);
|
||||
}
|
||||
|
||||
if (qrScan)
|
||||
if (this.qrScan)
|
||||
{
|
||||
qrScan = false;
|
||||
this.qrScan = false;
|
||||
string qrResult = App.LoadFromIsolatedStorage<string>("PlaceNewsQCCode");
|
||||
App.SaveToIsolatedStorage<string>("PlaceNewsQCCode", null);
|
||||
|
||||
@@ -108,7 +110,6 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
{
|
||||
this.SetupResultBox();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -124,8 +125,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
/// <summary>
|
||||
/// Wird aufgerufen, wenn eine Seite nicht mehr die aktive Seite in einem Frame ist.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="e">Ein Objekt, das die Ereignisdaten enthält.</param>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
@@ -138,8 +139,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>Initializes the API.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Initializes the API. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void InitializeApi()
|
||||
{
|
||||
// init place file
|
||||
@@ -158,7 +159,6 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.spsApi.OnLoaded += new SpsApi.OnIO(this.SpsApiIsReady);
|
||||
this.spsApi.OnFailedLoad += new SpsApi.OnFailed(this.ApiIsFail);
|
||||
this.spsApi.SetupCurrentPlaceRequest(Constants.SpsDomain_Buildings);
|
||||
|
||||
}
|
||||
|
||||
if (this.forceRequest)
|
||||
@@ -195,8 +195,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Places file is fail.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Places file is fail. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void PlacesFileIsFail()
|
||||
{
|
||||
this.places.Model = new SpsModel();
|
||||
@@ -212,8 +212,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.waitForApi++;
|
||||
}
|
||||
|
||||
/// <summary>Places file is ready.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Places file is ready. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void PlacesFileIsReady()
|
||||
{
|
||||
if (this.spsApi == null)
|
||||
@@ -228,8 +228,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.waitForApi++;
|
||||
}
|
||||
|
||||
/// <summary>Pss API is ready.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Pss API is ready. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void PssApiIsReady()
|
||||
{
|
||||
this.waitForApi--;
|
||||
@@ -238,8 +238,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.CheckedSetupResultBox();
|
||||
}
|
||||
|
||||
/// <summary>Pis API is ready.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Pis API is ready. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void PisApiIsReady()
|
||||
{
|
||||
this.waitForApi--;
|
||||
@@ -248,8 +248,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.CheckedSetupResultBox();
|
||||
}
|
||||
|
||||
/// <summary>API is fail.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> API is fail. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void ApiIsFail()
|
||||
{
|
||||
if (this.Dispatcher != null)
|
||||
@@ -259,25 +259,26 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sps API is ready.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Sps API is ready. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void SpsApiIsReady()
|
||||
{
|
||||
this.waitForApi--;
|
||||
if (spsApi.Model.Places.Count > 0)
|
||||
if (this.spsApi.Model.Places.Count > 0)
|
||||
{
|
||||
this.places.Model.AddPlaces(this.spsApi.Model.Places.ToList());
|
||||
this.searchPidList = this.spsApi.Model.CreatePidList();
|
||||
this.SendGetPisPssForPlacenews(this.searchPidList);
|
||||
}
|
||||
|
||||
this.CheckedSetupResultBox();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// send get request to pis andd pss for PlaceNews service
|
||||
/// </summary>
|
||||
/// <param name="pidList">list of place id</param>
|
||||
private void SendGetPisPssForPlacenews(List<string> pidList) {
|
||||
|
||||
/// <summary> send get request to pis and pss for PlaceNews service. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="pidList"> list of place id. </param>
|
||||
private void SendGetPisPssForPlacenews(List<string> pidList)
|
||||
{
|
||||
List<string> infoNames = new List<string>() { Constants.PisInformationName_Name };
|
||||
List<string> serviceNames = new List<string>() { Constants.PssServiceName_PlaceNews };
|
||||
|
||||
@@ -288,14 +289,13 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.SendGetPlaceService(this.searchPidList, serviceNames);
|
||||
|
||||
this.CheckedSetupResultBox();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Method send get for PlaceInformation of certain places
|
||||
/// </summary>
|
||||
/// <param name="pidList">list of place id</param>
|
||||
/// <param name="infoNames">list of informations name</param>
|
||||
/// <param name="force">if its true then force api load</param>
|
||||
|
||||
/// <summary> Method send get for PlaceInformation of certain places. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="pidList"> list of place id. </param>
|
||||
/// <param name="infoNames"> list of information names. </param>
|
||||
/// <param name="force"> (Optional) if its true then force api load. </param>
|
||||
private void SendGetPlaceInformation(List<string> pidList, List<string> infoNames, bool force = false)
|
||||
{
|
||||
if (force || !this.places.Model.ContainsInformationNames(pidList, infoNames))
|
||||
@@ -306,12 +306,11 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method send get for PlaceSetvice of certain places
|
||||
/// </summary>
|
||||
/// <param name="pidList">list of place id</param>
|
||||
/// <param name="serviceNames">list of service name</param>
|
||||
/// <param name="force">if its true then force api load</param>
|
||||
/// <summary> Method send get for PlaceService of certain places. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="pidList"> list of place id. </param>
|
||||
/// <param name="serviceNames"> list of service name. </param>
|
||||
/// <param name="force"> (Optional) if its true then force api load. </param>
|
||||
private void SendGetPlaceService(List<string> pidList, List<string> serviceNames, bool force = false)
|
||||
{
|
||||
if (this.forceRequest || !this.places.Model.ContainsServiceNames(pidList, serviceNames))
|
||||
@@ -322,8 +321,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sets up the result box.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Sets up the result box. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void SetupResultBox()
|
||||
{
|
||||
this.ResultBox.ItemsSource = this.places.Model.FilterByPid(this.searchPidList);
|
||||
@@ -333,10 +332,10 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.forceRequest = false;
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by UpdateButtonAppBar for click events.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
/// <summary> Event handler. Called by UpdateButtonAppBar for click events. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void UpdateButtonAppBar_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = Visibility.Visible;
|
||||
@@ -344,8 +343,8 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
/// <summary>Initialises the API current position force.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Initialises the API current position force. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
private void InitApiCurrentPositionForce()
|
||||
{
|
||||
Utilities.DetermineAndStoreCurrentPositionForce();
|
||||
@@ -353,10 +352,10 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.InitializeApi();
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem for click events.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
/// <summary> Event handler. Called by ApplicationBarMenuItem for click events. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ApplicationBarMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.qrScan = true;
|
||||
@@ -366,18 +365,18 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem_Click for 1 events.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
/// <summary> Event handler. Called by ApplicationBarMenuItem_Click for 1 events. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <param name="sender"> Source of the event. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ApplicationBarMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = Visibility.Visible;
|
||||
this.device.SubscribeForMessage("NDEF", this.NDEFHandler);
|
||||
}
|
||||
|
||||
/// <summary>Checked setup result box.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <summary> Checked setup result box. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
private void CheckedSetupResultBox()
|
||||
{
|
||||
if (this.waitForApi < 1)
|
||||
@@ -395,11 +394,10 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Method set correct text of the TextBlock
|
||||
/// </summary>
|
||||
/// <param name="sender">sender of the event</param>
|
||||
/// <param name="e">some args</param>
|
||||
/// <summary> Method set correct text of the TextBlock. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> sender of the event. </param>
|
||||
/// <param name="e"> some args. </param>
|
||||
private void TextBlock_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
TextBlock txt = sender as TextBlock;
|
||||
@@ -418,10 +416,10 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
txt.Text = place.GetInformationsValue(Constants.PisInformationName_Name);
|
||||
}
|
||||
|
||||
/// <summary>Handler, called when the ndef.</summary>
|
||||
/// <remarks>Stubbfel, 22.08.2013.</remarks>
|
||||
/// <param name="sender"> The sender.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
/// <summary> Handler, called when the ndef. </summary>
|
||||
/// <remarks> Stubbfel, 22.08.2013. </remarks>
|
||||
/// <param name="sender"> The sender. </param>
|
||||
/// <param name="message"> The message. </param>
|
||||
private void NDEFHandler(ProximityDevice sender, ProximityMessage message)
|
||||
{
|
||||
this.device.StopSubscribingForMessage(message.SubscriptionId);
|
||||
@@ -436,6 +434,7 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
this.searchPidList = new List<string>() { pid };
|
||||
this.SendGetPisPssForPlacenews(this.searchPidList);
|
||||
}
|
||||
|
||||
// this.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show(ndef.GetContent())));
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ShowPad.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>09.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the show pad.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.PlaceNews
|
||||
{
|
||||
using System;
|
||||
@@ -14,14 +14,15 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>Show pad.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Show pad. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class ShowPad : PhoneApplicationPage
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the ShowPad class.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the ShowPad class. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
public ShowPad()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -31,9 +32,9 @@ namespace CampusAppWP8.Pages.PlaceNews
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
/// <param name="e">Ein Objekt, das die Ereignisdaten enthält.</param>
|
||||
/// <summary> Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird. </summary>
|
||||
/// <remarks> Stubbfel, 09.09.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamPlaceID))
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<StackPanel Grid.Row="2">
|
||||
<lui:NavigateButton Content="{Binding Path=LocalizedResources.BTUTag_Title, Source={StaticResource LocalizedStrings}}" Url="{Binding Path=Constants.PathBTUTag_Info, Source={StaticResource Const}}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="3">
|
||||
<StackPanel Grid.Row="3" 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>
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="AppSettingPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>12.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the application setting page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using System;
|
||||
using System.Windows.Navigation;
|
||||
using CampusApp8.Model.Setting;
|
||||
using System;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the AppSettingPage
|
||||
/// </summary>
|
||||
/// <summary> Class for the AppSettingPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class AppSettingPage : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
/// <summary> The TagHandler model. </summary>
|
||||
private TagHandlerListPickerItemListModel taghandlerModel;
|
||||
#endregion
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AppSettingPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="AppSettingPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public AppSettingPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -40,10 +41,9 @@ namespace CampusAppWP8.Pages.Setting
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedFrom method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedFrom method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="Impressum.xaml.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 impressum.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
/// <summary> An impressum. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class Impressum : PhoneApplicationPage
|
||||
{
|
||||
/// <summary> Initializes a new instance of the Impressum class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public Impressum()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="UserProfil.xaml.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.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
using System;
|
||||
@@ -12,32 +13,29 @@ namespace CampusAppWP8.Pages.Setting
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the UserProfilePage
|
||||
/// </summary>
|
||||
/// <summary> Class for the UserProfilePage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class UserProfil : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Reference of the profileFile
|
||||
/// </summary>
|
||||
/// <summary> Reference of the profileFile. </summary>
|
||||
private UserProfilModel userProfil;
|
||||
|
||||
/// <summary>List of courses.</summary>
|
||||
/// <summary> List of courses. </summary>
|
||||
private CourseListPickerItemListWp8Model courseList;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserProfil" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="UserProfil" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public UserProfil()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -51,10 +49,9 @@ namespace CampusAppWP8.Pages.Setting
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedFrom method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedFrom method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
@@ -67,8 +64,8 @@ namespace CampusAppWP8.Pages.Setting
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>Loads list picker.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <summary> Loads list picker. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
private void LoadListPicker()
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
@@ -77,9 +74,8 @@ namespace CampusAppWP8.Pages.Setting
|
||||
this.courseList.LoadCourseList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method sets the ItemSource of the ListPickers
|
||||
/// </summary>
|
||||
/// <summary> Method sets the ItemSource of the ListPickers. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SetupListPickers()
|
||||
{
|
||||
DegreeListPickerItemListModel degreeList = new DegreeListPickerItemListModel();
|
||||
@@ -101,9 +97,8 @@ namespace CampusAppWP8.Pages.Setting
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method save the current profile
|
||||
/// </summary>
|
||||
/// <summary> Method save the current profile. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SaveProfile()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StartPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>21.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the start page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Windows.Networking.Proximity;
|
||||
using CampusAppWP8.Feed.Utility;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
@@ -24,30 +24,33 @@ namespace CampusAppWP8.Pages
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.Model.Setting;
|
||||
using Windows.Networking.Proximity;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the StartPage
|
||||
/// </summary>
|
||||
/// <summary> Class for the StartPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class StartPage : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The device.</summary>
|
||||
/// <summary> The device. </summary>
|
||||
private readonly ProximityDevice device = ProximityDevice.GetDefault();
|
||||
|
||||
/// <summary>List of initialise courses.</summary>
|
||||
/// <summary> List of initialise courses. </summary>
|
||||
private CourseFeed initCourseList;
|
||||
|
||||
/// <summary> The previous orientation. </summary>
|
||||
private PageOrientation prevOrientation;
|
||||
|
||||
/// <summary> Identifier for the ndef. </summary>
|
||||
private long ndefId;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StartPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="StartPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public StartPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -82,7 +85,6 @@ namespace CampusAppWP8.Pages
|
||||
{
|
||||
menuItem5.Text = AppResources.Setting_ImpressumTitle;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ApplicationBar.MenuItems.RemoveAt(ApplicationBar.MenuItems.Count - 1);
|
||||
@@ -91,7 +93,7 @@ namespace CampusAppWP8.Pages
|
||||
|
||||
if (!Settings.AppSetting.InitApp)
|
||||
{
|
||||
this.initPlaceFile();
|
||||
this.InitPlaceFile();
|
||||
this.initCourseList = new CourseFeed();
|
||||
this.initCourseList.OnLoaded += new CourseFeed.OnIO(this.StoreCourseFeed);
|
||||
this.initCourseList.LoadData();
|
||||
@@ -107,24 +109,15 @@ namespace CampusAppWP8.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private void initPlaceFile()
|
||||
{
|
||||
PlacesFile file = new PlacesFile();
|
||||
file.LoadData();
|
||||
}
|
||||
|
||||
private long ndefId;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedTo-Method
|
||||
/// </summary>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
/// <summary> Methods overrides the OnNavigatedTo-Method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -137,16 +130,15 @@ namespace CampusAppWP8.Pages
|
||||
this.prevOrientation = PageOrientation.Landscape;
|
||||
}
|
||||
|
||||
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>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
/// <summary> Methods overrides the OnNavigatedFrom-Method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <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);
|
||||
}
|
||||
@@ -155,18 +147,25 @@ namespace CampusAppWP8.Pages
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>Stores course feed.</summary>
|
||||
/// <remarks>Stubbfel, 10.09.2013.</remarks>
|
||||
/// <summary> Initialises the place file. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void InitPlaceFile()
|
||||
{
|
||||
PlacesFile file = new PlacesFile();
|
||||
file.LoadData();
|
||||
}
|
||||
|
||||
/// <summary> Stores course feed. </summary>
|
||||
/// <remarks> Stubbfel, 10.09.2013. </remarks>
|
||||
private void StoreCourseFeed()
|
||||
{
|
||||
this.initCourseList.SaveData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method handle OrientationPage
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
/// <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)
|
||||
{
|
||||
// Switch the placement of the buttons based on an orientation change.
|
||||
@@ -203,8 +202,8 @@ namespace CampusAppWP8.Pages
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Move to Portrait format.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Move to Portrait format. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
private void MoveToPortrait()
|
||||
{
|
||||
if (!this.Row0.Children.Contains(this.MailAppButton)
|
||||
@@ -213,6 +212,7 @@ namespace CampusAppWP8.Pages
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.Row0.Children.Remove(this.MailAppButton);
|
||||
this.Row3.Children.Add(this.MailAppButton);
|
||||
this.MailAppButton.SetValue(Grid.ColumnProperty, 0);
|
||||
@@ -226,8 +226,8 @@ namespace CampusAppWP8.Pages
|
||||
this.LinkAppButton.SetValue(Grid.ColumnProperty, 2);
|
||||
}
|
||||
|
||||
/// <summary>Move Grid to landscape format.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <summary> Move Grid to landscape format. </summary>
|
||||
/// <remarks> Stubbfel, 27.08.2013. </remarks>
|
||||
private void MoveGridToLandscape()
|
||||
{
|
||||
if (!this.Row3.Children.Contains(this.MailAppButton)
|
||||
@@ -238,7 +238,7 @@ namespace CampusAppWP8.Pages
|
||||
}
|
||||
|
||||
this.Row3.Children.Remove(this.MailAppButton);
|
||||
this.Row0.Children.Add(this.MailAppButton); ;
|
||||
this.Row0.Children.Add(this.MailAppButton);
|
||||
this.MailAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
this.Row3.Children.Remove(this.OpenHoursAppButton);
|
||||
@@ -250,33 +250,30 @@ namespace CampusAppWP8.Pages
|
||||
this.LinkAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method Navigate to <see cref="Setting/UserProfil"/>
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
/// <summary> Method Navigate to <see cref="Setting/UserProfil"/> </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void ApplicationBarMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathSetting_User, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method Navigate to <see cref="Setting/UserProfil"/>
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
/// <summary> Method Navigate to <see cref="Setting/UserProfil"/> </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void ApplicationBarMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathSetting_App, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method Navigate to <see cref="Setting/UserProfil"/>
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
/// <summary> Method Navigate to <see cref="Setting/UserProfil"/> </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void ApplicationBarMenuItem4_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.device.StopSubscribingForMessage(this.ndefId);
|
||||
@@ -290,25 +287,23 @@ namespace CampusAppWP8.Pages
|
||||
private void ApplicationBarMenuItem5_Click(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri("/Pages/Setting/Impressum.xaml", UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event handler. Called by ApplicationBarMenuItem4 for click events.
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function.</param>
|
||||
/// <param name="e">Event information.</param>
|
||||
/// <summary> Event handler. Called by ApplicationBarMenuItem4 for click events. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> Event information. </param>
|
||||
private void ApplicationBarMenuItem3_Click(object sender, EventArgs e)
|
||||
{
|
||||
Uri url = new Uri("/Pages/Dev/QRScanner.xaml", UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method change the Opacity of the ApplicationBar
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
/// <summary> Method change the Opacity of the ApplicationBar. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> some EventArgs. </param>
|
||||
private void ApplicationBar_StateChanged(object sender, ApplicationBarStateChangedEventArgs e)
|
||||
{
|
||||
if (e.IsMenuVisible)
|
||||
@@ -321,17 +316,15 @@ namespace CampusAppWP8.Pages
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method show all OptIns
|
||||
/// </summary>
|
||||
/// <summary> Method show all OptIns. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void ShowOptIns()
|
||||
{
|
||||
this.GeoWatchOptIN();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method show the GeoWatchOptIn in a MessageBox
|
||||
/// </summary>
|
||||
/// <summary> Method show the GeoWatchOptIn in a MessageBox. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void GeoWatchOptIN()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowGoeWatchOptInBox();
|
||||
@@ -348,6 +341,10 @@ namespace CampusAppWP8.Pages
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Event handler. Called by PintoStart for click events. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="e"> Routed event information. </param>
|
||||
private void PintoStart_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement elment = sender as FrameworkElement;
|
||||
@@ -404,9 +401,12 @@ namespace CampusAppWP8.Pages
|
||||
TileCreator.CreatePlaceNewsTile();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary> Handler, called when the ndef. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> Caller of the function. </param>
|
||||
/// <param name="message"> The message. </param>
|
||||
private void NDEFHandler(ProximityDevice sender, ProximityMessage message)
|
||||
{
|
||||
// create ndefMessage
|
||||
@@ -433,10 +433,13 @@ namespace CampusAppWP8.Pages
|
||||
this.ShowBtuTagMessageBox();
|
||||
}
|
||||
}
|
||||
|
||||
ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
|
||||
this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
|
||||
}
|
||||
|
||||
/// <summary> Go to campus MapPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="tagContent"> The tag content. </param>
|
||||
private void GoToCampusMappage(string tagContent)
|
||||
{
|
||||
string pid = Wp8StringManager.FilterPlaceIdinNFCResultString(tagContent);
|
||||
@@ -452,9 +455,10 @@ namespace CampusAppWP8.Pages
|
||||
{
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary> Shows the btu tag message box. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void ShowBtuTagMessageBox()
|
||||
{
|
||||
MessageBoxResult msgResult = MessageBoxes.ShowBtuTagInfoOkCancelMessageBox();
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StudentCouncilPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the student council page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.StudentCouncil
|
||||
{
|
||||
using System;
|
||||
@@ -16,25 +17,22 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the StudentCouncilPage
|
||||
/// </summary>
|
||||
/// <summary> Class for the StudentCouncilPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class StudentCouncilPage : PhoneApplicationPage
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// the feed of the StudentCouncil
|
||||
/// </summary>
|
||||
/// <summary> the feed of the StudentCouncil. </summary>
|
||||
private StudentCouncilFeed feed;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="StudentCouncilPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public StudentCouncilPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -47,10 +45,9 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedTo method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedTo(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
@@ -69,19 +66,17 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
this.feed.LoadData(Utilities.GetLoadModus<CampusAppWPortalLib8.Model.StudentCouncil.StudentCouncilListModel>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedFrom method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
/// <summary> Override the OnNavigatedFrom method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Controls.Page.OnNavigatedFrom(NavigationEventArgs)"/>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
this.feed.SaveData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnOrientationChanged method.
|
||||
/// </summary>
|
||||
/// <param name="e">orientation changed args.</param>
|
||||
/// <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
|
||||
@@ -101,9 +96,8 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
#endregion
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Method initialize the Feed
|
||||
/// </summary>
|
||||
/// <summary> Method initialize the Feed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void InitializeFeed()
|
||||
{
|
||||
this.feed = new StudentCouncilFeed();
|
||||
@@ -112,47 +106,43 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
this.feed.OnFailedFile += new StudentCouncilFeed.OnFailed(this.FeedIsFailFile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is ready
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is ready. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FeedIsReady()
|
||||
{
|
||||
this.SetupStudentCouncilPivot();
|
||||
this.DefHeader.ProgressVisibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set ItemSource
|
||||
/// </summary>
|
||||
/// <summary> Method set ItemSource. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void SetupStudentCouncilPivot()
|
||||
{
|
||||
this.StudentCouncilPivot.ItemsSource = this.feed.Model.GetStudentCouncilsGroupByFaculty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the update button in the ApplicationBar.
|
||||
/// Force a data update from the web.
|
||||
/// On clicking the update button in the ApplicationBar. Force a data update from the web.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="sender"> button object. </param>
|
||||
/// <param name="e"> event args. </param>
|
||||
private void StudentForceUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DefHeader.ProgressVisibility = System.Windows.Visibility.Visible;
|
||||
this.feed.ForceWebUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FeedIsFailWeb()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
|
||||
this.feed.ForceReadFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
/// <summary> Method will be execute if the feed is failed. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void FeedIsFailFile()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="WebmailPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>12.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the webmail page.xaml class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Webmail
|
||||
{
|
||||
using System;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the WebmailPage
|
||||
/// </summary>
|
||||
/// <summary> Class for the WebmailPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:Microsoft.Phone.Controls.PhoneApplicationPage"/>
|
||||
public partial class WebmailPage : PhoneApplicationPage
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WebmailPage" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="WebmailPage" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public WebmailPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
@@ -31,9 +31,8 @@ namespace CampusAppWP8.Pages.Webmail
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method load WebmailPage
|
||||
/// </summary>
|
||||
/// <summary> Method load WebmailPage. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
private void LoadWebmailPage()
|
||||
{
|
||||
this.WebmailBrowser.Navigate(new Uri(Constants.UrlWebMail_Addr, UriKind.Absolute));
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<Value>api</Value>
|
||||
<Value>apis</Value>
|
||||
<Value>enum</Value>
|
||||
<Value>fiedlchr</Value>
|
||||
<Value>initialise</Value>
|
||||
<Value>initialises</Value>
|
||||
<Value>ndef</Value>
|
||||
@@ -22,11 +23,19 @@
|
||||
<Value>sps</Value>
|
||||
<Value>Stubbfel</Value>
|
||||
<Value>uni</Value>
|
||||
<Value>wc</Value>
|
||||
<Value>wifi</Value>
|
||||
</CollectionProperty>
|
||||
</GlobalSettings>
|
||||
<Analyzers>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
|
||||
<Rules>
|
||||
<Rule Name="ElementParametersMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings>
|
||||
<StringProperty Name="CompanyName">BTU/IIT</StringProperty>
|
||||
<StringProperty Name="Copyright">The MIT License (MIT). Copyright (c) 2013 BTU/IIT.</StringProperty>
|
||||
|
||||
@@ -1,28 +1,25 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="AppUriMapper.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>26.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the application URI mapper class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Resources;
|
||||
using System.Windows.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class map Uri to AppPages
|
||||
/// </summary>
|
||||
|
||||
/// <summary> Class map Uri to AppPages. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:System.Windows.Navigation.UriMapperBase"/>
|
||||
public class AppUriMapper : UriMapperBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Method overrides MapUri from UriMapperBase
|
||||
/// </summary>
|
||||
/// <param name="uri">the url</param>
|
||||
/// <returns>the mapped url</returns>
|
||||
/// <summary> Method overrides MapUri from UriMapperBase. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Navigation.UriMapperBase.MapUri(Uri)"/>
|
||||
public override Uri MapUri(Uri uri)
|
||||
{
|
||||
string tempUri = uri.ToString();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="BackgroundTasks.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>18.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the background tasks class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
@@ -13,16 +13,15 @@ namespace CampusAppWP8.Utility
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
using Microsoft.Phone.Scheduler;
|
||||
|
||||
/// <summary>
|
||||
/// Class provide some static methods for background tasks
|
||||
/// </summary>
|
||||
/// <summary> Class provide some static methods for background tasks. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Utility.AbstractBackgroundTasks"/>
|
||||
public class BackgroundTasks : AbstractBackgroundTasks
|
||||
{
|
||||
/// <summary>
|
||||
/// Method start a certain PerodicTask
|
||||
/// </summary>
|
||||
/// <param name="taskName">name of the task</param>
|
||||
/// <param name="taskDesc">description of the task</param>
|
||||
/// <summary> Method start a certain PerodicTask. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="taskName"> name of the task. </param>
|
||||
/// <param name="taskDesc"> description of the task. </param>
|
||||
public static void StartPerodicTask(string taskName, string taskDesc)
|
||||
{
|
||||
BackgroundTasks.StopPerodicTask(BackgroundTasks.LastAddedTaskName);
|
||||
@@ -48,10 +47,9 @@ namespace CampusAppWP8.Utility
|
||||
BackgroundTasks.LastAddedTaskName = taskName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method stop a certain PerodicTask
|
||||
/// </summary>
|
||||
/// <param name="taskName">name of the task</param>
|
||||
/// <summary> Method stop a certain PerodicTask. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="taskName"> name of the task. </param>
|
||||
public static void StopPerodicTask(string taskName)
|
||||
{
|
||||
if (taskName == null)
|
||||
@@ -73,22 +71,19 @@ namespace CampusAppWP8.Utility
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method start BTUCampusAppBackgroundTask
|
||||
/// </summary>
|
||||
/// <summary> Method start BTUCampusAppBackgroundTask. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public static void StartBTUCampusAppTask()
|
||||
{
|
||||
int campusId = (int)Settings.UserProfil.DefaultCampus;
|
||||
BackgroundTasks.StartPerodicTask(Constants.BackgroundTask_BTUCampusApp, AppResources.BackGroundTaskDesc_BTUCampusApp + " - Feed " + campusId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method stop BTUCampusAppBackgroundTask
|
||||
/// </summary>
|
||||
/// <summary> Method stop BTUCampusAppBackgroundTask. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public static void StopBTUCampusAppTask()
|
||||
{
|
||||
BackgroundTasks.StopPerodicTask(Constants.BackgroundTask_BTUCampusApp);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,38 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="BoolToVisibilityConverter.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>10.10.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements to visibility converter class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
/// <summary> to visibility converter. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:System.Windows.Data.IValueConverter"/>
|
||||
public sealed class BoolToVisibilityConverter : IValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Ändert die Quelldaten vor der Übergabe an das Ziel zur Anzeige in der Benutzeroberfläche.
|
||||
/// </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Data.IValueConverter.Convert(object,Type,object,System.Globalization.CultureInfo)"/>
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
return (value is bool && (bool)value) ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ändert die Zieldaten vor der Übergabe an das Quellobjekt. Diese Methode wird nur in
|
||||
/// <see cref="F:System.Windows.Data.BindingMode.TwoWay" />-Bindungen aufgerufen.
|
||||
/// </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:System.Windows.Data.IValueConverter.ConvertBack(object,Type,object,System.Globalization.CultureInfo)"/>
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo language)
|
||||
{
|
||||
return (value is Visibility && (Visibility)value == Visibility.Visible);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="File.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the file class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
@@ -14,30 +15,26 @@ namespace CampusAppWP8.Utility
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
using Windows.Storage;
|
||||
|
||||
/// <summary>
|
||||
/// File class.
|
||||
/// </summary>
|
||||
/// <summary> File class. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Utility.AbstractFile"/>
|
||||
public class File : AbstractFile
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Folder object.
|
||||
/// </summary>
|
||||
/// <summary> Folder object. </summary>
|
||||
private static readonly IStorageFolder LocalFolder = ApplicationData.Current.LocalFolder;
|
||||
|
||||
/// <summary>
|
||||
/// File name.
|
||||
/// </summary>
|
||||
/// <summary> File name. </summary>
|
||||
private string filename = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="File" /> class.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="filename"> file name.</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="File" /> class. </summary>
|
||||
/// <remarks> fiedlchr, 03.09.2013. </remarks>
|
||||
/// <param name="filename"> file name. </param>
|
||||
public File(string filename)
|
||||
{
|
||||
this.filename = filename;
|
||||
@@ -49,9 +46,9 @@ namespace CampusAppWP8.Utility
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>Read data from file to a string.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <returns>data string.</returns>
|
||||
/// <summary> Read data from file to a string. </summary>
|
||||
/// <remarks> fiedlchr, 03.09.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Utility.AbstractFile.ReadFile()"/>
|
||||
public override byte[] ReadFile()
|
||||
{
|
||||
byte[] retValue = null;
|
||||
@@ -64,31 +61,27 @@ namespace CampusAppWP8.Utility
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>Write bytes to the file.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="data"> data byte array.</param>
|
||||
/// <param name="onSavedCallback"> callback function, called after writing is done.</param>
|
||||
/// <param name="onFailedCallback">callback function, called when writing failed.</param>
|
||||
/// <summary> Write bytes to the file. </summary>
|
||||
/// <remarks> fiedlchr, 03.09.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Utility.AbstractFile.WriteFile(byte[],WriteCallbackFunc,WriteCallbackFunc)"/>
|
||||
public override void WriteFile(byte[] data, WriteCallbackFunc onSavedCallback, WriteCallbackFunc onFailedCallback)
|
||||
{
|
||||
Thread th = new Thread(delegate() { this.WriteAsync(data, onSavedCallback, onFailedCallback); });
|
||||
th.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a info object of the file.
|
||||
/// </summary>
|
||||
/// <returns>info of the file</returns>
|
||||
/// <summary> Return a info object of the file. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> info of the file. </returns>
|
||||
public FileInfo GetFileInfo()
|
||||
{
|
||||
FileInfo info = new FileInfo(File.LocalFolder.Path + "\\" + this.filename);
|
||||
return info;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if a file is existing.
|
||||
/// </summary>
|
||||
/// <returns>true, if file exists, otherwise false</returns>
|
||||
/// <summary> Check if a file is existing. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <seealso cref="M:CampusAppWPortalLib8.Utility.AbstractFile.Exist()"/>
|
||||
public override bool Exist()
|
||||
{
|
||||
FileInfo info = this.GetFileInfo();
|
||||
@@ -102,9 +95,9 @@ namespace CampusAppWP8.Utility
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Converts this object to a storage file.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <returns>Storage File</returns>
|
||||
/// <summary> Converts this object to a storage file. </summary>
|
||||
/// <remarks> fiedlchr, 03.09.2013. </remarks>
|
||||
/// <returns> Storage File. </returns>
|
||||
public async Task<StorageFile> AsStorageFile()
|
||||
{
|
||||
if (this.Exist())
|
||||
@@ -119,10 +112,9 @@ namespace CampusAppWP8.Utility
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Read data synchronous from file.
|
||||
/// </summary>
|
||||
/// <returns>data string</returns>
|
||||
/// <summary> Read data synchronous from file. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <returns> data string. </returns>
|
||||
private byte[] ReadSync()
|
||||
{
|
||||
byte[] retValue = null;
|
||||
@@ -139,12 +131,11 @@ namespace CampusAppWP8.Utility
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write data asynchronous to file.
|
||||
/// </summary>
|
||||
/// <param name="data">data array.</param>
|
||||
/// <param name="onSavedCallback">callback function, called when writing is done.</param>
|
||||
/// <param name="onFailedCallback">callback function, called when writing failed.</param>
|
||||
/// <summary> Write data asynchronous to file. </summary>
|
||||
/// <remarks> fiedlchr, 15.10.2013. </remarks>
|
||||
/// <param name="data"> data array. </param>
|
||||
/// <param name="onSavedCallback"> callback function, called when writing is done. </param>
|
||||
/// <param name="onFailedCallback"> callback function, called when writing failed. </param>
|
||||
private async void WriteAsync(byte[] data, WriteCallbackFunc onSavedCallback, WriteCallbackFunc onFailedCallback)
|
||||
{
|
||||
Logger.LogMsg("writeasync file: " + this.filename);
|
||||
|
||||
@@ -1,37 +1,33 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="HttpRequest.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>
|
||||
//----------------------------------------------------------------------using System;
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the HTTP request class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Model.Utility;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class realize the access of restful HttpRequest
|
||||
/// </summary>
|
||||
/// <summary> Class realize the access of restful HttpRequest. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <seealso cref="T:CampusAppWPortalLib8.Utility.AbstractHttpRequest"/>
|
||||
public class HttpRequest : AbstractHttpRequest
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HttpRequest" /> class.
|
||||
/// </summary>
|
||||
/// <summary> Initializes a new instance of the <see cref="HttpRequest" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
public HttpRequest()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HttpRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="apiBaseAddress">the url of the HttpRequest base address</param>
|
||||
/// <summary> Initializes a new instance of the <see cref="HttpRequest" /> class. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="apiBaseAddress"> the url of the HttpRequest base address. </param>
|
||||
public HttpRequest(Uri apiBaseAddress)
|
||||
{
|
||||
this.BaseAddress = apiBaseAddress.AbsoluteUri;
|
||||
@@ -42,11 +38,10 @@ namespace CampusAppWP8.Utility
|
||||
#region Methods
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-get-method resource
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <summary> Method realize the http-get-method resource. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
public void HttpGet(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
WebClient client = new WebClient();
|
||||
@@ -54,10 +49,10 @@ namespace CampusAppWP8.Utility
|
||||
client.DownloadStringAsync(url);
|
||||
}
|
||||
|
||||
/// <summary>Method realize the http-get-method resource.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="url"> Url of the resource.</param>
|
||||
/// <param name="action">The action.</param>
|
||||
/// <summary> Method realize the http-get-method resource. </summary>
|
||||
/// <remarks> Stubbfel, 03.09.2013. </remarks>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> The action. </param>
|
||||
public void HttpGet(Uri url, Action<object, OpenReadCompletedEventArgs> action)
|
||||
{
|
||||
WebClient client = new WebClient();
|
||||
@@ -65,99 +60,91 @@ namespace CampusAppWP8.Utility
|
||||
client.OpenReadAsync(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-delete-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <summary> Method realize the http-delete-method. </summary>
|
||||
/// <remarks> is not supported by WebClient. </remarks>
|
||||
/// <exception cref="NotSupportedException">
|
||||
/// Thrown when the requested operation is not supported.
|
||||
/// </exception>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
public void HttpDelete(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-head-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <summary> Method realize the http-head-method. </summary>
|
||||
/// <remarks> is not supported by WebClient. </remarks>
|
||||
/// <exception cref="NotSupportedException">
|
||||
/// Thrown when the requested operation is not supported.
|
||||
/// </exception>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
public void HttpHead(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-options-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <summary> Method realize the http-options-method. </summary>
|
||||
/// <remarks> is not supported by WebClient. </remarks>
|
||||
/// <exception cref="NotSupportedException">
|
||||
/// Thrown when the requested operation is not supported.
|
||||
/// </exception>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
public void HttpOptions(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-connect-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <summary> Method realize the http-connect-method. </summary>
|
||||
/// <remarks> is not supported by WebClient. </remarks>
|
||||
/// <exception cref="NotSupportedException">
|
||||
/// Thrown when the requested operation is not supported.
|
||||
/// </exception>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
public void HttpConnect(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-trace-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <summary> Method realize the http-trace-method. </summary>
|
||||
/// <remarks> is not supported by WebClient. </remarks>
|
||||
/// <exception cref="NotSupportedException">
|
||||
/// Thrown when the requested operation is not supported.
|
||||
/// </exception>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
public void HttpTrace(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-post-method
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <param name="postData">Data which are sending via post to the HttpRequest</param>
|
||||
/// <summary> Method realize the http-post-method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
/// <param name="postData"> Data which are sending via post to the HttpRequest. </param>
|
||||
public void HttpPost(Uri url, Action<object, UploadStringCompletedEventArgs> action, string postData)
|
||||
{
|
||||
this.UploadData(url, action, "POST", postData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-put-method
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <param name="putData">Data which are sending via put to the HttpRequest</param>
|
||||
/// <summary> Method realize the http-put-method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
/// <param name="putData"> Data which are sending via put to the HttpRequest. </param>
|
||||
public void HttpPut(Uri url, Action<object, UploadStringCompletedEventArgs> action, string putData)
|
||||
{
|
||||
this.UploadData(url, action, "PUT", putData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-patch-method
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <param name="patchData">Data which are sending via patch to the HttpRequest</param>
|
||||
/// <summary> Method realize the http-patch-method. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
/// <param name="patchData"> Data which are sending via patch to the HttpRequest. </param>
|
||||
public void HttpPatch(Uri url, Action<object, UploadStringCompletedEventArgs> action, string patchData)
|
||||
{
|
||||
this.UploadData(url, action, "PATCH", patchData);
|
||||
@@ -167,13 +154,12 @@ namespace CampusAppWP8.Utility
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Method uploaded Data to the HttpRequest
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <param name="method">name of APIMethod, how the data will be uploaded</param>
|
||||
/// <param name="data">Data which are sending to the HttpRequest</param>
|
||||
/// <summary> Method uploaded Data to the HttpRequest. </summary>
|
||||
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
||||
/// <param name="url"> Url of the resource. </param>
|
||||
/// <param name="action"> callback method. </param>
|
||||
/// <param name="method"> name of APIMethod, how the data will be uploaded. </param>
|
||||
/// <param name="data"> Data which are sending to the HttpRequest. </param>
|
||||
private void UploadData(Uri url, Action<object, UploadStringCompletedEventArgs> action, string method, string data)
|
||||
{
|
||||
WebClient client = new WebClient();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="AddPersonButton.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>09.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// <author>Stubbfel</author>
|
||||
// <date>15.10.2013</date>
|
||||
// <summary>Implements the add person button class</summary>
|
||||
//-----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Lui.Button
|
||||
{
|
||||
using System;
|
||||
@@ -14,27 +14,28 @@ namespace CampusAppWP8.Utility.Lui.Button
|
||||
using System.Windows.Media.Imaging;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Add person button.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <summary> Add person button. </summary>
|
||||
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
||||
/// <seealso cref="T:System.Windows.Controls.Button"/>
|
||||
public class AddPersonButton : System.Windows.Controls.Button
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>The person identifier property.</summary>
|
||||
/// <summary> The person identifier property. </summary>
|
||||
public static readonly DependencyProperty PersonIdProperty = DependencyProperty.Register("PersonID", typeof(object), typeof(AddPersonButton), new PropertyMetadata(false));
|
||||
|
||||
/// <summary>The function index property.</summary>
|
||||
/// <summary> The function index property. </summary>
|
||||
public static readonly DependencyProperty FunctionIndexProperty = DependencyProperty.Register("FunctionIndex", typeof(object), typeof(AddPersonButton), new PropertyMetadata(false));
|
||||
|
||||
/// <summary>The icon.</summary>
|
||||
/// <summary> The icon. </summary>
|
||||
private static BitmapImage icon = new BitmapImage(new Uri(Icons.AddContact, UriKind.Relative));
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>Initializes a new instance of the AddPersonButton class.</summary>
|
||||
/// <remarks>Stubbfel, 12.09.2013.</remarks>
|
||||
/// <summary> Initializes a new instance of the AddPersonButton class. </summary>
|
||||
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
||||
public AddPersonButton()
|
||||
: base()
|
||||
{
|
||||
@@ -48,16 +49,16 @@ namespace CampusAppWP8.Utility.Lui.Button
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the identifier of the person.</summary>
|
||||
/// <value>The identifier of the person.</value>
|
||||
/// <summary> Gets or sets the identifier of the person. </summary>
|
||||
/// <value> The identifier of the person. </value>
|
||||
public object PersonId
|
||||
{
|
||||
get { return (object)this.GetValue(PersonIdProperty); }
|
||||
set { this.SetValue(PersonIdProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets zero-based index of the function.</summary>
|
||||
/// <value>The function index.</value>
|
||||
/// <summary> Gets or sets zero-based index of the function. </summary>
|
||||
/// <value> The function index. </value>
|
||||
public object FunctionIndex
|
||||
{
|
||||
get { return (object)this.GetValue(FunctionIndexProperty); }
|
||||
|
||||