merged develop into #173

This commit is contained in:
Christian Fiedler
2013-09-23 09:55:33 +02:00
98 changed files with 4017 additions and 1631 deletions

View File

@@ -35,7 +35,7 @@ namespace CampusAppDLL.Model.Campusmap
this.Spatial = new SpsModel();
foreach (PlaceModel place in model.Places)
{
if (Campus.Equals(place.ParentId) || Campus.Equals(place.PlaceId))
if (place.ParentId.StartsWith(CBMainMapModel.Campus))
{
this.Spatial.Places.Add(place);
}

View File

@@ -11,6 +11,8 @@ Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "IconCreator", "IconCreator\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppDLL", "CampusAppDLL\CampusAppDLL.csproj", "{E4EC5B95-06FC-4304-97E2-9E3F9B980303}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8ScheduledTaskAgent", "CampusAppWP8ScheduledTaskAgent\CampusAppWP8ScheduledTaskAgent.csproj", "{2A51FA6C-791B-4935-B869-FDBA9ED774D7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -139,6 +141,28 @@ Global
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Win32.ActiveCfg = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|x64.ActiveCfg = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|x86.ActiveCfg = Release|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|ARM.ActiveCfg = Debug|ARM
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|ARM.Build.0 = Debug|ARM
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Win32.ActiveCfg = Debug|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Win32.Build.0 = Debug|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|x86.ActiveCfg = Debug|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|x86.Build.0 = Debug|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Any CPU.Build.0 = Release|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|ARM.ActiveCfg = Release|ARM
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|ARM.Build.0 = Release|ARM
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Mixed Platforms.ActiveCfg = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Mixed Platforms.Build.0 = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Win32.ActiveCfg = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Win32.Build.0 = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|x64.ActiveCfg = Release|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|x86.ActiveCfg = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -12,7 +12,8 @@ namespace CampusAppWP8.Api.GeoApi
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Resources;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>Pis api.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>

View File

@@ -13,6 +13,7 @@ namespace CampusAppWP8.Api.GeoApi
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>Pss api.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>

View File

@@ -12,7 +12,8 @@ namespace CampusAppWP8.Api.GeoApi
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>
/// Class for SPSAPI

View File

@@ -164,7 +164,7 @@ namespace CampusAppWP8
if (Settings.AppSetting.GeoWatchEnable)
{
Thread thread = new Thread(new ThreadStart(Utilities.DetermineAndStoreCurrentPosition));
Thread thread = new Thread(new ThreadStart(Utilities.DetermineAndStoreCurrentPositionForce));
thread.Start();
}
}

View File

@@ -122,7 +122,6 @@
<Compile Include="Model\GeoDb\PlaceModel.cs" />
<Compile Include="Model\GeoDb\PlaceService.cs" />
<Compile Include="Model\GeoDb\SpsModel.cs" />
<Compile Include="Model\Mensa\MealModel.cs" />
<Compile Include="Model\Person\PersonFunctionModel.cs" />
<Compile Include="Model\Person\PersonListModel.cs" />
<Compile Include="Model\Person\PersonModel.cs" />
@@ -133,7 +132,6 @@
<Compile Include="Model\Utility\CourseListPickerItemListModel.cs" />
<Compile Include="Model\Utility\CourseModel.cs" />
<Compile Include="Model\Utility\DegreeListPickerItemListModel.cs" />
<Compile Include="Model\Utility\CleanUrlParamModel.cs" />
<Compile Include="Model\Utility\CampusListPickerItemListModel.cs" />
<Compile Include="Pages\TimeTable\Appointment.xaml.cs">
<DependentUpon>Appointment.xaml</DependentUpon>
@@ -208,7 +206,9 @@
<Compile Include="Pages\PlaceNews\ShowPad.xaml.cs">
<DependentUpon>ShowPad.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\BackgroundTasks.cs" />
<Compile Include="Utility\Lui\Button\AddPersonButton.cs" />
<Compile Include="Utility\Lui\Tiles\TileCreator.cs" />
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
<Compile Include="Utility\NDEF\NDEFShortRecord.cs" />
@@ -241,8 +241,6 @@
<Compile Include="Model\Departments\ChairModel.cs" />
<Compile Include="Model\Departments\DepartmentModel.cs" />
<Compile Include="Model\Departments\FacultyModel.cs" />
<Compile Include="Model\RSS\RSSChannelModel.cs" />
<Compile Include="Model\RSS\RSSViewModel.cs" />
<Compile Include="Model\Lecture\LectureActivity.cs" />
<Compile Include="Model\Lecture\LectureCourse.cs" />
<Compile Include="Model\Lecture\LectureDate.cs" />
@@ -253,13 +251,10 @@
<Compile Include="Model\MainModel.cs" />
<Compile Include="Model\Link\LinkModel.cs" />
<Compile Include="Model\Link\LinkListModel.cs" />
<Compile Include="Model\Mensa\MenuModel.cs" />
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
<Compile Include="Model\Openinghours\OpeninghoursInstitutionModel.cs" />
<Compile Include="Model\Openinghours\OpeninghoursModel.cs" />
<Compile Include="Model\StudentCouncil\StudentCouncilListModel.cs" />
<Compile Include="Model\StudentCouncil\StudentCouncilModel.cs" />
<Compile Include="Model\Utility\UrlParamModel.cs" />
<Compile Include="Model\XmlModel.cs" />
<Compile Include="Pages\Campusmap\CampusMapPage.xaml.cs">
<DependentUpon>CampusMapPage.xaml</DependentUpon>
@@ -312,7 +307,6 @@
<Compile Include="Pages\News\NewsPage.xaml.cs">
<DependentUpon>NewsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Model\RSS\RSSModel.cs" />
<Compile Include="Pages\Openinghours\OpeninghoursPage.xaml.cs">
<DependentUpon>OpeninghoursPage.xaml</DependentUpon>
</Compile>
@@ -338,7 +332,6 @@
</Compile>
<Compile Include="ThemelizedIcons.cs" />
<Compile Include="Utility\File.cs" />
<Compile Include="Utility\Logger.cs" />
<Compile Include="Utility\HttpRequest.cs" />
<Compile Include="Utility\Lui\Button\GoToMapButton.cs" />
<Compile Include="Utility\Lui\Button\UpdateButtonAppBar.cs" />
@@ -350,11 +343,10 @@
<Compile Include="Pages\Dev\QRScanner.xaml.cs">
<DependentUpon>QRScanner.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\StringManager.cs" />
<Compile Include="Utility\Wp8StringManager.cs" />
<Compile Include="Utility\Utilities.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Utility\XmlManager.cs" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
@@ -618,7 +610,16 @@
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\CampusAppWP8ScheduledTaskAgent\CampusAppWP8ScheduledTaskAgent.csproj">
<Project>{2A51FA6C-791B-4935-B869-FDBA9ED774D7}</Project>
<Name>CampusAppWP8ScheduledTaskAgent</Name>
</ProjectReference>
<ProjectReference Include="..\CampusAppWPortalLib8\CampusAppWPortalLib8.csproj">
<Project>{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}</Project>
<Name>CampusAppWPortalLib8</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -9,10 +9,10 @@ namespace CampusAppWP8.Feed.Events
{
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.RSS;
using CampusAppWP8.Model;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// Event Feed.
@@ -26,7 +26,7 @@ namespace CampusAppWP8.Feed.Events
/// </summary>
/// <param name="autoLoad">automatic loading of the data</param>
public EventFeed(bool autoLoad = true)
: base(ModelType.FileAndFeed, Constants.FileEvents_Name, Constants.UrlEvents_Addr)
: base(ModelType.FileAndFeed, Constants.FileEvents_Name, CampusAppWPortalLib8.Resources.Constants.UrlEvents_Addr)
{
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);

View File

@@ -10,7 +10,7 @@ namespace CampusAppWP8.Feed.Mensa
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.Mensa;
using CampusAppWPortalLib8.Model.Mensa;
/// <summary>
/// This Class is for MensaFeeds

View File

@@ -20,7 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
/// Initializes a new instance of the <see cref="MensaFeedCBMain" /> class.
/// </summary>
public MensaFeedCBMain()
: base(Constants.FileMensa_Shedule_CBMain, Constants.UrlMensa_Week_CBMain)
: base(Constants.FileMensa_Shedule_CBMain, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBMain)
{
this.Title = AppResources.Campus_CBMain;
}

View File

@@ -20,7 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
/// Initializes a new instance of the <see cref="MensaFeedCBNorth" /> class.
/// </summary>
public MensaFeedCBNorth()
: base(Constants.FileMensa_Shedule_CBNorth, Constants.UrlMensa_Week_CBNorth)
: base(Constants.FileMensa_Shedule_CBNorth, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBNorth)
{
this.Title = AppResources.Campus_CBNorth;
}

View File

@@ -20,7 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
/// Initializes a new instance of the <see cref="MensaFeedCBSouth" /> class.
/// </summary>
public MensaFeedCBSouth()
: base(Constants.FileMensa_Shedule_CBSouth, Constants.UrlMensa_Week_CBSouth)
: base(Constants.FileMensa_Shedule_CBSouth, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBSouth)
{
this.Title = AppResources.Campus_CBSouth;
}

View File

@@ -20,7 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
/// Initializes a new instance of the <see cref="MensaFeedSBFMain" /> class.
/// </summary>
public MensaFeedSBFMain()
: base(Constants.FileMensa_Shedule_SBFMain, Constants.UrlMensa_Week_SBFMain)
: base(Constants.FileMensa_Shedule_SBFMain, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_SBFMain)
{
this.Title = AppResources.Campus_SFBMain;
}

View File

@@ -10,9 +10,9 @@ namespace CampusAppWP8.Feed.News
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.RSS;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// News Feed.
@@ -26,7 +26,7 @@ namespace CampusAppWP8.Feed.News
/// </summary>
/// <param name="autoLoad">automatic loading of the data</param>
public NewsFeed(bool autoLoad = true)
: base(ModelType.FileAndFeed, Constants.FileNews_Name, Constants.UrlNews_Addr)
: base(ModelType.FileAndFeed, Constants.FileNews_Name, CampusAppWPortalLib8.Resources.Constants.UrlNews_Addr)
{
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);

View File

@@ -328,7 +328,7 @@
<placeInformation placeInformationName="Name">Internationales Begegnungszentrum</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="157" parentId="1" refpoint="POINT(14.329434351923076 51.76722032307691)">
<place id="157" parentId="1" refpoint="POINT(14.329434644291759 51.76722025560722)">
<placeInformation placeInformationName="Kurzbeschreibung">Das IKMZ ist die zentrale Einrichtung der BTU, in der die Strukturbereiche der Informations-, Kommunikations- und Medienversorgung zusammengefasst sind.</placeInformation>
<placeInformation placeInformationName="Kurzname">IKMZ</placeInformation>
<placeInformation placeInformationName="Name">Informations-, Kommunikations- und Medienzentrum</placeInformation>
@@ -503,4 +503,550 @@
<placeInformation placeInformationName="Name">Lehrgebäude 4/3</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="12201001" parentId="122" refpoint="POINT(14.321819584737424 51.766205632061464)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">Eingang</placeInformation>
<placeInformation placeInformationName="Raumnummer">Eingang</placeInformation>
<placeInformation placeInformationName="Typ">Eingang</placeInformation>
</place>
<place id="12201002" parentId="122" refpoint="POINT(14.321372454534156 51.766214390733424)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">Eingang</placeInformation>
<placeInformation placeInformationName="Raumnummer">Eingang</placeInformation>
<placeInformation placeInformationName="Typ">Eingang</placeInformation>
</place>
<place id="12201003" parentId="122" refpoint="POINT(14.321388220143675 51.76597019895933)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">Eingang</placeInformation>
<placeInformation placeInformationName="Raumnummer">Eingang</placeInformation>
<placeInformation placeInformationName="Typ">Eingang</placeInformation>
</place>
<place id="12201004" parentId="122" refpoint="POINT(14.321939315783041 51.76599157011889)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">Eingang</placeInformation>
<placeInformation placeInformationName="Raumnummer">Eingang</placeInformation>
<placeInformation placeInformationName="Typ">Eingang</placeInformation>
</place>
<place id="12201005" parentId="122" refpoint="POINT(14.321800052898967 51.76602853171455)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">Aufzug</placeInformation>
<placeInformation placeInformationName="Raumnummer">Aufzug</placeInformation>
<placeInformation placeInformationName="Typ">Aufzug</placeInformation>
</place>
<place id="12201006" parentId="122" refpoint="POINT(14.321842620044665 51.766109461843406)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">Treppe</placeInformation>
<placeInformation placeInformationName="Raumnummer">Treppe</placeInformation>
<placeInformation placeInformationName="Typ">Treppe</placeInformation>
</place>
<place id="12201007" parentId="122" refpoint="POINT(14.321473004088197 51.766229192888986)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">Treppe</placeInformation>
<placeInformation placeInformationName="Raumnummer">Treppe</placeInformation>
<placeInformation placeInformationName="Typ">Treppe</placeInformation>
</place>
<place id="12201101" parentId="122" refpoint="POINT(14.321731384910802 51.76617751672447)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">101</placeInformation>
<placeInformation placeInformationName="Raumnummer">101</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201102" parentId="122" refpoint="POINT(14.32167778183845 51.766184874008914)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">102</placeInformation>
<placeInformation placeInformationName="Raumnummer">102</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201103" parentId="122" refpoint="POINT(14.32162452911298 51.76619188094647)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">103</placeInformation>
<placeInformation placeInformationName="Raumnummer">103</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201104" parentId="122" refpoint="POINT(14.32142474380574 51.76622490113972)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">104</placeInformation>
<placeInformation placeInformationName="Raumnummer">104</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201105" parentId="122" refpoint="POINT(14.321409661372636 51.766160717591674)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">105</placeInformation>
<placeInformation placeInformationName="Raumnummer">105</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201106" parentId="122" refpoint="POINT(14.321404160926654 51.76611813292864)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">106</placeInformation>
<placeInformation placeInformationName="Raumnummer">106</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201107" parentId="122" refpoint="POINT(14.321393168793357 51.76607906925173)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">107</placeInformation>
<placeInformation placeInformationName="Raumnummer">107</placeInformation>
<placeInformation placeInformationName="Typ">Labor SDB</placeInformation>
</place>
<place id="12201108" parentId="122" refpoint="POINT(14.32140144573835 51.76605445738353)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">108</placeInformation>
<placeInformation placeInformationName="Raumnummer">108</placeInformation>
<placeInformation placeInformationName="Typ">Labor SDB</placeInformation>
</place>
<place id="12201109" parentId="122" refpoint="POINT(14.321369914519321 51.76605038460108)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">109</placeInformation>
<placeInformation placeInformationName="Raumnummer">109</placeInformation>
<placeInformation placeInformationName="Typ">Labor SDB</placeInformation>
</place>
<place id="12201110" parentId="122" refpoint="POINT(14.321363082755193 51.766009683052516)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">110</placeInformation>
<placeInformation placeInformationName="Raumnummer">110</placeInformation>
<placeInformation placeInformationName="Typ">Labor SDB</placeInformation>
</place>
<place id="12201111" parentId="122" refpoint="POINT(14.321418787908812 51.766007335728425)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">111</placeInformation>
<placeInformation placeInformationName="Raumnummer">111</placeInformation>
<placeInformation placeInformationName="Typ">Labor SDB</placeInformation>
</place>
<place id="12201112" parentId="122" refpoint="POINT(14.321430787289371 51.76603422485134)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">112</placeInformation>
<placeInformation placeInformationName="Raumnummer">112</placeInformation>
<placeInformation placeInformationName="Typ">Labor SDB</placeInformation>
</place>
<place id="12201113" parentId="122" refpoint="POINT(14.32147142752725 51.76600864952922)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">113</placeInformation>
<placeInformation placeInformationName="Raumnummer">113</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201114" parentId="122" refpoint="POINT(14.321525380946476 51.76600164259167)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">114</placeInformation>
<placeInformation placeInformationName="Raumnummer">114</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201115" parentId="122" refpoint="POINT(14.321579334365708 51.765994635654096)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">115</placeInformation>
<placeInformation placeInformationName="Raumnummer">115</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201116" parentId="122" refpoint="POINT(14.321633287784932 51.76598832941029)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">116</placeInformation>
<placeInformation placeInformationName="Raumnummer">116</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201117" parentId="122" refpoint="POINT(14.321687241204163 51.765981322472726)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">117</placeInformation>
<placeInformation placeInformationName="Raumnummer">117</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201118" parentId="122" refpoint="POINT(14.32176133956893 51.765972067476014)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">118</placeInformation>
<placeInformation placeInformationName="Raumnummer">118</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201120" parentId="122" refpoint="POINT(14.321835963453946 51.76596275408818)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">120</placeInformation>
<placeInformation placeInformationName="Raumnummer">120</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201121" parentId="122" refpoint="POINT(14.321776404484691 51.765984563181334)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">121</placeInformation>
<placeInformation placeInformationName="Raumnummer">121</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201122" parentId="122" refpoint="POINT(14.321800753592722 51.76598141005943)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">122</placeInformation>
<placeInformation placeInformationName="Raumnummer">122</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201123" parentId="122" refpoint="POINT(14.32188028233407 51.76594830227944)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">123</placeInformation>
<placeInformation placeInformationName="Raumnummer">123</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12201125" parentId="122" refpoint="POINT(14.321913740460934 51.766043071109976)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">125</placeInformation>
<placeInformation placeInformationName="Raumnummer">125</placeInformation>
<placeInformation placeInformationName="Typ">PC - Labor</placeInformation>
</place>
<place id="12201126" parentId="122" refpoint="POINT(14.321881975677314 51.76606198984141)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">126</placeInformation>
<placeInformation placeInformationName="Raumnummer">126</placeInformation>
<placeInformation placeInformationName="Typ">PC - Labor</placeInformation>
</place>
<place id="12201128" parentId="122" refpoint="POINT(14.321920747398497 51.76609877626362)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">128</placeInformation>
<placeInformation placeInformationName="Raumnummer">128</placeInformation>
<placeInformation placeInformationName="Typ">PC - Labor</placeInformation>
</place>
<place id="12201130" parentId="122" refpoint="POINT(14.321882559588778 51.76615413107038)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">130</placeInformation>
<placeInformation placeInformationName="Raumnummer">130</placeInformation>
<placeInformation placeInformationName="Typ">PC - Labor</placeInformation>
</place>
<place id="12201133" parentId="122" refpoint="POINT(14.32171392011893 51.766119131417234)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">133</placeInformation>
<placeInformation placeInformationName="Raumnummer">133</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="12201134" parentId="122" refpoint="POINT(14.32166017690783 51.76612736456887)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">134</placeInformation>
<placeInformation placeInformationName="Raumnummer">134</placeInformation>
<placeInformation placeInformationName="Typ">CO2 - Labor</placeInformation>
</place>
<place id="12201135" parentId="122" refpoint="POINT(14.321497966303266 51.7661215488107)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">135</placeInformation>
<placeInformation placeInformationName="Raumnummer">135</placeInformation>
<placeInformation placeInformationName="Typ">CO2 - Labor</placeInformation>
</place>
<place id="12201137" parentId="122" refpoint="POINT(14.321482726214068 51.76606163949453)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">137</placeInformation>
<placeInformation placeInformationName="Raumnummer">137</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="12201138" parentId="122" refpoint="POINT(14.321617434588697 51.766043158696725)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">138</placeInformation>
<placeInformation placeInformationName="Raumnummer">138</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="12201139" parentId="122" refpoint="POINT(14.321691848265607 51.766031684836456)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">139</placeInformation>
<placeInformation placeInformationName="Raumnummer">139</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="12201140" parentId="122" refpoint="POINT(14.321811439172507 51.7660700478196)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">140</placeInformation>
<placeInformation placeInformationName="Raumnummer">140</placeInformation>
<placeInformation placeInformationName="Typ">PC - Labor</placeInformation>
</place>
<place id="12201149" parentId="122" refpoint="POINT(14.321892544474805 51.76598386248757)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">149</placeInformation>
<placeInformation placeInformationName="Raumnummer">149</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202001" parentId="122" refpoint="POINT(14.32178498045603 51.76603289576545)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">Aufzug</placeInformation>
<placeInformation placeInformationName="Raumnummer">Aufzug</placeInformation>
<placeInformation placeInformationName="Typ">Aufzug</placeInformation>
</place>
<place id="12202002" parentId="122" refpoint="POINT(14.321830781758962 51.76611231270356)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">Treppe</placeInformation>
<placeInformation placeInformationName="Raumnummer">Treppe</placeInformation>
<placeInformation placeInformationName="Typ">Treppe</placeInformation>
</place>
<place id="12202003" parentId="122" refpoint="POINT(14.321472915309439 51.76622912703583)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">Treppe</placeInformation>
<placeInformation placeInformationName="Raumnummer">Treppe</placeInformation>
<placeInformation placeInformationName="Typ">Treppe</placeInformation>
</place>
<place id="12202201" parentId="122" refpoint="POINT(14.321948576547241 51.766157973941354)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">201</placeInformation>
<placeInformation placeInformationName="Raumnummer">201</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="12202202" parentId="122" refpoint="POINT(14.321894791530951 51.76615741368076)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">202</placeInformation>
<placeInformation placeInformationName="Raumnummer">202</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="12202203" parentId="122" refpoint="POINT(14.32183988599349 51.76616413680781)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">203</placeInformation>
<placeInformation placeInformationName="Raumnummer">203</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="12202204" parentId="122" refpoint="POINT(14.32178498045603 51.76616973941367)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">204</placeInformation>
<placeInformation placeInformationName="Raumnummer">204</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202205" parentId="122" refpoint="POINT(14.321731195439742 51.766177583061875)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">205</placeInformation>
<placeInformation placeInformationName="Raumnummer">205</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202206" parentId="122" refpoint="POINT(14.321678530944627 51.766184306188904)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">206</placeInformation>
<placeInformation placeInformationName="Raumnummer">206</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202207" parentId="122" refpoint="POINT(14.321624745928336 51.766192149837124)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">207</placeInformation>
<placeInformation placeInformationName="Raumnummer">207</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202208" parentId="122" refpoint="POINT(14.321570960912048 51.766198872964154)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">208</placeInformation>
<placeInformation placeInformationName="Raumnummer">208</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202209" parentId="122" refpoint="POINT(14.32151717589576 51.766206716612366)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">209</placeInformation>
<placeInformation placeInformationName="Raumnummer">209</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202210" parentId="122" refpoint="POINT(14.321425013029305 51.766224364820836)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">210</placeInformation>
<placeInformation placeInformationName="Raumnummer">210</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202211" parentId="122" refpoint="POINT(14.321414928338754 51.76618626710097)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">211</placeInformation>
<placeInformation placeInformationName="Raumnummer">211</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202213" parentId="122" refpoint="POINT(14.321418850162855 51.76615265146579)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">213</placeInformation>
<placeInformation placeInformationName="Raumnummer">213</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202214" parentId="122" refpoint="POINT(14.3214087654723 51.76612687947882)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">214</placeInformation>
<placeInformation placeInformationName="Raumnummer">214</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202215" parentId="122" refpoint="POINT(14.321400921824093 51.76610110749185)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">215</placeInformation>
<placeInformation placeInformationName="Raumnummer">215</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202216" parentId="122" refpoint="POINT(14.321394198697057 51.766075335504866)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">216</placeInformation>
<placeInformation placeInformationName="Raumnummer">216</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202217" parentId="122" refpoint="POINT(14.321389636575137 51.76602139041414)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">217</placeInformation>
<placeInformation placeInformationName="Raumnummer">217</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202218" parentId="122" refpoint="POINT(14.321448824104227 51.76600950488597)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">218</placeInformation>
<placeInformation placeInformationName="Raumnummer">218</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202219" parentId="122" refpoint="POINT(14.321502609120513 51.76600390228012)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">219</placeInformation>
<placeInformation placeInformationName="Raumnummer">219</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202220" parentId="122" refpoint="POINT(14.321556394136799 51.76599717915308)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">220</placeInformation>
<placeInformation placeInformationName="Raumnummer">220</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202222" parentId="122" refpoint="POINT(14.321635951140061 51.765987374592804)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">222</placeInformation>
<placeInformation placeInformationName="Raumnummer">222</placeInformation>
<placeInformation placeInformationName="Typ">Seminarraum</placeInformation>
</place>
<place id="12202223" parentId="122" refpoint="POINT(14.32171550814332 51.76597813029314)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">223</placeInformation>
<placeInformation placeInformationName="Raumnummer">223</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202224" parentId="122" refpoint="POINT(14.32176817263844 51.765971407166106)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">224</placeInformation>
<placeInformation placeInformationName="Raumnummer">224</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202225" parentId="122" refpoint="POINT(14.321821957654727 51.76596468403906)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">225</placeInformation>
<placeInformation placeInformationName="Raumnummer">225</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202226" parentId="122" refpoint="POINT(14.32187444706841 51.76595151791529)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">226</placeInformation>
<placeInformation placeInformationName="Raumnummer">226</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="12202227" parentId="122" refpoint="POINT(14.321875182410432 51.766048723127014)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">227</placeInformation>
<placeInformation placeInformationName="Raumnummer">227</placeInformation>
<placeInformation placeInformationName="Typ">PC - Labor</placeInformation>
</place>
<place id="12202228" parentId="122" refpoint="POINT(14.321791983713357 51.766061469055344)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">228</placeInformation>
<placeInformation placeInformationName="Raumnummer">228</placeInformation>
<placeInformation placeInformationName="Typ">PC - Labor</placeInformation>
</place>
<place id="12202231" parentId="122" refpoint="POINT(14.321798986970688 51.766089482084666)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">231</placeInformation>
<placeInformation placeInformationName="Raumnummer">231</placeInformation>
<placeInformation placeInformationName="Typ">Archiv</placeInformation>
</place>
<place id="12202233" parentId="122" refpoint="POINT(14.321917061889259 51.766100127035806)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">233</placeInformation>
<placeInformation placeInformationName="Raumnummer">233</placeInformation>
<placeInformation placeInformationName="Typ">Drohnenlabor</placeInformation>
</place>
<place id="12202235" parentId="122" refpoint="POINT(14.321693657980457 51.766117214983694)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">235</placeInformation>
<placeInformation placeInformationName="Raumnummer">235</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="12202236" parentId="122" refpoint="POINT(14.321614521172638 51.76612687947881)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">236</placeInformation>
<placeInformation placeInformationName="Raumnummer">236</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="12202237" parentId="122" refpoint="POINT(14.321545188925075 51.7661355635179)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">237</placeInformation>
<placeInformation placeInformationName="Raumnummer">237</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="12202238" parentId="122" refpoint="POINT(14.321502889250807 51.766141726384355)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">238</placeInformation>
<placeInformation placeInformationName="Raumnummer">238</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="12202239" parentId="122" refpoint="POINT(14.321492804560254 51.7661027882736)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">239</placeInformation>
<placeInformation placeInformationName="Raumnummer">239</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="12202240" parentId="122" refpoint="POINT(14.321468433224748 51.76606497068403)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">240</placeInformation>
<placeInformation placeInformationName="Raumnummer">240</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="12202241" parentId="122" refpoint="POINT(14.321525579804554 51.76605600651463)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">241</placeInformation>
<placeInformation placeInformationName="Raumnummer">241</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="12202243" parentId="122" refpoint="POINT(14.321674048859936 51.76603989902278)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">243</placeInformation>
<placeInformation placeInformationName="Raumnummer">243</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="122011031" parentId="122" refpoint="POINT(14.321571276387507 51.766199588577784)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">103a</placeInformation>
<placeInformation placeInformationName="Raumnummer">103a</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="122011032" parentId="122" refpoint="POINT(14.321517673315157 51.76620659551534)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">103b</placeInformation>
<placeInformation placeInformationName="Raumnummer">103b</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="122011081" parentId="122" refpoint="POINT(14.321397679509385 51.766038341427155)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">108a</placeInformation>
<placeInformation placeInformationName="Raumnummer">108a</placeInformation>
<placeInformation placeInformationName="Typ">Labor SDB</placeInformation>
</place>
<place id="122011251" parentId="122" refpoint="POINT(14.32187853059968 51.76604815113973)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">125a</placeInformation>
<placeInformation placeInformationName="Raumnummer">125a</placeInformation>
<placeInformation placeInformationName="Typ">PC - Labor</placeInformation>
</place>
<place id="122011341" parentId="122" refpoint="POINT(14.321612266972247 51.76613608820613)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">134a</placeInformation>
<placeInformation placeInformationName="Raumnummer">134a</placeInformation>
<placeInformation placeInformationName="Typ">CO2 - Labor</placeInformation>
</place>
<place id="122011351" parentId="122" refpoint="POINT(14.321552760555003 51.76614330535182)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">135a</placeInformation>
<placeInformation placeInformationName="Raumnummer">135a</placeInformation>
<placeInformation placeInformationName="Typ">Technik/ Lager</placeInformation>
</place>
<place id="122011371" parentId="122" refpoint="POINT(14.321537205153616 51.766053712896415)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">137a</placeInformation>
<placeInformation placeInformationName="Raumnummer">137a</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="122011372" parentId="122" refpoint="POINT(14.32149201040634 51.76607680951436)">
<placeInformation placeInformationName="Ebene">Erdgeschoss</placeInformation>
<placeInformation placeInformationName="Name">137b</placeInformation>
<placeInformation placeInformationName="Raumnummer">137b</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="122022411" parentId="122" refpoint="POINT(14.321495045602598 51.76606076872962)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">241a</placeInformation>
<placeInformation placeInformationName="Raumnummer">241a</placeInformation>
<placeInformation placeInformationName="Typ">WC</placeInformation>
</place>
<place id="122022421" parentId="122" refpoint="POINT(14.321380939196514 51.7660469489685)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">242a</placeInformation>
<placeInformation placeInformationName="Raumnummer">242a</placeInformation>
<placeInformation placeInformationName="Typ">Büro</placeInformation>
</place>
<place id="122022425" parentId="122" refpoint="POINT(14.321594912052113 51.76604788273614)">
<placeInformation placeInformationName="Ebene">Obergeschoss</placeInformation>
<placeInformation placeInformationName="Name">242e</placeInformation>
<placeInformation placeInformationName="Raumnummer">242e</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
</root>

View File

@@ -10,7 +10,8 @@ namespace CampusAppWP8.File.Places
{
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Utility;
/// <summary>Places file.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
@@ -23,6 +24,7 @@ using CampusAppWP8.Resources;
public PlacesFile()
: base(ModelType.File, Constants.FilePlace_AllPlaces)
{
this.OnFailedFile += new OnFailed(this.FallBackLoad);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
}
@@ -45,7 +47,17 @@ using CampusAppWP8.Resources;
return false;
}
/// <summary>
/// Method load OfflineMap as Fallback
/// </summary>
private void FallBackLoad()
{
SpsModel fallBackModel = XmlManager.DeserializationFileToModel<SpsModel>(Constants.FileMap_OfflineMap);
this.Model = fallBackModel;
this.SaveData();
}
#endregion
}
}

View File

@@ -8,9 +8,9 @@
namespace CampusAppWP8.Model.Campusmap
{
using System.Windows;
using CampusAppWP8.File.Places;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// Class for the MapModel of the mainCampus of cottbus
@@ -22,6 +22,11 @@ namespace CampusAppWP8.Model.Campusmap
/// <summary>Variable for the identify of the campus.</summary>
private static readonly string Campus = ((int)CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_MAIN).ToString();
/// <summary>
/// Variable for the PlaceFile
/// </summary>
private PlacesFile file;
#endregion
#region Constructor
@@ -51,12 +56,26 @@ namespace CampusAppWP8.Model.Campusmap
/// <remarks>Stubbfel, 19.08.2013.</remarks>
protected override void LoadSpatials()
{
SpsModel model = XmlManager.DeserializationFileToModel<SpsModel>(Constants.FileMap_OfflineMap);
if (this.file == null)
{
this.file = new PlacesFile();
}
this.file.OnLoaded += new PlacesFile.OnIO(this.FileIsReady);
this.file.LoadData();
}
/// <summary>
/// Method is called if the PlaceFile is loaded
/// </summary>
private void FileIsReady()
{
SpsModel model = this.file.Model;
this.Spatial = new SpsModel();
foreach (PlaceModel place in model.Places)
{
if (Campus.Equals(place.ParentId) || Campus.Equals(place.PlaceId))
if (place.PlaceId.StartsWith(CBMainMapModel.Campus))
{
this.Spatial.Places.Add(place);
}

View File

@@ -6,10 +6,12 @@
// <sience>24.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Campusmap
{
{
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using CampusAppWP8.Model.GeoDb;
@@ -30,6 +32,20 @@ namespace CampusAppWP8.Model.Campusmap
#endregion
#region Events
/// <summary>
/// Delegate for MapInfo
/// </summary>
/// <param name="places">list of places</param>
public delegate void MapInfos(List<PlaceModel> places);
/// <summary>
/// Event ShowMapInfo
/// </summary>
public event MapInfos ShowMapInfos = null;
#endregion
#region Property
/// <summary>
@@ -121,11 +137,12 @@ namespace CampusAppWP8.Model.Campusmap
/// <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>
public Image AddPin(double x, double y, MapPinModel.PinType type)
public Image AddPin(double x, double y, MapPinModel.PinType type, List<PlaceModel> places = null)
{
Point position = new Point(x, y);
return this.AddPin(position, type);
return this.AddPin(position, type, places);
}
/// <summary>
@@ -136,11 +153,12 @@ namespace CampusAppWP8.Model.Campusmap
/// <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>
public Image AddPinFromRefPoint(double x, double y, MapPinModel.PinType type)
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);
return this.AddPin(position, type);
return this.AddPin(position, type, places);
}
/// <summary>
@@ -150,22 +168,24 @@ namespace CampusAppWP8.Model.Campusmap
/// <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>
public Image AddPinFromRefPoint(Point position, MapPinModel.PinType type)
public Image AddPinFromRefPoint(Point position, MapPinModel.PinType type, List<PlaceModel> places = null)
{
return this.AddPinFromRefPoint(position.X, position.Y, type);
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>
public Image AddPin(Point position, MapPinModel.PinType type)
public Image AddPin(Point position, MapPinModel.PinType type, List<PlaceModel> places = null)
{
MapPinModel pin = this.CreatePin(type);
pin.Position = position;
Image pinImg = new Image();
MapPinModel pin = this.CreatePin(type, places, pinImg);
pin.Position = position;
if (pin.ImageSource != null)
{
pinImg.Source = new BitmapImage(new Uri(pin.ImageSource, UriKind.Relative));
@@ -237,8 +257,10 @@ namespace CampusAppWP8.Model.Campusmap
/// <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)
private MapPinModel CreatePin(MapPinModel.PinType type, List<PlaceModel> places, Image pinImg)
{
MapPinModel pin;
switch (type)
@@ -248,6 +270,10 @@ namespace CampusAppWP8.Model.Campusmap
break;
case MapPinModel.PinType.SearchPlace:
pin = new SearchPlacePinModel();
pinImg.MouseLeftButtonDown += new MouseButtonEventHandler(((SearchPlacePinModel)pin).ShowInfo);
((SearchPlacePinModel)pin).AssocPlaces = places;
((SearchPlacePinModel)pin).CallBack = this.ShowMapInfos;
break;
default:
pin = new HiddenPinPlaceModel();
@@ -256,7 +282,7 @@ namespace CampusAppWP8.Model.Campusmap
return pin;
}
#endregion
#endregion

View File

@@ -8,6 +8,7 @@
namespace CampusAppWP8.Model.Campusmap
{
using System.Windows;
using System.Windows.Input;
/// <summary>
/// This Class manage the properties of a MapPin

View File

@@ -8,7 +8,8 @@
namespace CampusAppWP8.Model.Campusmap
{
using System.Windows;
using System.Collections.Generic;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
/// <summary>Search pin place model.</summary>
@@ -31,5 +32,33 @@ namespace CampusAppWP8.Model.Campusmap
}
#endregion
#region property
/// <summary>
/// Gets or sets Callback Function, to show place information of the Pin
/// </summary>
public MapModel.MapInfos CallBack { get; set; }
/// <summary>
/// Gets or sets place which are associative with this pin
/// </summary>
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>
public void ShowInfo(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
this.CallBack(this.AssocPlaces);
}
#endregion
}
}

View File

@@ -62,7 +62,7 @@ namespace CampusAppWP8.Model.Exams
{
get
{
return StringManager.StripHTML(this.CourseText + " (" + this.Type + "/" + this.Version + ")");
return Wp8StringManager.StripAndDecodeHTML(this.CourseText + " (" + this.Type + "/" + this.Version + ")");
}
}

View File

@@ -16,7 +16,7 @@ namespace CampusAppWP8.Model.GeoDb
using System.Text.RegularExpressions;
using System.Xml.Serialization;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Utility;
/// <summary>
/// Model for a place of the SPSService
@@ -207,6 +207,24 @@ 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>
public string GetInformationsValue(string key)
{
foreach (PlaceInformation info in this.Informations)
{
if (info.InformationName.Equals(key))
{
return info.InformationValue;
}
}
return null;
}
#endregion
}
}

View File

@@ -47,56 +47,28 @@ 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="informationName">(Optional) name of the information.</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, string informationName = null)
public List<PlaceModel> GetPlacesByInformation(string query, bool ignoreCases = true, List<string> informationNames = null)
{
string querryLow = string.Empty;
IEnumerable<PlaceModel> resultplaces = null;
string querryStr = string.Empty;
List<PlaceModel> resultplaces = new List<PlaceModel>();
// select correct statement
if (ignoreCases && informationName == null)
foreach (PlaceModel place in this.Places)
{
querryLow = query.ToLower();
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.ToLower().Contains(querryLow)
select place;
}
else if (ignoreCases && informationName != null)
{
querryLow = query.ToLower();
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.ToLower().Contains(querryLow) && info.InformationName.Equals(informationName)
select place;
}
else if (!ignoreCases && informationName == null)
{
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.Contains(querryLow)
select place;
}
else if (!ignoreCases && informationName != null)
{
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.Contains(querryLow) && info.InformationName.Equals(informationName)
select place;
if (this.IsPlaceQueryMatched(place, query, ignoreCases, informationNames))
{
resultplaces.Add(place);
}
}
// null assert
if (resultplaces == null)
{
return null;
}
return resultplaces.ToList<PlaceModel>();
return resultplaces;
}
/// <summary>Adds the places.</summary>
@@ -197,6 +169,12 @@ namespace CampusAppWP8.Model.GeoDb
public List<PlaceModel> FilterByPid(List<string> pidList)
{
List<PlaceModel> fitlerList = new List<PlaceModel>();
if (pidList == null || pidList.Count < 1)
{
return fitlerList;
}
foreach (PlaceModel place in this.Places)
{
if (pidList.Contains(place.PlaceId))
@@ -209,5 +187,52 @@ namespace CampusAppWP8.Model.GeoDb
}
#endregion
#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>
private bool IsPlaceQueryMatched(PlaceModel place, string query, bool ignoreCases = true, List<string> informationNames = null)
{
string queryString = query;
if (ignoreCases)
{
queryString = query.ToLower();
}
bool allInfos = true;
if (informationNames != null && informationNames.Count > 0)
{
allInfos = false;
}
foreach (PlaceInformation info in place.Informations)
{
if (allInfos || informationNames.Contains(info.InformationName))
{
string infoVal = info.InformationValue;
if (ignoreCases)
{
infoVal = infoVal.ToLower();
}
if (infoVal.Contains(queryString))
{
return true;
}
}
}
return false;
}
#endregion
#endregion
}
}

View File

@@ -199,7 +199,7 @@ namespace CampusAppWP8.Model.Lecture
{
if (value != this.topic)
{
this.topic = StringManager.StripHTML(value);
this.topic = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
@@ -228,10 +228,10 @@ namespace CampusAppWP8.Model.Lecture
string result = string.Empty;
foreach (LectureLecturer tmpLecturer in this.Lecturer)
{
result += StringManager.AddNewLine(tmpLecturer.ToString());
result += Wp8StringManager.AddNewLine(tmpLecturer.ToString());
}
this.LecturerString = StringManager.RemoveNewLine(result);
this.LecturerString = Wp8StringManager.RemoveNewLine(result);
}
/// <summary>
@@ -242,10 +242,10 @@ namespace CampusAppWP8.Model.Lecture
string result = string.Empty;
foreach (LectureCourse course in this.Course)
{
result += StringManager.AddNewLine(course.Title);
result += Wp8StringManager.AddNewLine(course.Title);
}
this.CourseString = StringManager.RemoveNewLine(result);
this.CourseString = Wp8StringManager.RemoveNewLine(result);
}
#endregion

View File

@@ -7,12 +7,12 @@
//-----------------------------------------------------------------------------
namespace CampusAppWP8
{
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.Utility;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Utility;
/// <summary>
/// Base model io handling class.

View File

@@ -55,7 +55,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != null && value != string.Empty && value != this.tel1)
{
this.tel1 = StringManager.CreateUniTelefonNumber(value);
this.tel1 = Wp8StringManager.CreateUniTelefonNumber(value);
}
}
}
@@ -74,7 +74,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != null && value != string.Empty && value != this.tel2)
{
this.tel2 = StringManager.CreateUniTelefonNumber(value);
this.tel2 = Wp8StringManager.CreateUniTelefonNumber(value);
}
}
}
@@ -93,7 +93,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != null && value != string.Empty && value != this.fax)
{
this.fax = StringManager.CreateUniTelefonNumber(value);
this.fax = Wp8StringManager.CreateUniTelefonNumber(value);
}
}
}
@@ -112,7 +112,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != this.function)
{
this.function = StringManager.StripHTML(value);
this.function = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
@@ -131,7 +131,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != this.appointment)
{
this.appointment = StringManager.StripHTML(value);
this.appointment = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
@@ -150,7 +150,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != this.building)
{
this.building = StringManager.StripHTML(value);
this.building = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
@@ -167,7 +167,7 @@ namespace CampusAppWP8.Model.Person
set
{
if (value != null && value != this.mail && StringManager.IsValidEmail(value))
if (value != null && value != this.mail && Wp8StringManager.IsValidEmail(value))
{
this.mail = value;
}

View File

@@ -70,7 +70,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != this.akadgrad)
{
this.akadgrad = StringManager.StripHTML(value);
this.akadgrad = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
@@ -89,7 +89,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != this.surName)
{
this.surName = StringManager.StripHTML(value);
this.surName = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
@@ -108,7 +108,7 @@ namespace CampusAppWP8.Model.Person
{
if (value != this.firstName)
{
this.firstName = StringManager.StripHTML(value);
this.firstName = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}

View File

@@ -8,7 +8,6 @@ namespace CampusAppWP8.Model.Utility
{
using System.Collections.Generic;
using System.Linq;
using CampusAppWP8.Feed.Exams;
using CampusAppWP8.Feed.Utility;
using CampusAppWP8.Utility;
@@ -147,7 +146,7 @@ namespace CampusAppWP8.Model.Utility
{
foreach (CourseModel course in courseList)
{
this.AddItem(new ListPickerItemModel(course.CourseNumber, StringManager.StripHTML(course.CourseText)));
this.AddItem(new ListPickerItemModel(course.CourseNumber, Wp8StringManager.StripAndDecodeHTML(course.CourseText)));
}
this.List = this.List.OrderBy(o => o.Text).ToList();

View File

@@ -6,10 +6,9 @@
// <sience>05.07.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model
{
{
using System.Text;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Utility;
/// <summary>
/// Xml model io handler class.
@@ -28,7 +27,7 @@ namespace CampusAppWP8.Model
public XmlModel(ModelType modelType, string fileName, string url)
: base(modelType, fileName, url)
{
this.ValidRootName = Constants.XMLRootElementName;
this.ValidRootName = CampusAppWPortalLib8.Resources.Constants.XMLRootElementName;
}
/// <summary>
@@ -40,7 +39,7 @@ namespace CampusAppWP8.Model
public XmlModel(ModelType modelType, string sourceName)
: base(modelType, sourceName)
{
this.ValidRootName = Constants.XMLRootElementName;
this.ValidRootName = CampusAppWPortalLib8.Resources.Constants.XMLRootElementName;
}
#endregion

View File

@@ -69,8 +69,12 @@
</Grid>
</Grid>
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Minimized" >
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized" >
<lui:UpdateButtonAppBar Click="UpdateButtonAppBar_Click"/>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="Scan QR-Code" Click="SearchPlaceByQR_Click" />
<shell:ApplicationBarMenuItem Text="Scan NFC-Tag" Click="SearchPlaceByNFC_Click"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>

View File

@@ -11,14 +11,19 @@ namespace CampusAppWP8.Pages.Campusmap
using System.Collections.Generic;
using System.Device.Location;
using System.Globalization;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading;
using System.Windows;
using System.Windows.Navigation;
using System.Windows.Navigation;
using CampusAppWP8.Model.Campusmap;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWP8.Utility.Lui.MessageBoxes;
using CampusAppWP8.Utility.NDEF;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Windows.Networking.Proximity;
/// <summary>Class for the campusMap page.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
@@ -26,9 +31,22 @@ namespace CampusAppWP8.Pages.Campusmap
{
#region Member
/// <summary>The device.</summary>
private readonly ProximityDevice device = ProximityDevice.GetDefault();
/// <summary>Variable for the map model.</summary>
private MapModel map;
/// <summary>
/// List of information names
/// </summary>
private List<string> informationsNames;
/// <summary>
/// Flag which indicates if an qrCode scan is running
/// </summary>
private bool qrcodeScan = false;
#endregion
#region Constructor
@@ -40,6 +58,20 @@ namespace CampusAppWP8.Pages.Campusmap
this.InitializeComponent();
this.map = new CBMainMapModel();
this.MapCanvas.DataContext = this.map;
this.map.ShowMapInfos += new CBMainMapModel.MapInfos(this.ShowMapInfo);
ApplicationBarMenuItem menuItem1 = ApplicationBar.MenuItems[0] as ApplicationBarMenuItem;
ApplicationBarMenuItem menuItem2 = ApplicationBar.MenuItems[1] as ApplicationBarMenuItem;
if (menuItem1 != null)
{
menuItem1.Text = AppResources.CampusMapApp_ScanQR;
}
if (menuItem2 != null)
{
menuItem2.Text = AppResources.CampusMapApp_ScanNfc;
}
}
#endregion
@@ -54,6 +86,11 @@ namespace CampusAppWP8.Pages.Campusmap
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (this.map.Spatial == null)
{
return;
}
if (e.NavigationMode == NavigationMode.New)
{
MapCanvas.Children.Clear();
@@ -73,12 +110,63 @@ namespace CampusAppWP8.Pages.Campusmap
this.ShowCurrentPositionDispatcher(scroll);
}
else if (this.qrcodeScan && e.NavigationMode == NavigationMode.Back)
{
this.qrcodeScan = false;
string qrcodeResult = App.LoadFromIsolatedStorage<string>(Constants.CampusMapApp_QRCodeSearchResultStorageKey);
App.SaveToIsolatedStorage<string>(Constants.CampusMapApp_QRCodeSearchResultStorageKey, null);
string searchPid = Wp8StringManager.FilterPlaceIdinQRResultString(qrcodeResult);
if (searchPid != null)
{
this.AddPinsByPids(new List<string>() { searchPid }, MapPinModel.PinType.SearchPlace);
}
}
}
#endregion
#region private
/// <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>
private void AddPinsByPids(List<string> pidList, MapPinModel.PinType pinType, bool clearCanvas = true)
{
// clear canvas
if (clearCanvas)
{
MapCanvas.Children.Clear();
}
// null and empty list assert
if (pidList == null || pidList.Count < 1)
{
return;
}
List<PlaceModel> placeList = new List<PlaceModel>();
PlaceModel tmpPlace;
foreach (string pid in pidList)
{
tmpPlace = this.map.Spatial.GetPlaceById(pid);
if (tmpPlace != null)
{
placeList.Add(tmpPlace);
}
}
// add pins to map
if (placeList.Count > 0)
{
this.AddPins(placeList, pinType);
}
}
/// <summary>Button click method.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
/// <param name="sender">caller object.</param>
@@ -88,6 +176,83 @@ namespace CampusAppWP8.Pages.Campusmap
// this.AddPin(double.Parse(XPoint.Text), double.Parse(YPoint.Text));
}
/// <summary>
/// Method start a NFCScan
/// </summary>
/// <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);
this.ProgressBar.Visibility = Visibility.Visible;
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>
private void SearchPlaceByQR_Click(object sender, EventArgs e)
{
this.qrcodeScan = true;
string urlString = Constants.PathQR_QRPage;
urlString += "?" + Constants.ParamQRResultKey + "=" + Constants.CampusMapApp_QRCodeSearchResultStorageKey;
Uri url = new Uri(urlString as string, UriKind.Relative);
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>
private void NDEFHandler(ProximityDevice sender, ProximityMessage message)
{
// create ndefMessage
this.device.StopSubscribingForMessage(message.SubscriptionId);
var ndefMessage = message.Data;
byte[] data = ndefMessage.ToArray();
NDEFMessage ndef = new NDEFMessage(data);
// search for placeId
string nfcContent = ndef.GetContent();
string searchPid = Wp8StringManager.FilterPlaceIdinNFCResultString(nfcContent.Trim());
if (searchPid != null)
{
// add pins to map
if (this.Dispatcher != null)
{
this.Dispatcher.BeginInvoke(new Action(() => this.AddPinsByPids(new List<string>() { searchPid }, MapPinModel.PinType.SearchPlace)));
}
else
{
this.AddPinsByPids(new List<string>() { searchPid }, MapPinModel.PinType.SearchPlace);
}
}
else
{
// Errorcase
if (this.Dispatcher != null)
{
this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.ScarNfc_Fail)));
}
else
{
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.ScarNfc_Fail);
}
}
if (this.Dispatcher != null)
{
this.Dispatcher.BeginInvoke(new Action(() => this.ProgressBar.Visibility = Visibility.Collapsed));
}
else
{
this.ProgressBar.Visibility = Visibility.Collapsed;
}
}
/// <summary>Button click method.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
/// <param name="sender">caller object.</param>
@@ -111,7 +276,15 @@ namespace CampusAppWP8.Pages.Campusmap
/// <returns>The found places.</returns>
private List<PlaceModel> SearchPlaces(string query)
{
return this.map.Spatial.GetPlacesByInformation(query);
if (this.informationsNames == null)
{
this.informationsNames = new List<string>();
this.informationsNames.Add(Constants.PisInformationName_Name);
this.informationsNames.Add(Constants.PisInformationName_Typ);
this.informationsNames.Add(Constants.PisInformationName_ShortName);
}
return this.map.Spatial.GetPlacesByInformation(query, true, this.informationsNames);
}
/// <summary>Adds the pins.</summary>
@@ -126,7 +299,9 @@ namespace CampusAppWP8.Pages.Campusmap
GeoCoordinate coor = place.GeoRefPoint;
if (coor != null)
{
this.AddPin(coor.Longitude, coor.Latitude, type, scroll);
List<PlaceModel> assocPlaces = new List<PlaceModel>();
assocPlaces.Add(place);
this.AddPin(coor.Longitude, coor.Latitude, type, scroll, assocPlaces);
}
}
}
@@ -137,10 +312,11 @@ namespace CampusAppWP8.Pages.Campusmap
/// <param name="y"> latitude parameter.</param>
/// <param name="type"> The type.</param>
/// <param name="scroll">(Optional) the scroll.</param>
private void AddPin(double x, double y, MapPinModel.PinType type, bool scroll = true)
/// <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.map.GetScrollPoint(this.map.ConverToPixelPoint(this.map.ConverToMapPoint(x, y)));
MapCanvas.Children.Add(this.map.AddPinFromRefPoint(this.map.ConverToPixelPoint(this.map.ConverToMapPoint(x, y)), type));
MapCanvas.Children.Add(this.map.AddPinFromRefPoint(this.map.ConverToPixelPoint(this.map.ConverToMapPoint(x, y)), type, assocPlaces));
MapScroller.UpdateLayout();
if (scroll)
@@ -178,14 +354,28 @@ namespace CampusAppWP8.Pages.Campusmap
/// <param name="scroll">(Optional) the scroll.</param>
private void ShowCurrentPosition(bool scroll = true)
{
Utilities.DetermineAndStoreCurrentPositionForce();
if (this.Dispatcher != null)
if (Settings.AppSetting.GeoWatchEnable)
{
this.Dispatcher.BeginInvoke(new Action(() => this.SetPinToCurrentPosition(scroll)));
Utilities.DetermineAndStoreCurrentPositionForce();
if (this.Dispatcher != null)
{
this.Dispatcher.BeginInvoke(new Action(() => this.SetPinToCurrentPosition(scroll)));
}
else
{
this.SetPinToCurrentPosition(scroll);
}
}
else
{
this.SetPinToCurrentPosition(scroll);
if (this.Dispatcher != null)
{
this.Dispatcher.BeginInvoke(new Action(() => this.ProgressBar.Visibility = Visibility.Collapsed));
}
else
{
this.ProgressBar.Visibility = Visibility.Collapsed;
}
}
}
@@ -196,7 +386,19 @@ namespace CampusAppWP8.Pages.Campusmap
{
string lat = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Lat);
string log = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Long);
this.SetPinToPosition(lat, log, MapPinModel.PinType.CurrentPosition, scroll);
if (lat.Equals("0") && log.Equals("0"))
{
if (Settings.AppSetting.GeoWatchEnable)
{
MessageBoxes.ShowMainModelInfoMessageBox(AppResources.MsgBox_NoLocation);
}
this.ProgressBar.Visibility = Visibility.Collapsed;
}
else
{
this.SetPinToPosition(lat, log, MapPinModel.PinType.CurrentPosition, scroll);
}
}
/// <summary>Sets pin to position.</summary>
@@ -218,6 +420,26 @@ namespace CampusAppWP8.Pages.Campusmap
ProgressBar.Visibility = Visibility.Collapsed;
}
/// <summary>
/// Method show same PlaceInformation
/// </summary>
/// <param name="places">List of places</param>
private void ShowMapInfo(List<PlaceModel> places)
{
string msgText = string.Empty;
foreach (PlaceModel place in places)
{
msgText += AppResources.PlaceLabel_Name + ": ";
msgText += place.GetInformationsValue(Constants.PisInformationName_Name);
msgText = Wp8StringManager.AddNewLine(msgText);
msgText += AppResources.PlaceLabel_ShortDesc + ": ";
msgText += place.GetInformationsValue(Constants.PisInformationName_ShortDesc);
msgText = Wp8StringManager.AddNewLine(msgText);
}
MessageBoxes.ShowMainModelInfoMessageBox(msgText);
}
#endregion
#endregion

View File

@@ -48,6 +48,8 @@ namespace CampusAppWP8.Pages.Dev
/// <summary>true if this object is in autofocus. </summary>
private bool isInAutofocus = false;
private string ResultAppStoreKey;
#endregion
#region Constructor
@@ -73,6 +75,10 @@ namespace CampusAppWP8.Pages.Dev
{
if (PhotoCamera.IsCameraTypeSupported(CameraType.Primary) == true)
{
if (NavigationContext.QueryString.ContainsKey(Constants.ParamQRResultKey))
{
this.ResultAppStoreKey = NavigationContext.QueryString[Constants.ParamQRResultKey];
}
this.cam = new PhotoCamera(CameraType.Primary);
this.cam.Initialized += new EventHandler<CameraOperationCompletedEventArgs>(this.Cam_Initialized);
this.cam.AutoFocusCompleted += new EventHandler<CameraOperationCompletedEventArgs>(this.Cam_AutoFocusCompl);
@@ -85,7 +91,7 @@ namespace CampusAppWP8.Pages.Dev
{
this.Dispatcher.BeginInvoke(delegate
{
this.scannText.Text = AppResources.PrimCamNotSupported;
MessageBox.Show(AppResources.PrimCamNotSupported);
});
}
}
@@ -211,7 +217,15 @@ namespace CampusAppWP8.Pages.Dev
{
Dispatcher.BeginInvoke(delegate
{
this.scannText.Text = result.Text;
if (this.ResultAppStoreKey != null)
{
App.SaveToIsolatedStorage(this.ResultAppStoreKey, result.Text);
NavigationService.GoBack();
}
else
{
MessageBox.Show(result.Text);
}
});
}
}

View File

@@ -16,6 +16,7 @@ namespace CampusAppWP8.Pages.Events
using CampusAppWP8.Utility.Lui.MessageBoxes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// Overview page of all events.
@@ -55,7 +56,7 @@ namespace CampusAppWP8.Pages.Events
EventIndexPage.eventFeed.OnLoaded += new EventFeed.OnIO(this.SetupEventPageList);
EventIndexPage.eventFeed.OnFailedWeb += new EventFeed.OnFailed(this.FeedIsFailedWeb);
EventIndexPage.eventFeed.OnFailedFile += new EventFeed.OnFailed(this.FeedIsFailedFile);
EventIndexPage.eventFeed.LoadData(Utilities.GetLoadModus<Model.RSS.RSSViewModel>());
EventIndexPage.eventFeed.LoadData(Utilities.GetLoadModus<RSSViewModel>());
}
#endregion

View File

@@ -6,17 +6,12 @@
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModel="clr-namespace:CampusAppWP8.Model.RSS"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>
<viewModel:RSSViewModel x:Key="RssViewModel" x:Name="RssView" />
</phone:PhoneApplicationPage.Resources>
<!-- LayoutRoot -->
<Grid x:Name="LayoutRoot" Background="Transparent">

View File

@@ -13,12 +13,12 @@ namespace CampusAppWP8.Pages.Events
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using CampusAppWP8.Model.RSS;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Windows.Phone.Speech.Synthesis;
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// EventPage, where every event fees has his own PivotItem.

View File

@@ -17,6 +17,7 @@ namespace CampusAppWP8.Pages.Lecture
using CampusAppWP8.Resources;
using CampusAppWP8.Utility.Lui.MessageBoxes;
using Microsoft.Phone.Controls;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>
/// Class for the LecturePage

View File

@@ -18,6 +18,7 @@ namespace CampusAppWP8.Pages.Mensa
using CampusAppWP8.Utility.Lui.MessageBoxes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWPortalLib8.Model.Mensa;
/// <summary>
/// Class for the MensaPage
@@ -177,7 +178,7 @@ namespace CampusAppWP8.Pages.Mensa
}
else
{
this.feed.LoadData(Utilities.GetLoadModus<Model.Mensa.MenuWeekModel>());
this.feed.LoadData(Utilities.GetLoadModus<MenuWeekModel>());
}
}

View File

@@ -16,6 +16,7 @@ namespace CampusAppWP8.Pages.News
using CampusAppWP8.Utility.Lui.MessageBoxes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// Overview page of all news.
@@ -55,7 +56,7 @@ namespace CampusAppWP8.Pages.News
NewsIndexPage.newsFeed.OnLoaded += new NewsFeed.OnIO(this.SetupNewsPageList);
NewsIndexPage.newsFeed.OnFailedWeb += new NewsFeed.OnFailed(this.FeedIsFailWeb);
NewsIndexPage.newsFeed.OnFailedFile += new NewsFeed.OnFailed(this.FeedIsFailFile);
NewsIndexPage.newsFeed.LoadData(Utilities.GetLoadModus<Model.RSS.RSSViewModel>());
NewsIndexPage.newsFeed.LoadData(Utilities.GetLoadModus<RSSViewModel>());
}
#endregion

View File

@@ -6,17 +6,12 @@
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModel="clr-namespace:CampusAppWP8.Model.RSS"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>
<viewModel:RSSViewModel x:Key="RssViewModel" x:Name="RssView" />
</phone:PhoneApplicationPage.Resources>
<!-- LayoutRoot -->
<Grid x:Name="LayoutRoot" Background="Transparent">

View File

@@ -13,12 +13,12 @@ namespace CampusAppWP8.Pages.News
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using CampusAppWP8.Model.RSS;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Windows.Phone.Speech.Synthesis;
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// EventPage, where every news fees has his own PivotItem.

View File

@@ -18,6 +18,7 @@ namespace CampusAppWP8.Pages.Person
using CampusAppWP8.Utility.Lui.MessageBoxes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>Person page.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>

View File

@@ -41,7 +41,7 @@
<ListBox.ItemTemplate>
<DataTemplate>
<lui:NavigateButton Url="{Binding Path=Constants.PathPlaceNews_ShowPadPage, Source={StaticResource Const}}" QuerryStringValue="{Binding PlaceId}" QuerryStringName="{Binding Path=Constants.ParamPlaceID, Source={StaticResource Const}}" Style="{StaticResource ListButtonStyle}">
<TextBlock Text="{Binding Informations[0].InformationValue}"/>
<TextBlock Tag="{Binding PlaceId}" Loaded="TextBlock_Loaded"/>
</lui:NavigateButton>
</DataTemplate>
</ListBox.ItemTemplate>

View File

@@ -13,6 +13,7 @@ namespace CampusAppWP8.Pages.PlaceNews
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using CampusAppWP8.Api.GeoApi;
using CampusAppWP8.File.Places;
@@ -21,6 +22,10 @@ namespace CampusAppWP8.Pages.PlaceNews
using CampusAppWP8.Utility;
using CampusAppWP8.Utility.Lui.MessageBoxes;
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>
@@ -48,6 +53,11 @@ namespace CampusAppWP8.Pages.PlaceNews
/// <summary>List of search pids.</summary>
private List<string> searchPidList;
private bool qrScan = false;
/// <summary>The device.</summary>
private readonly ProximityDevice device = ProximityDevice.GetDefault();
#endregion
#region Constructor
@@ -73,11 +83,32 @@ namespace CampusAppWP8.Pages.PlaceNews
{
base.OnNavigatedTo(e);
if (NavigationMode.Back == e.NavigationMode && this.places == null)
if (NavigationMode.Back == e.NavigationMode)
{
this.places = new PlacesFile();
this.places.Model = App.LoadFromIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces);
this.SetupResultBox();
if (this.places == null)
{
this.places = new PlacesFile();
this.places.Model = App.LoadFromIsolatedStorage<SpsModel>(Constants.IsolatedStorage_AllPlaces);
}
if (qrScan)
{
qrScan = false;
string qrResult = App.LoadFromIsolatedStorage<string>("PlaceNewsQCCode");
App.SaveToIsolatedStorage<string>("PlaceNewsQCCode", null);
string searchPid = Wp8StringManager.FilterPlaceIdinQRResultString(qrResult);
if (searchPid != null)
{
this.searchPidList = new List<string>() { searchPid };
this.SendGetPisPssForPlacenews(this.searchPidList);
}
}
else
{
this.SetupResultBox();
}
}
else
{
@@ -119,22 +150,24 @@ namespace CampusAppWP8.Pages.PlaceNews
this.places.OnFailedLoad += new PlacesFile.OnFailed(this.PlacesFileIsFail);
this.places.LoadData();
}
// init sps Api
if (this.spsApi == null || this.forceRequest)
if (this.spsApi == null)
{
this.spsApi = new SpsApi();
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)
{
this.spsApi.LoadData();
}
}
if (this.forceRequest)
{
this.spsApi.LoadData();
}
// init pis API
if (this.pisApi == null || this.forceRequest)
if (this.pisApi == null)
{
this.pisApi = new PisApi();
this.pisApi.OnLoaded += new PisApi.OnIO(this.PisApiIsReady);
@@ -142,7 +175,7 @@ namespace CampusAppWP8.Pages.PlaceNews
}
// init pss Api
if (this.pssApi == null || this.forceRequest)
if (this.pssApi == null)
{
this.pssApi = new PssApi();
this.pssApi.OnLoaded += new PssApi.OnIO(this.PssApiIsReady);
@@ -173,8 +206,8 @@ 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);
}
}
this.spsApi.LoadData();
this.waitForApi++;
}
@@ -231,29 +264,62 @@ namespace CampusAppWP8.Pages.PlaceNews
private void SpsApiIsReady()
{
this.waitForApi--;
this.places.Model.AddPlaces(this.spsApi.Model.Places.ToList());
this.searchPidList = this.spsApi.Model.CreatePidList();
if (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) {
List<string> infoNames = new List<string>() { Constants.PisInformationName_Name };
List<string> serviceNames = new List<string>() { Constants.PssServiceName_PlaceNews };
// load from pis api
if (this.forceRequest || !this.places.Model.ContainsInformationNames(this.searchPidList, infoNames))
this.SendGetPlaceInformation(this.searchPidList, infoNames, this.forceRequest);
// load from pis api
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>
private void SendGetPlaceInformation(List<string> pidList, List<string> infoNames, bool force = false)
{
if (force || !this.places.Model.ContainsInformationNames(pidList, infoNames))
{
this.pisApi.SetupInformationRequest(this.searchPidList, infoNames);
this.pisApi.LoadData();
this.waitForApi++;
}
// load from pis api
if (this.forceRequest || !this.places.Model.ContainsServiceNames(this.searchPidList, serviceNames))
}
/// <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>
private void SendGetPlaceService(List<string> pidList, List<string> serviceNames, bool force = false)
{
if (this.forceRequest || !this.places.Model.ContainsServiceNames(pidList, serviceNames))
{
this.pssApi.SetupServiceRequest(this.searchPidList, serviceNames);
this.pssApi.LoadData();
this.waitForApi++;
}
this.CheckedSetupResultBox();
}
/// <summary>Sets up the result box.</summary>
@@ -293,6 +359,11 @@ namespace CampusAppWP8.Pages.PlaceNews
/// <param name="e"> Event information.</param>
private void ApplicationBarMenuItem_Click(object sender, EventArgs e)
{
this.qrScan = true;
string urlString = Constants.PathQR_QRPage;
urlString += "?" + Constants.ParamQRResultKey + "=" + "PlaceNewsQCCode";
Uri url = new Uri(urlString as string, UriKind.Relative);
this.NavigationService.Navigate(url);
}
/// <summary>Event handler. Called by ApplicationBarMenuItem_Click for 1 events.</summary>
@@ -301,6 +372,8 @@ namespace CampusAppWP8.Pages.PlaceNews
/// <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>
@@ -322,6 +395,50 @@ 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>
private void TextBlock_Loaded(object sender, RoutedEventArgs e)
{
TextBlock txt = sender as TextBlock;
if (txt == null)
{
return;
}
string placeID = txt.Tag as string;
if (placeID == null)
{
return;
}
PlaceModel place = this.places.Model.GetPlaceById(placeID);
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>
private void NDEFHandler(ProximityDevice sender, ProximityMessage message)
{
this.device.StopSubscribingForMessage(message.SubscriptionId);
var ndefMessage = message.Data;
byte[] data = ndefMessage.ToArray();
NDEFMessage ndef = new NDEFMessage(data);
string nfcContent = ndef.GetContent();
string pid = Wp8StringManager.FilterPlaceIdinNFCResultString(nfcContent.Trim());
if (pid != null)
{
this.searchPidList = new List<string>() { pid };
this.SendGetPisPssForPlacenews(this.searchPidList);
}
// this.Dispatcher.BeginInvoke(new Action(() => MessageBox.Show(ndef.GetContent())));
}
#endregion
}
}

View File

@@ -12,7 +12,7 @@ namespace CampusAppWP8.Pages.Setting
using System.Windows.Navigation;
using CampusAppWP8.Model.Setting;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Utility;
using Microsoft.Phone.Controls;
/// <summary>

View File

@@ -7,6 +7,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -50,6 +51,12 @@
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="NewsAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
<lui:NavigateButton Name="LectureAppButton" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathLecture_LecturePage, Source={StaticResource Const}}" Grid.Column="2">
@@ -57,6 +64,12 @@
<Image Source="{Binding Path=ThemelizedIcon.Lectures, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="LectureAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
</Grid>
@@ -82,6 +95,12 @@
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="EventAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
<lui:NavigateButton Name="CampusMapAppButton" Grid.Column="2" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathCampusmap_Campusmap, Source={StaticResource Const}}">
@@ -89,12 +108,18 @@
<Image Source="{Binding Path=ThemelizedIcon.Campus, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.CampusMapApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="CampusMapAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
</Grid>
<!-- Row 2 -->
<Grid Name="Row2">
<Grid Name="Row2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
@@ -106,13 +131,25 @@
<Image Source="{Binding Path=ThemelizedIcon.Departments, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="DepartmentAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
<lui:NavigateButton Name="MensaAppButton" Grid.Column="1" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathMensa_MensaPage, Source={StaticResource Const}}">
<lui:NavigateButton Name="MensaAppButton" Grid.Column="1" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathMensa_MensaPage, Source={StaticResource Const}}">
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
<Image Source="{Binding Path=ThemelizedIcon.Mensa, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="MensaAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
<lui:NavigateButton Name="MailAppButton" Grid.Column="2" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathMail_WebMailPage, Source={StaticResource Const}}">
@@ -120,6 +157,11 @@
<Image Source="{Binding Path=ThemelizedIcon.WebMail, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.MailApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="MailAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click" />
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
</Grid>
@@ -138,6 +180,12 @@
<Image Source="{Binding Path=ThemelizedIcon.Openhours, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Name="OpenHoursAppButtonText" Text="{Binding Path=LocalizedResources.OpenHoursApp_Title2, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="OpenHoursAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
<lui:NavigateButton Name="LinkAppButton" Url="{Binding Path=Constants.PathLinks_LinkPage, Source={StaticResource Const}}" Grid.Column="1" Style="{StaticResource StartPageButton}">
@@ -145,6 +193,12 @@
<Image Source="{Binding Path=ThemelizedIcon.Link, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="LinkAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
<lui:NavigateButton Name="OSAAppButton" Url="{Binding Path=Constants.PathStudentCouncil_StudentCouncilPage, Source={StaticResource Const}}" Grid.Column="2" Style="{StaticResource StartPageButton}">
@@ -155,6 +209,12 @@
<Image Source="{Binding Path=ThemelizedIcon.StudentCouncil, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Text="{Binding Path=LocalizedResources.OSAApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="OSAAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
</Grid>
@@ -173,6 +233,12 @@
<Image Source="{Binding Path=ThemelizedIcon.Exams, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Name="examinationAppButtonText" Text="{Binding Path=LocalizedResources.ExaminationApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="examinationAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
<lui:NavigateButton Name="personAppButton" Url="{Binding Path=Constants.PathPerson_Person, Source={StaticResource Const}}" Grid.Column="1" Style="{StaticResource StartPageButton}">
@@ -180,12 +246,25 @@
<Image Source="{Binding Path=ThemelizedIcon.Person, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Name="personAppButtonText" Text="{Binding Path=LocalizedResources.PersonApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="personAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
<lui:NavigateButton Name="placeNewsAppButton" Url="{Binding Path=Constants.PathPlaceNews_PlaceNewsPage, Source={StaticResource Const}}" Grid.Column="2" Style="{StaticResource StartPageButton}">
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Name="placeNewsButtonText" Text="{Binding Path=LocalizedResources.PlaceNewsApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Tag="placeNewsAppButton" Header="{Binding Path=LocalizedResources.ContextMenu_PinToStart, Source={StaticResource LocalizedStrings}}" Click="PintoStart_Click">
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</lui:NavigateButton>
</Grid>

View File

@@ -8,6 +8,7 @@
namespace CampusAppWP8.Pages
{
using System;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
@@ -18,6 +19,8 @@ namespace CampusAppWP8.Pages
using CampusAppWP8.Utility.Lui.MessageBoxes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWP8.File.Places;
using CampusAppWP8.Utility.Lui.Tiles;
/// <summary>
/// Class for the StartPage
@@ -73,7 +76,8 @@ namespace CampusAppWP8.Pages
}
if (!Settings.AppSetting.InitApp)
{
{
this.initPlaceFile();
this.initCourseList = new CourseFeed();
this.initCourseList.OnLoaded += new CourseFeed.OnIO(this.StoreCourseFeed);
this.initCourseList.LoadData();
@@ -82,6 +86,12 @@ namespace CampusAppWP8.Pages
}
}
private void initPlaceFile()
{
PlacesFile file = new PlacesFile();
file.LoadData();
}
#endregion
#region Method
@@ -270,6 +280,87 @@ namespace CampusAppWP8.Pages
#endregion
private void PintoStart_Click(object sender, RoutedEventArgs e)
{
FrameworkElement elment = sender as FrameworkElement;
if (elment == null)
{
return;
}
string tagButtonName = elment.Tag as string;
if (tagButtonName == null)
{
return;
}
switch (tagButtonName)
{
case "MensaAppButton":
TileCreator.CreateMensaTile();
break;
case "MailAppButton":
TileCreator.CreateWebMailTile();
break;
case "NewsAppButton":
TileCreator.CreateNewsTile();
break;
case "LectureAppButton":
TileCreator.CreateLectureTile();
break;
case "EventAppButton":
TileCreator.CreateEventTile();
break;
case "CampusMapAppButton":
TileCreator.CreateCampusMapTile();
break;
case "DepartmentAppButton":
TileCreator.CreateDepartmentTile();
break;
case "OpenHoursAppButton":
TileCreator.CreateOpeningHoursTile();
break;
case "LinkAppButton":
TileCreator.CreateLinkTile();
break;
case "OSAAppButton":
TileCreator.CreateStudentCouncilTile();
break;
case "examinationAppButton":
TileCreator.CreateExamsTile();
break;
case "personAppButton":
TileCreator.CreatePersonTile();
break;
case "placeNewsAppButton":
TileCreator.CreatePlaceNewsTile();
break;
}
}
private void PintoStart_Click2(object sender, RoutedEventArgs e)
{
IconicTileData oIcontile = new IconicTileData();
oIcontile.Title = "WebmailPage";
oIcontile.IconImage = new Uri(Icons.Mensa, UriKind.Relative);
oIcontile.SmallIconImage = new Uri(Icons.Mensa, UriKind.Relative);
// find the tile object for the application tile that using "Iconic" contains string in it.
ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("WebmailPage".ToString()));
if (TileToFind != null && TileToFind.NavigationUri.ToString().Contains("WebmailPage"))
{
TileToFind.Delete();
ShellTile.Create(new Uri(Constants.PathMail_WebMailPage, UriKind.Relative), oIcontile, true);
}
else
{
ShellTile.Create(new Uri(Constants.PathMail_WebMailPage, UriKind.Relative), oIcontile, true);
}
}
#endregion
}
}

View File

@@ -150,6 +150,24 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Info via NFC ähnelt.
/// </summary>
public static string CampusMapApp_ScanNfc {
get {
return ResourceManager.GetString("CampusMapApp_ScanNfc", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Info via QR-Code ähnelt.
/// </summary>
public static string CampusMapApp_ScanQR {
get {
return ResourceManager.GetString("CampusMapApp_ScanQR", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt.
/// </summary>
@@ -159,6 +177,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Auf Startseite ähnelt.
/// </summary>
public static string ContextMenu_PinToStart {
get {
return ResourceManager.GetString("ContextMenu_PinToStart", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Bachelor ähnelt.
/// </summary>
@@ -501,69 +528,6 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Aktion ähnelt.
/// </summary>
public static string MensaApp_Action {
get {
return ResourceManager.GetString("MensaApp_Action", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Bio ähnelt.
/// </summary>
public static string MensaApp_Bio {
get {
return ResourceManager.GetString("MensaApp_Bio", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 1 ähnelt.
/// </summary>
public static string MensaApp_Dinner1 {
get {
return ResourceManager.GetString("MensaApp_Dinner1", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt.
/// </summary>
public static string MensaApp_Dinner2 {
get {
return ResourceManager.GetString("MensaApp_Dinner2", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 3 ähnelt.
/// </summary>
public static string MensaApp_Dinner3 {
get {
return ResourceManager.GetString("MensaApp_Dinner3", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 4 ähnelt.
/// </summary>
public static string MensaApp_Dinner4 {
get {
return ResourceManager.GetString("MensaApp_Dinner4", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 5 ähnelt.
/// </summary>
public static string MensaApp_Dinner5 {
get {
return ResourceManager.GetString("MensaApp_Dinner5", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die 84 ähnelt.
/// </summary>
@@ -573,24 +537,6 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Heute nicht im Angbot ähnelt.
/// </summary>
public static string MensaApp_NotToday {
get {
return ResourceManager.GetString("MensaApp_NotToday", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Suppe ähnelt.
/// </summary>
public static string MensaApp_Soup {
get {
return ResourceManager.GetString("MensaApp_Soup", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Mensaplan ähnelt.
/// </summary>
@@ -672,6 +618,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Akutelle Position konnte nicht bestimmt werden. Bitte schalten Sie ggf. die Ortung ein. ähnelt.
/// </summary>
public static string MsgBox_NoLocation {
get {
return ResourceManager.GetString("MsgBox_NoLocation", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Es gibt keine Ergebnisse zur gestellten Anfrage ähnelt.
/// </summary>
@@ -681,6 +636,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Platzinfo ähnelt.
/// </summary>
public static string MsgBox_PlaceInfoHeader {
get {
return ResourceManager.GetString("MsgBox_PlaceInfoHeader", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die News ähnelt.
/// </summary>
@@ -789,6 +753,24 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Name ähnelt.
/// </summary>
public static string PlaceLabel_Name {
get {
return ResourceManager.GetString("PlaceLabel_Name", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Beschreibung ähnelt.
/// </summary>
public static string PlaceLabel_ShortDesc {
get {
return ResourceManager.GetString("PlaceLabel_ShortDesc", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Placenews ähnelt.
/// </summary>
@@ -861,6 +843,24 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Kein gültigen NFC-Tag gefunden ähnelt.
/// </summary>
public static string ScarNfc_Fail {
get {
return ResourceManager.GetString("ScarNfc_Fail", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Bitte halten Sie das Handy vor dem NFC-Tag ähnelt.
/// </summary>
public static string ScarNfc_Search {
get {
return ResourceManager.GetString("ScarNfc_Search", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Appeinstellungen ähnelt.
/// </summary>

View File

@@ -206,27 +206,6 @@
<data name="Time_Day_Wednesday" xml:space="preserve">
<value>Mittwoch</value>
</data>
<data name="MensaApp_Action" xml:space="preserve">
<value>Aktion</value>
</data>
<data name="MensaApp_Bio" xml:space="preserve">
<value>Bio</value>
</data>
<data name="MensaApp_Dinner1" xml:space="preserve">
<value>Essen 1</value>
</data>
<data name="MensaApp_Dinner2" xml:space="preserve">
<value>Essen 2</value>
</data>
<data name="MensaApp_Dinner3" xml:space="preserve">
<value>Essen 3</value>
</data>
<data name="MensaApp_Dinner4" xml:space="preserve">
<value>Essen 4</value>
</data>
<data name="MensaApp_NotToday" xml:space="preserve">
<value>Heute nicht im Angbot</value>
</data>
<data name="NewsHomeBtn" xml:space="preserve">
<value>zur Übersicht</value>
</data>
@@ -353,12 +332,6 @@
<data name="ListPickerHeaderSemester" xml:space="preserve">
<value>Semesterauswahl</value>
</data>
<data name="MensaApp_Dinner5" xml:space="preserve">
<value>Essen 5</value>
</data>
<data name="MensaApp_Soup" xml:space="preserve">
<value>Suppe</value>
</data>
<data name="MsgBox_GeoWatchOptInHeader" xml:space="preserve">
<value>Ortung</value>
</data>
@@ -461,4 +434,31 @@
<data name="ToDay" xml:space="preserve">
<value>Heute</value>
</data>
<data name="MsgBox_NoLocation" xml:space="preserve">
<value>Akutelle Position konnte nicht bestimmt werden. Bitte schalten Sie ggf. die Ortung ein.</value>
</data>
<data name="MsgBox_PlaceInfoHeader" xml:space="preserve">
<value>Platzinfo</value>
</data>
<data name="PlaceLabel_Name" xml:space="preserve">
<value>Name</value>
</data>
<data name="PlaceLabel_ShortDesc" xml:space="preserve">
<value>Beschreibung</value>
</data>
<data name="ContextMenu_PinToStart" xml:space="preserve">
<value>Auf Startseite</value>
</data>
<data name="CampusMapApp_ScanNfc" xml:space="preserve">
<value>Info via NFC</value>
</data>
<data name="CampusMapApp_ScanQR" xml:space="preserve">
<value>Info via QR-Code</value>
</data>
<data name="ScarNfc_Fail" xml:space="preserve">
<value>Kein gültigen NFC-Tag gefunden</value>
</data>
<data name="ScarNfc_Search" xml:space="preserve">
<value>Bitte halten Sie das Handy vor dem NFC-Tag</value>
</data>
</root>

View File

@@ -177,6 +177,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die CampusMapAppQRCodeSearchResultStorageKey ähnelt.
/// </summary>
public static string CampusMapApp_QRCodeSearchResultStorageKey {
get {
return ResourceManager.GetString("CampusMapApp_QRCodeSearchResultStorageKey", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die +49 ähnelt.
/// </summary>
@@ -564,6 +573,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die NDEF ähnelt.
/// </summary>
public static string NCFMessageType_NDEF {
get {
return ResourceManager.GetString("NCFMessageType_NDEF", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt.
/// </summary>
@@ -663,6 +681,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die QRResultKey ähnelt.
/// </summary>
public static string ParamQRResultKey {
get {
return ResourceManager.GetString("ParamQRResultKey", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Url ähnelt.
/// </summary>
@@ -861,6 +888,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Dev/QRScanner.xaml ähnelt.
/// </summary>
public static string PathQR_QRPage {
get {
return ResourceManager.GetString("PathQR_QRPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Setting/AppSettingPage.xaml ähnelt.
/// </summary>
@@ -925,7 +961,25 @@ namespace CampusAppWP8.Resources {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die typ ähnelt.
/// Sucht eine lokalisierte Zeichenfolge, die Kurzbeschreibung ähnelt.
/// </summary>
public static string PisInformationName_ShortDesc {
get {
return ResourceManager.GetString("PisInformationName_ShortDesc", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Kurzname ähnelt.
/// </summary>
public static string PisInformationName_ShortName {
get {
return ResourceManager.GetString("PisInformationName_ShortName", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Typ ähnelt.
/// </summary>
public static string PisInformationName_Typ {
get {
@@ -1059,15 +1113,6 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php ähnelt.
/// </summary>
public static string UrlEvents_Addr {
get {
return ResourceManager.GetString("UrlEvents_Addr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die https://www.zv.tu-cottbus.de/CMS-Webservice/Pruefungsordnung/Uebersicht ähnelt.
/// </summary>
@@ -1113,51 +1158,6 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&amp;v=1 ähnelt.
/// </summary>
public static string UrlMensa_Week_CBMain {
get {
return ResourceManager.GetString("UrlMensa_Week_CBMain", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&amp;v=1 ähnelt.
/// </summary>
public static string UrlMensa_Week_CBNorth {
get {
return ResourceManager.GetString("UrlMensa_Week_CBNorth", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusHL&amp;v=1 ähnelt.
/// </summary>
public static string UrlMensa_Week_CBSouth {
get {
return ResourceManager.GetString("UrlMensa_Week_CBSouth", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=Senftenberg&amp;v=1 ähnelt.
/// </summary>
public static string UrlMensa_Week_SBFMain {
get {
return ResourceManager.GetString("UrlMensa_Week_SBFMain", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php ähnelt.
/// </summary>
public static string UrlNews_Addr {
get {
return ResourceManager.GetString("UrlNews_Addr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/getdata.php?db=openinghours&amp;app=2&amp;appversion=1 ähnelt.
/// </summary>
@@ -1292,14 +1292,5 @@ namespace CampusAppWP8.Resources {
return ResourceManager.GetString("Valid_MaxCourseNumber", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die root ähnelt.
/// </summary>
public static string XMLRootElementName {
get {
return ResourceManager.GetString("XMLRootElementName", resourceCulture);
}
}
}
}

View File

@@ -138,9 +138,6 @@
<data name="UrlLecture_ModulBaseAddr" xml:space="preserve">
<value>https://www.tu-cottbus.de/modul/</value>
</data>
<data name="XMLRootElementName" xml:space="preserve">
<value>root</value>
</data>
<data name="UrlWebMail_Addr" xml:space="preserve">
<value>https://webmail.tu-cottbus.de</value>
</data>
@@ -174,9 +171,6 @@
<data name="PathLecture_LecturePage" xml:space="preserve">
<value>/Pages/Lecture/LecturePage.xaml</value>
</data>
<data name="PathEvents_EventsIndexPage" xml:space="preserve">
<value>/Pages/Events/EventIndexPage.xaml</value>
</data>
<data name="PathMail_WebMailPage" xml:space="preserve">
<value>/Pages/Webmail/WebmailPage.xaml</value>
</data>
@@ -225,9 +219,6 @@
<data name="ParamPivotIndex" xml:space="preserve">
<value>pivotindex</value>
</data>
<data name="PathEvent_EventPage" xml:space="preserve">
<value>/Pages/Events/EventPage.xaml</value>
</data>
<data name="PathLinks_LinkPage" xml:space="preserve">
<value>/Pages/Links/LinkPage.xaml</value>
</data>
@@ -264,12 +255,6 @@
<data name="FileNews_Name" xml:space="preserve">
<value>NewsFeed.xml</value>
</data>
<data name="UrlEvents_Addr" xml:space="preserve">
<value>http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php</value>
</data>
<data name="UrlNews_Addr" xml:space="preserve">
<value>http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php</value>
</data>
<data name="IsolatedStorage_DepartmentModel" xml:space="preserve">
<value>IsolatedStorage_DepartmentModel</value>
</data>
@@ -378,18 +363,6 @@
<data name="FileMensa_Shedule_SBFMain" xml:space="preserve">
<value>MensaFeed_SFBMain.xml</value>
</data>
<data name="UrlMensa_Week_CBMain" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&amp;v=1</value>
</data>
<data name="UrlMensa_Week_CBNorth" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&amp;v=1</value>
</data>
<data name="UrlMensa_Week_CBSouth" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusHL&amp;v=1</value>
</data>
<data name="UrlMensa_Week_SBFMain" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=Senftenberg&amp;v=1</value>
</data>
<data name="SpsApi_CampusDomain" xml:space="preserve">
<value>1</value>
</data>
@@ -511,7 +484,7 @@
<value>Name</value>
</data>
<data name="PisInformationName_Typ" xml:space="preserve">
<value>typ</value>
<value>Typ</value>
</data>
<data name="PssApi_PidListKey" xml:space="preserve">
<value>pid</value>
@@ -531,4 +504,28 @@
<data name="UrlPssService" xml:space="preserve">
<value>http://141.43.76.140/service/pss</value>
</data>
<data name="PisInformationName_ShortDesc" xml:space="preserve">
<value>Kurzbeschreibung</value>
</data>
<data name="PisInformationName_ShortName" xml:space="preserve">
<value>Kurzname</value>
</data>
<data name="PathEvents_EventsIndexPage" xml:space="preserve">
<value>/Pages/Events/EventIndexPage.xaml</value>
</data>
<data name="PathEvent_EventPage" xml:space="preserve">
<value>/Pages/Events/EventPage.xaml</value>
</data>
<data name="ParamQRResultKey" xml:space="preserve">
<value>QRResultKey</value>
</data>
<data name="PathQR_QRPage" xml:space="preserve">
<value>/Pages/Dev/QRScanner.xaml</value>
</data>
<data name="CampusMapApp_QRCodeSearchResultStorageKey" xml:space="preserve">
<value>CampusMapAppQRCodeSearchResultStorageKey</value>
</data>
<data name="NCFMessageType_NDEF" xml:space="preserve">
<value>NDEF</value>
</data>
</root>

View File

@@ -25,4 +25,31 @@
<AnalyzerSettings />
</Analyzer>
</Analyzers>
<StyleCopSettings Version="105">
<GlobalSettings>
<CollectionProperty Name="RecognizedWords">
<Value>akadgrad</Value>
<Value>api</Value>
<Value>apis</Value>
<Value>enum</Value>
<Value>initialise</Value>
<Value>initialises</Value>
<Value>ndef</Value>
<Value>ndefs</Value>
<Value>nfc</Value>
<Value>param</Value>
<Value>perodic</Value>
<Value>pid</Value>
<Value>pids</Value>
<Value>pis</Value>
<Value>prev</Value>
<Value>pss</Value>
<Value>qr</Value>
<Value>Senftenberg</Value>
<Value>sps</Value>
<Value>Stubbfel</Value>
<Value>uni</Value>
<Value>wifi</Value>
</CollectionProperty>
</GlobalSettings>
</StyleCopSettings>

View File

@@ -0,0 +1,125 @@
//-----------------------------------------------------------------------
// <copyright file="BackgroundTasks.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>18.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
using CampusAppWP8ScheduledTaskAgent.Resources;
using CampusAppWPortalLib8.Utility;
using Microsoft.Phone.Scheduler;
/// <summary>
/// Class provide some static methods for background tasks
/// </summary>
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>
public static void StartPerodicTask(string taskName, string taskDesc)
{
BackgroundTasks.StopPerodicTask(BackgroundTasks.LastAddedTaskName);
BackgroundTasks.StopPerodicTask(taskName);
PeriodicTask periodicTask = new PeriodicTask(taskName);
// load description from localized strings
periodicTask.Description = taskDesc;
try
{
ScheduledActionService.Add(periodicTask);
// ScheduledActionService.LaunchForTest(taskName, new TimeSpan(10));
}
catch (Exception e)
{
Logger.LogException(e);
return;
}
BackgroundTasks.LastAddedTaskName = taskName;
}
/// <summary>
/// Method stop a certain PerodicTask
/// </summary>
/// <param name="taskName">name of the task</param>
public static void StopPerodicTask(string taskName)
{
if (taskName == null)
{
return;
}
PeriodicTask periodicTask = ScheduledActionService.Find(taskName) as PeriodicTask;
if (periodicTask != null)
{
try
{
ScheduledActionService.Remove(taskName);
}
catch (Exception e)
{
Logger.LogException(e);
}
}
}
/// <summary>
/// Method start MensaBackgroundTask
/// </summary>
public static void StartMensaTask()
{
int campusId = (int)Settings.UserProfil.DefaultCampus;
BackgroundTasks.StartPerodicTask(Constants.BackgroundTask_Mensa, AppResources.BackGroundTaskDesc_Mensa + " - Feed " + campusId);
}
/// <summary>
/// Method stop MensaBackgroundTask
/// </summary>
public static void StopMensaTask()
{
BackgroundTasks.StopPerodicTask(Constants.BackgroundTask_Mensa);
}
/// <summary>
/// Method start EventBackgroundTask
/// </summary>
public static void StartEventTask()
{
BackgroundTasks.StartPerodicTask(Constants.BackgroundTask_Event, AppResources.BackGroundTaskDesc_Event);
}
/// <summary>
/// Method stop EventBackgroundTask
/// </summary>
public static void StopEventTask()
{
BackgroundTasks.StopPerodicTask(Constants.BackgroundTask_Event);
}
/// <summary>
/// Method start NewsBackgroundTask
/// </summary>
public static void StartNewsTask()
{
BackgroundTasks.StartPerodicTask(Constants.BackgroundTask_News, AppResources.BackGroundTaskDesc_News);
}
/// <summary>
/// Method stop NewsBackgroundTask
/// </summary>
public static void StopNewsTask()
{
BackgroundTasks.StopPerodicTask(Constants.BackgroundTask_News);
}
}
}

View File

@@ -11,6 +11,7 @@ namespace CampusAppWP8.Utility
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using CampusAppWPortalLib8.Utility;
using Windows.Storage;
/// <summary>

View File

@@ -11,6 +11,7 @@ namespace CampusAppWP8.Utility
using System.Collections.Generic;
using System.Net;
using CampusAppWP8.Model.Utility;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>
/// Class realize the access of restful HttpRequest

View File

@@ -1,39 +0,0 @@
//--------------------------------------------------------------------
// <copyright file="Logger.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
/// <summary>
/// This Class creates logs for the app
/// </summary>
public class Logger
{
#region Method
/// <summary>
/// Method log a Exception
/// </summary>
/// <param name="exception">exception which has to log</param>
public static void LogException(Exception exception)
{
Console.WriteLine(exception);
}
/// <summary>
/// Log a message.
/// </summary>
/// <param name="msg">to be logged message</param>
public static void LogMsg(string msg)
{
Console.WriteLine(msg);
}
#endregion
}
}

View File

@@ -45,6 +45,15 @@ namespace CampusAppWP8.Utility.Lui.MessageBoxes
return MessageBox.Show(text, AppResources.MsgBox_InfoHeader, MessageBoxButton.OK);
}
/// <summary>Shows the place information message box.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
/// <param name="text">custom text for the box.</param>
/// <returns>result of the UserInteraction</returns>
public static MessageBoxResult ShowPlaceInfoMessageBox(string text)
{
return MessageBox.Show(text, AppResources.MsgBox_PlaceInfoHeader, MessageBoxButton.OK);
}
#endregion
}
}

View File

@@ -0,0 +1,166 @@
//-----------------------------------------------------------------------
// <copyright file="TileCreator.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>18.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility.Lui.Tiles
{
using System;
using System.Linq;
using CampusAppWP8.Resources;
using Microsoft.Phone.Shell;
/// <summary>
/// Class creates different live tiles
/// </summary>
public class TileCreator
{
/// <summary>
/// Method creates an IconicTile
/// </summary>
/// <param name="title">title of the tile</param>
/// <param name="path">path the the page</param>
/// <param name="iconUrl">icon url of the main icon</param>
/// <param name="smallIcon">icon url of the small icon</param>
/// <param name="wideContent1">string for the wide content 1</param>
/// <param name="wideContent2">string for the wide content 2</param>
/// <param name="wideContent3">string for the wide content 3</param>
public static void CreateIconicTile(string title, string path, string iconUrl, string smallIcon, string wideContent1 = null, string wideContent2 = null, string wideContent3 = null)
{
IconicTileData iconTile = new IconicTileData();
iconTile.Title = title;
iconTile.WideContent1 = wideContent1;
iconTile.WideContent2 = wideContent2;
iconTile.WideContent3 = wideContent3;
iconTile.IconImage = new Uri(iconUrl, UriKind.Relative);
iconTile.SmallIconImage = new Uri(smallIcon, UriKind.Relative);
// find the tile object for the application tile that using "Iconic" contains string in it.
ShellTile tileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(path));
if (tileToFind != null && tileToFind.NavigationUri.ToString().Contains(path))
{
tileToFind.Delete();
}
ShellTile.Create(new Uri(path, UriKind.Relative), iconTile, true);
}
/// <summary>
/// Method creates the MensaTile
/// </summary>
public static void CreateMensaTile()
{
TileCreator.CreateIconicTile(AppResources.MensaApp_Title, Constants.PathMensa_MensaPage, Icons.Mensa, Icons.Mensa);
// create a new task
BackgroundTasks.StartMensaTask();
}
/// <summary>
/// Method creates the MailTile
/// </summary>
public static void CreateWebMailTile()
{
TileCreator.CreateIconicTile(AppResources.MailApp_Title, Constants.PathMail_WebMailPage, Icons.WebMail, Icons.WebMail);
}
/// <summary>
/// Method creates the NewsTile
/// </summary>
public static void CreateNewsTile()
{
TileCreator.CreateIconicTile(AppResources.NewsApp_Title, Constants.PathNews_NewsIndexPage, Icons.News, Icons.News);
// create a new Task
BackgroundTasks.StartNewsTask();
}
/// <summary>
/// Method creates the LectureTile
/// </summary>
public static void CreateLectureTile()
{
TileCreator.CreateIconicTile(AppResources.LectureApp_Title, Constants.PathLecture_LecturePage, Icons.Lectures, Icons.Lectures);
}
/// <summary>
/// Method creates the EventTile
/// </summary>
public static void CreateEventTile()
{
TileCreator.CreateIconicTile(AppResources.EventApp_Title, Constants.PathEvents_EventsIndexPage, Icons.News, Icons.News);
// create a new taskk
BackgroundTasks.StartEventTask();
}
/// <summary>
/// Method creates the DepartmentTile
/// </summary>
public static void CreateDepartmentTile()
{
TileCreator.CreateIconicTile(AppResources.DepartmentApp_Title, Constants.PathDepartment_DepartmentIndexPage, Icons.Departments, Icons.Departments);
}
/// <summary>
/// Method creates the OpeningHoursTile
/// </summary>
public static void CreateOpeningHoursTile()
{
TileCreator.CreateIconicTile(AppResources.OpenHoursApp_Title, Constants.PathOpeninghours_OpeninghoursPage, Icons.Openhours, Icons.Openhours);
}
/// <summary>
/// Method creates the linkTile
/// </summary>
public static void CreateLinkTile()
{
TileCreator.CreateIconicTile(AppResources.LinkApp_Title, Constants.PathLinks_LinkPage, Icons.Link, Icons.Link);
}
/// <summary>
/// Method creates the StudentCouncilTile
/// </summary>
public static void CreateStudentCouncilTile()
{
TileCreator.CreateIconicTile(AppResources.OSAApp_Title, Constants.PathStudentCouncil_StudentCouncilPage, Icons.StudentCouncil, Icons.StudentCouncil);
}
/// <summary>
/// Method creates the ExamsTile
/// </summary>
public static void CreateExamsTile()
{
TileCreator.CreateIconicTile(AppResources.ExaminationApp_Header, Constants.PathExams_ExamsPage, Icons.Exams, Icons.Exams);
}
/// <summary>
/// Method creates the PersonTile
/// </summary>
public static void CreatePersonTile()
{
TileCreator.CreateIconicTile(AppResources.PersonApp_Title, Constants.PathPerson_Person, Icons.Person, Icons.Person);
}
/// <summary>
/// Method creates the PlaceNewsTile
/// </summary>
public static void CreatePlaceNewsTile()
{
TileCreator.CreateIconicTile(AppResources.PlaceNewsApp_Title, Constants.PathPlaceNews_PlaceNewsPage, Icons.News, Icons.News);
}
/// <summary>
/// Method creates the CampusMapTile
/// </summary>
public static void CreateCampusMapTile()
{
TileCreator.CreateIconicTile(AppResources.CampusMapApp_Title, Constants.PathCampusmap_Campusmap, Icons.Campus, Icons.Campus);
}
}
}

View File

@@ -17,6 +17,7 @@ namespace CampusAppWP8.Utility
using System.Windows.Media;
using CampusAppWP8.Resources;
using Microsoft.Phone.Net.NetworkInformation;
using CampusAppWPortalLib8.Utility;
/// <summary>
/// Collection of utility functions.
@@ -143,6 +144,12 @@ namespace CampusAppWP8.Utility
public static void SetElementVisibility(DependencyObject rootObj, string parentGridName, string elemName, Visibility vis, int index = 0)
{
List<DependencyObject> l = Utilities.GetChild(rootObj, parentGridName);
// hotfix: OutofRangeIndex Assert
if (index > l.Count - 1)
{
return;
}
Grid parentGrid = l[index] as Grid;
FrameworkElement elem = null;

View File

@@ -0,0 +1,29 @@
//-----------------------------------------------------------------------
// <copyright file="Wp8StringManager.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>06.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
using System.Text.RegularExpressions;
using CampusAppWP8.Resources;
/// <summary>
/// Class provides some special StringMethods
/// </summary>
public class Wp8StringManager : CampusAppWPortalLib8.Utility.DefaultStringManager
{
/// <summary>
/// Method removes Html-Tag of a String
/// </summary>
/// <param name="inputString">String with Html-Tags</param>
/// <returns>String without Html-Tags</returns>
public static string StripAndDecodeHTML(string inputString)
{
return System.Net.HttpUtility.HtmlDecode(Wp8StringManager.StripHTML(inputString));
}
}
}

View File

@@ -1,91 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="XmlManager.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>18.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System.IO;
using System.Xml.Linq;
using System.Xml.Serialization;
/// <summary>
/// Class provides some Xml-methods
/// </summary>
public class XmlManager
{
#region Method
/// <summary>
/// Method deserialization a string to a Model
/// </summary>
/// <typeparam name="T">the model</typeparam>
/// <param name="xmlString">the XmlString</param>
/// <param name="validRootName">name of the RootTag</param>
/// <returns>return the deserialization of the model</returns>
public static T DeserializationToModel<T>(string xmlString, string validRootName)
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
XDocument document = XDocument.Parse(xmlString);
if (!document.Root.Name.ToString().Equals(validRootName))
{
XElement content = document.Root;
document = new XDocument();
document.Add(new XElement(validRootName, content));
}
T model = (T)serializer.Deserialize(document.CreateReader());
return model;
}
/// <summary>Deserialization a xml file to a model.</summary>
/// <remarks>Stubbfel, 20.08.2013.</remarks>
/// <typeparam name="T">Generic type parameter.</typeparam>
/// <param name="xmlFilePath">Path to the a XmlFile.</param>
/// <returns>model of the XmlFile.</returns>
public static T DeserializationFileToModel<T>(string xmlFilePath)
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
XDocument document = XDocument.Load(xmlFilePath);
T model = (T)serializer.Deserialize(document.CreateReader());
return model;
}
/// <summary>Method serializes a model to a string.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
/// <typeparam name="T">type of the model.</typeparam>
/// <param name="model">model object.</param>
/// <returns>serialized string.</returns>
public static string SerializationToString<T>(T model)
{
string retValue = string.Empty;
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
ns.Add(string.Empty, string.Empty);
XmlSerializer serializer = new XmlSerializer(typeof(T));
TextWriter writer = new StringWriter();
serializer.Serialize(writer, model, ns);
retValue = writer.ToString();
if (retValue.StartsWith("<?xml") == true)
{
int endTag = retValue.IndexOf("?>");
retValue = retValue.Substring(endTag + 2);
if (retValue.StartsWith("\r\n") == true)
{
retValue = retValue.Substring(2);
}
}
return retValue;
}
#endregion
}
}

View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2A51FA6C-791B-4935-B869-FDBA9ED774D7}</ProjectGuid>
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CampusAppWP8ScheduledTaskAgent</RootNamespace>
<AssemblyName>CampusAppWP8ScheduledTaskAgent</AssemblyName>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<BackgroundAgentType>AgentLibrary</BackgroundAgentType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\x86\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\ARM\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\ARM\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Resources\AppResources.Designer.cs">
<DependentUpon>AppResources.resx</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Resources\Constants1.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Constants.resx</DependentUpon>
</Compile>
<Compile Include="ScheduledAgent.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utility\BackgroundTasks.cs" />
<Compile Include="Utility\HttpRequest.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\AppResources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Constants.resx">
<SubType>Designer</SubType>
<LastGenOutput>Constants1.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CampusAppWPortalLib8\CampusAppWPortalLib8.csproj">
<Project>{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}</Project>
<Name>CampusAppWPortalLib8</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// Allgemeine Informationen über eine Assembly werden über die folgende
// Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("CampusAppWP8ScheduledTaskAgent")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CampusAppWP8ScheduledTaskAgent")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
[assembly: ComVisible(false)]
// Die folgende GUID ist für die ID der typelib, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("2a51fa6c-791b-4935-b869-fdba9ed774d7")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder die Standardwerte für Revisions- und Buildnummer verwenden
// übernehmen, indem Sie "*" wie folgt verwenden:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguageAttribute("de-DE")]

View File

@@ -0,0 +1,99 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.18051
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CampusAppWP8ScheduledTaskAgent.Resources {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class AppResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal AppResources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWP8ScheduledTaskAgent.Resources.AppResources", typeof(AppResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Hintergrunddienst für die BTU-Event-Feed ähnelt.
/// </summary>
public static string BackGroundTaskDesc_Event {
get {
return ResourceManager.GetString("BackGroundTaskDesc_Event", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Hintergrunddienst für die BTU-Mensa ähnelt.
/// </summary>
public static string BackGroundTaskDesc_Mensa {
get {
return ResourceManager.GetString("BackGroundTaskDesc_Mensa", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Hintergrunddienst für die BTU-News-Feed ähnelt.
/// </summary>
public static string BackGroundTaskDesc_News {
get {
return ResourceManager.GetString("BackGroundTaskDesc_News", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Die Mensa ist heute geschlossen ähnelt.
/// </summary>
public static string MensaApp_CloseMensa {
get {
return ResourceManager.GetString("MensaApp_CloseMensa", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BackGroundTaskDesc_Mensa" xml:space="preserve">
<value>Hintergrunddienst für die BTU-Mensa</value>
</data>
<data name="BackGroundTaskDesc_Event" xml:space="preserve">
<value>Hintergrunddienst für die BTU-Event-Feed</value>
</data>
<data name="BackGroundTaskDesc_News" xml:space="preserve">
<value>Hintergrunddienst für die BTU-News-Feed</value>
</data>
<data name="MensaApp_CloseMensa" xml:space="preserve">
<value>Die Mensa ist heute geschlossen</value>
</data>
</root>

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BackgroundTask_Mensa" xml:space="preserve">
<value>MensaTask</value>
</data>
<data name="BackgroundTask_Event" xml:space="preserve">
<value>EventTask</value>
</data>
<data name="BackgroundTask_News" xml:space="preserve">
<value>NewsTask</value>
</data>
</root>

View File

@@ -0,0 +1,90 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.18051
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CampusAppWP8ScheduledTaskAgent.Resources {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Constants {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Constants() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWP8ScheduledTaskAgent.Resources.Constants", typeof(Constants).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die EventTask ähnelt.
/// </summary>
public static string BackgroundTask_Event {
get {
return ResourceManager.GetString("BackgroundTask_Event", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die MensaTask ähnelt.
/// </summary>
public static string BackgroundTask_Mensa {
get {
return ResourceManager.GetString("BackgroundTask_Mensa", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die NewsTask ähnelt.
/// </summary>
public static string BackgroundTask_News {
get {
return ResourceManager.GetString("BackgroundTask_News", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,373 @@
//-----------------------------------------------------------------------
// <copyright file="ScheduledAgent.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>18.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8ScheduledTaskAgent
{
using System;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Windows;
using CampusAppWP8ScheduledTaskAgent.Resources;
using CampusAppWP8ScheduledTaskAgent.Utility;
using CampusAppWPortalLib8.Model.Mensa;
using CampusAppWPortalLib8.Model.RSS;
using CampusAppWPortalLib8.Utility;
using Microsoft.Phone.Scheduler;
using Microsoft.Phone.Shell;
/// <summary>
/// Class for agent of the BackgroundTask
/// </summary>
public class ScheduledAgent : ScheduledTaskAgent
{
#region Member
/// <summary>
/// Model for the mensa feed
/// </summary>
private MenuWeekModel mensaModel;
/// <summary>
/// Model for the event feed
/// </summary>
private RSSViewModel eventModel;
/// <summary>
/// Model for the news feed
/// </summary>
private RSSViewModel newsModel;
#endregion
#region Constructor
/// <summary>
/// Initializes static members of the <see cref="ScheduledAgent" /> class.
/// </summary>
static ScheduledAgent()
{
Deployment.Current.Dispatcher.BeginInvoke(delegate
{
Application.Current.UnhandledException += UnhandledException;
});
}
#endregion
#region Method
#region protected
/// <summary>
/// override OnInvoke
/// </summary>
/// <param name="task">the background Task</param>
protected override void OnInvoke(ScheduledTask task)
{
switch (task.Name)
{
case "MensaTask":
this.HandleMensaTask(task);
break;
case "EventTask":
this.HandleEventTask(task);
break;
case "NewsTask":
this.HandleNewsTask(task);
break;
}
}
#endregion
#region private
/// <summary>
/// Method handle UnhandledException
/// </summary>
/// <param name="sender">sender of Exception</param>
/// <param name="e">Exception Args</param>
private static void UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
if (Debugger.IsAttached)
{
Debugger.Break();
}
}
/// <summary>
/// Method handle the EventBackgroundTask
/// </summary>
/// <param name="task">the eventTask</param>
private void HandleEventTask(ScheduledTask task)
{
if (this.eventModel == null || !this.CheckRssIsUpToDate(this.eventModel.CreateTime))
{
HttpRequest api = new HttpRequest();
Uri url = new Uri(CampusAppWPortalLib8.Resources.Constants.UrlEvents_Addr, UriKind.Absolute);
api.HttpGet(url, this.GetEventIsReady);
}
else
{
this.UpdateEventTile();
}
}
/// <summary>
/// Method handle the NewsBackgroundTask
/// </summary>
/// <param name="task">the newsTask</param>
private void HandleNewsTask(ScheduledTask task)
{
if (this.newsModel == null || !this.CheckRssIsUpToDate(this.newsModel.CreateTime))
{
HttpRequest api = new HttpRequest();
Uri url = new Uri(CampusAppWPortalLib8.Resources.Constants.UrlNews_Addr, UriKind.Absolute);
api.HttpGet(url, this.GetNewsIsReady);
}
else
{
this.UpdateNewsTile();
}
}
/// <summary>
/// ResponseHandler for the EventFeed
/// </summary>
/// <param name="sender">sender of the Event</param>
/// <param name="arg">Event Args</param>
private void GetEventIsReady(object sender, System.Net.DownloadStringCompletedEventArgs arg)
{
if (arg.Result != null)
{
this.eventModel = XmlManager.DeserializationToModel<RSSViewModel>(arg.Result, CampusAppWPortalLib8.Resources.Constants.XMLRootElementName);
this.UpdateEventTile();
}
}
/// <summary>
/// ResponseHandler for the NewsFeed
/// </summary>
/// <param name="sender">sender of the Event</param>
/// <param name="arg">Event Args</param>
private void GetNewsIsReady(object sender, System.Net.DownloadStringCompletedEventArgs arg)
{
if (arg.Result != null)
{
this.newsModel = XmlManager.DeserializationToModel<RSSViewModel>(arg.Result, CampusAppWPortalLib8.Resources.Constants.XMLRootElementName);
this.UpdateNewsTile();
}
}
/// <summary>
/// Method update the NewsTile
/// </summary>
private void UpdateNewsTile()
{
ShellTile tileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathNews_NewsIndexPage));
if (tileToFind != null && tileToFind.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathNews_NewsIndexPage))
{
IconicTileData data = new IconicTileData();
Random random = new Random();
int randomNumber = random.Next(0, this.newsModel.Channel[0].Item.Count);
RSSModel item = this.newsModel.Channel[0].Item[randomNumber];
data.WideContent1 = item.Date;
data.WideContent2 = DefaultStringManager.ToShortString(item.Title, 40, "...");
data.WideContent3 = DefaultStringManager.ToShortString(item.Text, 40, "...");
data.Count = this.newsModel.Channel[0].Item.Count;
tileToFind.Update(data);
}
else
{
BackgroundTasks.StopPerodicTask(Constants.BackgroundTask_News);
}
this.NotifyComplete();
}
/// <summary>
/// Method update the EventTile
/// </summary>
private void UpdateEventTile()
{
ShellTile tileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathEvents_EventsIndexPage));
if (tileToFind != null && tileToFind.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathEvents_EventsIndexPage))
{
IconicTileData data = new IconicTileData();
Random random = new Random();
int randomNumber = random.Next(0, this.eventModel.Channel[0].Item.Count);
RSSModel item = this.eventModel.Channel[0].Item[randomNumber];
data.WideContent1 = item.Date;
data.WideContent2 = DefaultStringManager.ToShortString(item.Title, 40, "...");
data.WideContent3 = DefaultStringManager.ToShortString(item.Text, 40, "...");
data.Count = this.eventModel.Channel[0].Item.Count;
tileToFind.Update(data);
}
else
{
BackgroundTasks.StopPerodicTask(Constants.BackgroundTask_Event);
}
this.NotifyComplete();
}
/// <summary>
/// Determine the correct MensaFeed/Url
/// </summary>
/// <param name="mensaTaskDesc">the Description of the MensaTask</param>
/// <returns>Url of a mensa, which is set is in the UserProfile</returns>
private Uri CalcMensaUrl(string mensaTaskDesc)
{
Uri url;
char feedNumber = mensaTaskDesc[mensaTaskDesc.Length - 1];
switch (feedNumber)
{
case '1':
url = new Uri(CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBMain, UriKind.Absolute);
break;
case '2':
url = new Uri(CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBSouth, UriKind.Absolute);
break;
case '3':
url = new Uri(CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_SBFMain, UriKind.Absolute);
break;
case '4':
url = new Uri(CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBMain, UriKind.Absolute);
break;
default:
url = new Uri(CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBMain, UriKind.Absolute);
break;
}
return url;
}
/// <summary>
/// Method handle the MensaBackgroundTask
/// </summary>
/// <param name="task">the newsTask</param>
private void HandleMensaTask(ScheduledTask task)
{
if (this.mensaModel == null || !this.CheckMensaIsUpToDate(this.mensaModel.CreateTime))
{
HttpRequest api = new HttpRequest();
Uri url = this.CalcMensaUrl(task.Description);
api.HttpGet(url, this.GetMensaIsReady);
}
else
{
this.UpdateMensaTile();
}
}
/// <summary>
/// ResponseHandler for the MensaFeed
/// </summary>
/// <param name="sender">sender of the Event</param>
/// <param name="arg">Event Args</param>
private void GetMensaIsReady(object sender, System.Net.DownloadStringCompletedEventArgs arg)
{
if (arg.Result != null)
{
this.mensaModel = XmlManager.DeserializationToModel<MenuWeekModel>(arg.Result, CampusAppWPortalLib8.Resources.Constants.XMLRootElementName);
this.UpdateMensaTile();
}
}
/// <summary>
/// Method update the NewsTile
/// </summary>
private void UpdateMensaTile()
{
ShellTile tileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathMensa_MensaPage));
if (tileToFind != null && tileToFind.NavigationUri.ToString().Contains(CampusAppWPortalLib8.Resources.Constants.PathMensa_MensaPage))
{
IconicTileData data = new IconicTileData();
DateTime now = DateTime.Now;
int dayIndex = (int)DateTime.Now.DayOfWeek;
data.WideContent1 = CultureInfo.CurrentCulture.DateTimeFormat.DayNames[dayIndex];
data.WideContent2 = now.Date.ToShortDateString();
if (dayIndex == 0 || dayIndex > this.mensaModel.Menus.Count)
{
data.WideContent3 = AppResources.MensaApp_CloseMensa;
}
else
{
// correct index (week sart with monday not sunday
dayIndex--;
int mealCount = this.mensaModel.Menus[dayIndex].Meals.Count;
if (mealCount < 1)
{
data.WideContent3 = AppResources.MensaApp_CloseMensa;
}
else
{
Random random = new Random();
int randomNumber = random.Next(0, mealCount);
MealModel meal = this.mensaModel.Menus[dayIndex].Meals[randomNumber];
data.WideContent3 = meal.MealName + ": " + DefaultStringManager.ToShortString(meal.MealDesc, 30, "...");
data.Count = this.mensaModel.Menus[dayIndex].Meals.Count;
}
}
tileToFind.Update(data);
}
else
{
BackgroundTasks.StopPerodicTask(Constants.BackgroundTask_Mensa);
}
this.NotifyComplete();
}
/// <summary>
/// Check if the model of the mensa is up-to-date
/// </summary>
/// <param name="lastModified"> Date of the last modification</param>
/// <returns>true, if it is up-to-date, otherwise false</returns>
private bool CheckMensaIsUpToDate(DateTime lastModified)
{
int diff = lastModified.CompareTo(MenuWeekModel.CalcFirstWeekDay());
if (diff < 0)
{
return false;
}
return true;
}
/// <summary>
/// Check if the model of the RSS feed is up-to-date
/// </summary>
/// <param name="lastModified"> Date of the last modification</param>
/// <returns>true, if it is up-to-date, otherwise false</returns>
private bool CheckRssIsUpToDate(DateTime lastModified)
{
int diff = lastModified.CompareTo(DateTime.Now.AddDays(1));
if (diff < 0)
{
return false;
}
return true;
}
#endregion
#endregion
}
}

View File

@@ -0,0 +1,7 @@
<StyleCopSettings Version="105">
<GlobalSettings>
<CollectionProperty Name="RecognizedWords">
<Value>perodic</Value>
</CollectionProperty>
</GlobalSettings>
</StyleCopSettings>

View File

@@ -0,0 +1,40 @@
//-----------------------------------------------------------------------
// <copyright file="BackgroundTasks.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>18.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8ScheduledTaskAgent.Utility
{
using System;
using CampusAppWPortalLib8.Utility;
using Microsoft.Phone.Scheduler;
/// <summary>
/// Class provide some static methods for background tasks
/// </summary>
public class BackgroundTasks : AbstractBackgroundTasks
{
/// <summary>
/// Method stop a certain PerodicTask
/// </summary>
/// <param name="taskName">name of the task</param>
public static void StopPerodicTask(string taskName)
{
PeriodicTask periodicTask = ScheduledActionService.Find(taskName) as PeriodicTask;
if (periodicTask != null)
{
try
{
ScheduledActionService.Remove(taskName);
}
catch (Exception e)
{
Logger.LogException(e);
}
}
}
}
}

View File

@@ -0,0 +1,55 @@
//-----------------------------------------------------------------------
// <copyright file="HttpRequest.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>10.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8ScheduledTaskAgent.Utility
{
using System;
using System.Net;
using CampusAppWPortalLib8.Utility;
/// <summary>
/// Class realize the access of restful HttpRequest
/// </summary>
public class HttpRequest : AbstractHttpRequest
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="HttpRequest" /> class.
/// </summary>
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>
public HttpRequest(Uri apiBaseAddress)
{
this.BaseAddress = apiBaseAddress.AbsoluteUri;
}
#endregion
#region Methods
/// <summary>
/// Method realize the http-get-method resource
/// </summary>
/// <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();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(action);
client.DownloadStringAsync(url);
}
#endregion
}
}

View File

@@ -33,23 +33,46 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Model\Campusmap\CBMainMapModel.cs" />
<Compile Include="Model\Campusmap\MapModel.cs" />
<Compile Include="Model\GeoDb\PlaceInformation.cs" />
<Compile Include="Model\GeoDb\PlaceModel.cs" />
<Compile Include="Model\GeoDb\PlaceService.cs" />
<Compile Include="Model\GeoDb\SpsModel.cs" />
<Compile Include="Model\Mensa\MealModel.cs" />
<Compile Include="Model\Mensa\MenuModel.cs" />
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
<Compile Include="Model\RSS\RSSChannelModel.cs" />
<Compile Include="Model\RSS\RSSModel.cs" />
<Compile Include="Model\RSS\RSSViewModel.cs" />
<Compile Include="Model\Utility\CleanUrlParamModel.cs" />
<Compile Include="Model\Utility\URLParamModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\AppResources.Designer.cs">
<DependentUpon>AppResources.resx</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Resources\Constants1.Designer.cs">
<DependentUpon>Constants.resx</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Utility\AbstractHttpRequest.cs" />
<Compile Include="Utility\AbstractBackgroundTasks.cs" />
<Compile Include="Utility\Logger.cs" />
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
<Compile Include="Utility\NDEF\NDEFShortRecord.cs" />
<Compile Include="Utility\StringManager.cs" />
<Compile Include="Utility\DefaultStringManager.cs" />
<Compile Include="Utility\XmlManager.cs" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\AppResources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Constants.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Constants1.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -1,45 +0,0 @@
//-----------------------------------------------------------------------------
// <copyright file="CBMainMapModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>13.08.2013</sience>
//-----------------------------------------------------------------------------
using CampusAppWPortalLib8.Model.GeoDb;
using CampusAppWPortalLib8.Utility;
namespace CampusAppWPortalLib8.Model.Campusmap
{
/// <summary>
/// Class for the MapModel of the mainCampus of cottbus
/// </summary>
public class CBMainMapModel : MapModel
{
/// <summary>Variable for the identify of the campus.</summary>
private static readonly string Campus = "1";
/// <summary>
/// Initializes a new instance of the <see cref="CBMainMapModel" /> class.
/// </summary>
public CBMainMapModel(string xmlFilePath) : base(xmlFilePath)
{
}
/// <summary>Loads the spatial./.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
protected override void LoadSpatials(string xmlFilePath)
{
SpsModel model = XmlManager.DeserializationFileToModel<SpsModel>(xmlFilePath);
this.Spatial = new SpsModel();
foreach (PlaceModel place in model.Places)
{
if (Campus.Equals(place.ParentId) || Campus.Equals(place.PlaceId))
{
this.Spatial.Places.Add(place);
}
}
}
}
}

View File

@@ -1,48 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="MapModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>24.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Model.Campusmap
{
using CampusAppWPortalLib8.Model.GeoDb;
using System;
/// <summary>
/// This Class manage the properties of a Map
/// </summary>
public class MapModel
{
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="MapModel" /> class.
/// </summary>
public MapModel(string xmlFilePath)
{
this.LoadSpatials(xmlFilePath);
}
#endregion
#region Property
/// <summary>Gets or sets the spatial of the map.</summary>
/// <value>The spatial.</value>
public SpsModel Spatial { get; set; }
#endregion
#region Methods
/// <summary>Loads the spatial./</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
protected virtual void LoadSpatials(string xmlFilePath)
{
}
#endregion
}
}

View File

@@ -1,41 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceInformation.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>19.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Model.GeoDb
{
using System;
using System.Xml.Serialization;
/// <summary>Information about the place.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
public class PlaceInformation : IEquatable<PlaceInformation>
{
/// <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>
[XmlText]
public string InformationValue { get; set; }
/// <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))
{
return true;
}
return false;
}
}
}

View File

@@ -1,167 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Model.GeoDb
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
/// <summary>
/// Model for a place of the SPSService
/// </summary>
public class PlaceModel : IEquatable<PlaceModel>
{
/// <summary>
/// Gets or sets the placeId
/// </summary>
[XmlAttribute("id")]
public string PlaceId { get; set; }
/// <summary>
/// Gets or sets the id of the "parent" of a place
/// </summary>
[XmlAttribute("parentId")]
public string ParentId { get; set; }
/// <summary>
/// Gets or sets the ReferencePoint of a place
/// </summary>
[XmlAttribute("refpoint")]
public string RefPoint { get; set; }
/// <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>
[XmlElement("placeService")]
public ObservableCollection<PlaceService> Services { get; set; }
/// <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 = "{\"pid\":\"" + this.PlaceId + "\",\"parent\":\"" + this.ParentId + "\"}";
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>
public bool Equals(PlaceModel other)
{
if (other.PlaceId.Equals(this.PlaceId))
{
return true;
}
return false;
}
/// <summary>Adds a place informations.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="placeInformations">The place informations.</param>
public void AddPlaceInformations(List<PlaceInformation> placeInformations)
{
foreach (PlaceInformation info in placeInformations)
{
if (this.Informations.Contains(info))
{
int index = this.Informations.IndexOf(info);
this.Informations[index].InformationValue = info.InformationValue;
}
else
{
this.Informations.Add(info);
}
}
}
/// <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)
{
if (this.Services.Contains(service))
{
int index = this.Services.IndexOf(service);
this.Services[index].Request = service.Request;
this.Services[index].SAP = service.SAP;
}
else
{
this.Services.Add(service);
}
}
}
/// <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)
{
bool tmpResult = false;
foreach (PlaceInformation info in this.Informations)
{
if (name.Equals(info.InformationName))
{
tmpResult = true;
break;
}
}
if (!tmpResult)
{
return tmpResult;
}
}
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>
public bool ContainsServiceNames(List<string> services)
{
foreach (string name in services)
{
bool tmpResult = false;
foreach (PlaceService service in this.Services)
{
if (name.Equals(service.ServiceName))
{
tmpResult = true;
break;
}
}
if (!tmpResult)
{
return tmpResult;
}
}
return true;
}
}
}

View File

@@ -1,57 +0,0 @@
//-----------------------------------------------------------------------------
// <copyright file="PlaceService.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>19.08.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWPortalLib8.Model.GeoDb
{
using System;
using System.Xml.Serialization;
/// <summary>Place service.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
public class PlaceService : IEquatable<PlaceService>
{
/// <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>
[XmlElement("sap")]
public string SAP { get; set; }
/// <summary>Gets or sets the request for a place.</summary>
/// <value>The request.</value>
[XmlElement("request")]
public string Request { get; set; }
/// <summary>Gets the URL string.</summary>
/// <value>The URL string.</value>
public string URLString
{
get
{
return this.SAP + this.Request;
}
}
/// <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))
{
return true;
}
return false;
}
}
}

View File

@@ -1,200 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="SpsModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Model.GeoDb
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml.Serialization;
/// <summary>
/// Model for a xml-response of the SPSService
/// </summary>
[XmlRoot("root")]
public class SpsModel
{
/// <summary>Initializes a new instance of the SpsModel class.</summary>
/// <remarks>Stubbfel, 20.08.2013.</remarks>
public SpsModel()
{
this.HasChanged = false;
this.Places = new ObservableCollection<PlaceModel>();
}
/// <summary>
/// Gets or sets a list of places
/// </summary>
[XmlElement("place")]
public ObservableCollection<PlaceModel> Places { get; set; }
/// <summary>Gets 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; }
/// <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="informationName">(Optional) name of the information.</param>
/// <returns>The places by information.</returns>
public List<PlaceModel> GetPlacesByInformation(string query, bool ignoreCases = true, string informationName = null)
{
string querryLow = string.Empty;
IEnumerable<PlaceModel> resultplaces = null;
// select correct statement
if (ignoreCases && informationName == null)
{
querryLow = query.ToLower();
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.ToLower().Contains(querryLow)
select place;
}
else if (ignoreCases && informationName != null)
{
querryLow = query.ToLower();
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.ToLower().Contains(querryLow) && info.InformationName.Equals(informationName)
select place;
}
else if (!ignoreCases && informationName == null)
{
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.Contains(querryLow)
select place;
}
else if (!ignoreCases && informationName != null)
{
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.Contains(querryLow) && info.InformationName.Equals(informationName)
select place;
}
// null assert
if (resultplaces == null)
{
return null;
}
return resultplaces.ToList<PlaceModel>();
}
/// <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)
{
if (this.Places.Contains(place))
{
int index = this.Places.IndexOf(place);
this.Places[index].AddPlaceInformations(place.Informations.ToList());
this.Places[index].AddPlaceServices(place.Services.ToList());
}
else
{
this.Places.Add(place);
}
}
this.HasChanged = true;
}
/// <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>();
foreach (PlaceModel place in this.Places)
{
pidList.Add(place.PlaceId);
}
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>
public PlaceModel GetPlaceById(string id)
{
foreach (PlaceModel place in this.Places)
{
if (place.PlaceId.Equals(id))
{
return place;
}
}
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>
public bool ContainsInformationNames(List<string> pidList, List<string> names)
{
foreach (string pid in pidList)
{
PlaceModel place = this.GetPlaceById(pid);
if (!place.ContainsInformationNames(names))
{
return false;
}
}
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>
public bool ContainsServiceNames(List<string> pidList, List<string> names)
{
foreach (string pid in pidList)
{
PlaceModel place = this.GetPlaceById(pid);
if (!place.ContainsServiceNames(names))
{
return false;
}
}
return true;
}
/// <summary>Filter by PID.</summary>
/// <remarks>Stubbfel, 11.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <returns>flitered list of places</returns>
public List<PlaceModel> FilterByPid(List<string> pidList)
{
List<PlaceModel> fitlerList = new List<PlaceModel>();
foreach (PlaceModel place in this.Places)
{
if (pidList.Contains(place.PlaceId))
{
fitlerList.Add(place);
}
}
return fitlerList;
}
}
}

View File

@@ -5,11 +5,11 @@
// <author>stubbfel</author>
// <sience>06.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Mensa
namespace CampusAppWPortalLib8.Model.Mensa
{
using System.Xml.Serialization;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Resources;
using CampusAppWPortalLib8.Utility;
/// <summary>
/// Model for a meal
@@ -76,16 +76,6 @@ namespace CampusAppWP8.Model.Mensa
/// </summary>
private string mealName;
/// <summary>
/// Name of the icon
/// </summary>
private string iconName;
/// <summary>
/// Url of the icon
/// </summary>
private string iconUrl;
/// <summary>
/// Description of the meal
/// </summary>
@@ -130,38 +120,6 @@ namespace CampusAppWP8.Model.Mensa
}
}
/// <summary>
/// Gets or sets the iconName
/// </summary>
[XmlAttribute("icon")]
public string IconName
{
get
{
return this.iconName;
}
set
{
if (value != this.iconName)
{
this.iconName = value;
this.CreateIconUrl();
}
}
}
/// <summary>
/// Gets the iconUrl
/// </summary>
public string IconUrl
{
get
{
return this.iconUrl;
}
}
/// <summary>
/// Gets or sets the mealDescription
/// </summary>
@@ -177,7 +135,7 @@ namespace CampusAppWP8.Model.Mensa
{
if (value != this.mealDesc)
{
this.mealDesc = StringManager.StripHTML(value);
this.mealDesc = DefaultStringManager.StripHTML(value);
}
}
}
@@ -222,47 +180,6 @@ namespace CampusAppWP8.Model.Mensa
break;
}
}
/// <summary>
/// Method create depends of the iconUrl the iconName
/// </summary>
private void CreateIconUrl()
{
switch (this.iconName)
{
case MealModel.MealIconNameVegetarian:
this.iconUrl = Icons.Vegetarian;
break;
case MealModel.MealIconNameFree:
this.iconUrl = Icons.Free;
break;
case MealModel.MealIconNameCowPig:
this.iconUrl = Icons.CowPig;
break;
case MealModel.MealIconNameFish:
this.iconUrl = Icons.Fish;
break;
case MealModel.MealIconNameFowl:
this.iconUrl = Icons.Fowl;
break;
case MealModel.MealIconNameLamb:
this.iconUrl = Icons.Lamb;
break;
case MealModel.MealIconNamePig:
this.iconUrl = Icons.Pig;
break;
case MealModel.MealIconNameWild:
this.iconUrl = Icons.Wild;
break;
case MealModel.MealIconNameCow:
this.iconUrl = Icons.Cow;
break;
default:
this.iconUrl = string.Empty;
break;
}
}
#endregion
}
}

View File

@@ -5,7 +5,7 @@
// <author>stubbfel</author>
// <sience>04.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Mensa
namespace CampusAppWPortalLib8.Model.Mensa
{
using System;
using System.Collections.ObjectModel;
@@ -28,11 +28,6 @@ namespace CampusAppWP8.Model.Mensa
/// </summary>
private string date;
/// <summary>
/// DateTime of the monday
/// </summary>
private DateTime monday;
#endregion
#region Constructor
@@ -42,7 +37,6 @@ namespace CampusAppWP8.Model.Mensa
/// </summary>
public MenuModel()
{
this.monday = MenuWeekModel.CalcFirstWeekDay();
}
#endregion

View File

@@ -5,7 +5,7 @@
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Mensa
namespace CampusAppWPortalLib8.Model.Mensa
{
using System;
using System.Collections.ObjectModel;

View File

@@ -5,7 +5,7 @@
// <author>fiedlchr</author>
// <sience>24.06.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.RSS
namespace CampusAppWPortalLib8.Model.RSS
{
using System.Collections.ObjectModel;
using System.Collections.Specialized;

View File

@@ -5,7 +5,7 @@
// <author>fiedlchr</author>
// <sience>24.06.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.RSS
namespace CampusAppWPortalLib8.Model.RSS
{
using System;
using System.Text;

View File

@@ -5,7 +5,7 @@
// <author>fiedlchr</author>
// <sience>24.06.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.RSS
namespace CampusAppWPortalLib8.Model.RSS
{
using System;
using System.Collections.ObjectModel;

View File

@@ -5,7 +5,7 @@
// <author>stubbfel</author>
// <sience>06.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Utility
namespace CampusAppWPortalLib8.Model.Utility
{
/// <summary>
/// This class is a Model for the URLParameter like GET-Parameter

View File

@@ -5,7 +5,7 @@
// <author>stubbfel</author>
// <sience>17.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Utility
namespace CampusAppWPortalLib8.Model.Utility
{
/// <summary>
/// This class is a Model for the URLParameter like GET-Parameter

View File

@@ -0,0 +1,136 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.18051
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CampusAppWPortalLib8.Resources {
using System;
using System.Reflection;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class AppResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal AppResources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWPortalLib8.Resources.AppResources", typeof(AppResources).GetTypeInfo().Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Aktion ähnelt.
/// </summary>
public static string MensaApp_Action {
get {
return ResourceManager.GetString("MensaApp_Action", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Bio ähnelt.
/// </summary>
public static string MensaApp_Bio {
get {
return ResourceManager.GetString("MensaApp_Bio", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 1 ähnelt.
/// </summary>
public static string MensaApp_Dinner1 {
get {
return ResourceManager.GetString("MensaApp_Dinner1", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt.
/// </summary>
public static string MensaApp_Dinner2 {
get {
return ResourceManager.GetString("MensaApp_Dinner2", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 3 ähnelt.
/// </summary>
public static string MensaApp_Dinner3 {
get {
return ResourceManager.GetString("MensaApp_Dinner3", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 4 ähnelt.
/// </summary>
public static string MensaApp_Dinner4 {
get {
return ResourceManager.GetString("MensaApp_Dinner4", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 5 ähnelt.
/// </summary>
public static string MensaApp_Dinner5 {
get {
return ResourceManager.GetString("MensaApp_Dinner5", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Suppe ähnelt.
/// </summary>
public static string MensaApp_Soup {
get {
return ResourceManager.GetString("MensaApp_Soup", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="MensaApp_Action" xml:space="preserve">
<value>Aktion</value>
</data>
<data name="MensaApp_Bio" xml:space="preserve">
<value>Bio</value>
</data>
<data name="MensaApp_Dinner1" xml:space="preserve">
<value>Essen 1</value>
</data>
<data name="MensaApp_Dinner2" xml:space="preserve">
<value>Essen 2</value>
</data>
<data name="MensaApp_Dinner3" xml:space="preserve">
<value>Essen 3</value>
</data>
<data name="MensaApp_Dinner4" xml:space="preserve">
<value>Essen 4</value>
</data>
<data name="MensaApp_Dinner5" xml:space="preserve">
<value>Essen 5</value>
</data>
<data name="MensaApp_Soup" xml:space="preserve">
<value>Suppe</value>
</data>
</root>

View File

@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DeTelPrefix" xml:space="preserve">
<value>+49</value>
</data>
<data name="PathEvents_EventsIndexPage" xml:space="preserve">
<value>/Pages/Events/EventIndexPage.xaml</value>
</data>
<data name="PathMensa_MensaPage" xml:space="preserve">
<value>/Pages/Mensa/MensaPage.xaml</value>
</data>
<data name="PathNews_NewsIndexPage" xml:space="preserve">
<value>/Pages/News/NewsIndexPage.xaml</value>
</data>
<data name="UniCBTelPrefix" xml:space="preserve">
<value>035569</value>
</data>
<data name="UrlEvents_Addr" xml:space="preserve">
<value>http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php</value>
</data>
<data name="UrlMensa_Week_CBMain" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&amp;v=1</value>
</data>
<data name="UrlMensa_Week_CBNorth" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&amp;v=1</value>
</data>
<data name="UrlMensa_Week_CBSouth" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusHL&amp;v=1</value>
</data>
<data name="UrlMensa_Week_SBFMain" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=Senftenberg&amp;v=1</value>
</data>
<data name="UrlNews_Addr" xml:space="preserve">
<value>http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php</value>
</data>
<data name="XMLRootElementName" xml:space="preserve">
<value>root</value>
</data>
</root>

View File

@@ -0,0 +1,172 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.18051
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CampusAppWPortalLib8.Resources {
using System;
using System.Reflection;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Constants {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Constants() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWPortalLib8.Resources.Constants", typeof(Constants).GetTypeInfo().Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die +49 ähnelt.
/// </summary>
public static string DeTelPrefix {
get {
return ResourceManager.GetString("DeTelPrefix", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Events/EventIndexPage.xaml ähnelt.
/// </summary>
public static string PathEvents_EventsIndexPage {
get {
return ResourceManager.GetString("PathEvents_EventsIndexPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Mensa/MensaPage.xaml ähnelt.
/// </summary>
public static string PathMensa_MensaPage {
get {
return ResourceManager.GetString("PathMensa_MensaPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/News/NewsIndexPage.xaml ähnelt.
/// </summary>
public static string PathNews_NewsIndexPage {
get {
return ResourceManager.GetString("PathNews_NewsIndexPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die 035569 ähnelt.
/// </summary>
public static string UniCBTelPrefix {
get {
return ResourceManager.GetString("UniCBTelPrefix", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php ähnelt.
/// </summary>
public static string UrlEvents_Addr {
get {
return ResourceManager.GetString("UrlEvents_Addr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&amp;v=1 ähnelt.
/// </summary>
public static string UrlMensa_Week_CBMain {
get {
return ResourceManager.GetString("UrlMensa_Week_CBMain", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&amp;v=1 ähnelt.
/// </summary>
public static string UrlMensa_Week_CBNorth {
get {
return ResourceManager.GetString("UrlMensa_Week_CBNorth", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusHL&amp;v=1 ähnelt.
/// </summary>
public static string UrlMensa_Week_CBSouth {
get {
return ResourceManager.GetString("UrlMensa_Week_CBSouth", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=Senftenberg&amp;v=1 ähnelt.
/// </summary>
public static string UrlMensa_Week_SBFMain {
get {
return ResourceManager.GetString("UrlMensa_Week_SBFMain", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php ähnelt.
/// </summary>
public static string UrlNews_Addr {
get {
return ResourceManager.GetString("UrlNews_Addr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die root ähnelt.
/// </summary>
public static string XMLRootElementName {
get {
return ResourceManager.GetString("XMLRootElementName", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,13 @@
<StyleCopSettings Version="105">
<GlobalSettings>
<CollectionProperty Name="RecognizedWords">
<Value>nfc</Value>
<Value>param</Value>
<Value>qr</Value>
<Value>str</Value>
<Value>stubbfel</Value>
<Value>telefon</Value>
<Value>uni</Value>
</CollectionProperty>
</GlobalSettings>
</StyleCopSettings>

View File

@@ -0,0 +1,21 @@
//-----------------------------------------------------------------------
// <copyright file="AbstractBackgroundTasks.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>18.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Utility
{
/// <summary>
/// abstract class for BackGroundTask
/// </summary>
public abstract class AbstractBackgroundTasks
{
/// <summary>
/// Gets or sets the name of the last running task
/// </summary>
protected static string LastAddedTaskName { get; set; }
}
}

View File

@@ -0,0 +1,78 @@
//-----------------------------------------------------------------------
// <copyright file="AbstractHttpRequest.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>10.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Utility
{
using System;
using System.Collections.Generic;
using System.Net;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>
/// abstract Class provides some methods and member for HttpRequest
/// </summary>
public abstract class AbstractHttpRequest
{
#region Member
/// <summary>
/// BaseAddress of the webClient
/// </summary>
private string baseAddress;
#endregion
#region property
/// <summary>
/// Gets or sets BaseAddress of the webClient
/// </summary>
protected string BaseAddress
{
get
{
return this.baseAddress;
}
set
{
if (value != this.baseAddress)
{
this.baseAddress = value;
}
}
}
#endregion
#region Methods
/// <summary>
/// Method create the Url for the http-get-method
/// </summary>
/// <param name="parameters"> list of parameters</param>
/// <returns>absolute API-Url include GetParameter</returns>
public Uri CreateGetUrl(List<UrlParamModel> parameters)
{
string paramterStr = string.Empty;
string seperator = string.Empty;
foreach (UrlParamModel parameter in parameters)
{
if (string.Empty.Equals(seperator))
{
seperator = parameter.ParamToken;
}
paramterStr += parameter.ToString();
}
string getUrlStr = this.baseAddress + seperator + paramterStr;
return new Uri(getUrlStr, UriKind.Absolute);
}
#endregion
}
}

View File

@@ -0,0 +1,212 @@
//-----------------------------------------------------------------------
// <copyright file="DefaultStringManager.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>06.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Utility
{
using System;
using System.Text.RegularExpressions;
using CampusAppWPortalLib8.Resources;
/// <summary>
/// Class provides some special StringMethods
/// </summary>
public class DefaultStringManager
{
#region Members
/// <summary>
/// Patter for Html-Tags
/// </summary>
private static readonly string HtmlTagPattern = "<.*?>";
/// <summary>The mail valid regular expression.</summary>
private static readonly string EMailValidRegex = @"^(?("")(""[^""]+?""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9]{2,17}))$";
#endregion
#region Methods
/// <summary>
/// Method removes Html-Tag of a String
/// </summary>
/// <param name="inputString">String with Html-Tags</param>
/// <returns>String without Html-Tags</returns>
public static string StripHTML(string inputString)
{
return Regex.Replace(inputString, DefaultStringManager.HtmlTagPattern, string.Empty);
}
/// <summary>
/// Method add an Newline to a string
/// </summary>
/// <param name="str">input string</param>
/// <returns>input string + newline</returns>
public static string AddNewLine(string str)
{
return str.ToString() + "\n";
}
/// <summary>Method remove(TrimEND!) an Newline to a string.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
/// <param name="str">input string.</param>
/// <returns>input string - newline.</returns>
public static string RemoveNewLine(string str)
{
return str.TrimEnd('\n');
}
/// <summary>Query if 'strIn' is valid email.</summary>
/// <remarks>Stubbfel, 04.09.2013.</remarks>
/// <param name="strIn">The in.</param>
/// <returns>true if valid email, false if not.</returns>
public static bool IsValidEmail(string strIn)
{
// Return true if strIn is in valid e-mail format.
try
{
return Regex.IsMatch(
strIn,
DefaultStringManager.EMailValidRegex,
RegexOptions.IgnoreCase);
}
catch (Exception)
{
return false;
}
}
/// <summary>Creates uni telefon number.</summary>
/// <remarks>Stubbfel, 04.09.2013.</remarks>
/// <param name="input">The input.</param>
/// <returns>The new uni telefon number.</returns>
public static string CreateUniTelefonNumber(string input)
{
string result = null;
if (input.Length < 5)
{
result = Constants.UniCBTelPrefix + input.TrimStart('0');
}
else
{
result = input;
}
Regex regexObj = new Regex(@"[^\d]");
result = regexObj.Replace(result.TrimStart('0'), string.Empty);
result = Constants.DeTelPrefix + result;
return result;
}
/// <summary>
/// Method create from a long string a short string
/// </summary>
/// <param name="longStr">the long input String</param>
/// <param name="maxLenght">max length of the short string</param>
/// <param name="suffix">(optional) suffix which added to the short string, when long string has to be cut</param>
/// <returns>the shorted string</returns>
public static string ToShortString(string longStr, int maxLenght, string suffix = "")
{
string shortStr = longStr;
if (shortStr.Length > maxLenght)
{
shortStr = shortStr.Substring(0, maxLenght) + suffix;
}
return shortStr;
}
/// <summary>
/// Method gets the placeId of the result string for an qrCode string
/// </summary>
/// <param name="qrcodeResult">input qrCode string</param>
/// <returns>the id if it was found it in the string otherwise null</returns>
public static string FilterPlaceIdinQRResultString(string qrcodeResult)
{
string[] lines = qrcodeResult.Split('\n');
string tmpLineTrim;
foreach (string line in lines)
{
tmpLineTrim = line.Trim();
if (DefaultStringManager.IsDigitsOnly(tmpLineTrim))
{
return tmpLineTrim;
}
}
return null;
}
/// <summary>
/// Method check if the string contains only digit
/// </summary>
/// <param name="str">input string</param>
/// <returns>true if the string contains only digit, otherwise false</returns>
public static bool IsDigitsOnly(string str)
{
foreach (char c in str)
{
if (c < '0' || c > '9')
{
return false;
}
}
return true;
}
/// <summary>
/// Method gets the placeId of the result string for an nfc string
/// </summary>
/// <param name="nfcResult">input nfc string</param>
/// <returns>the id if it was found it in the string otherwise null</returns>
public static string FilterPlaceIdinNFCResultString(string nfcResult)
{
string nfcResultTrim = nfcResult.Trim('{');
nfcResultTrim = nfcResultTrim.Trim('}');
string[] items = nfcResultTrim.Split(',');
string[] tmpStringPair;
foreach (string item in items)
{
tmpStringPair = item.Trim().Split(':');
if (tmpStringPair.Length == 2)
{
string pairKey = tmpStringPair[0].Trim('\"').Trim();
if (pairKey.Equals("pid"))
{
return tmpStringPair[1].Trim('\"').Trim();
}
}
}
return null;
}
/// <summary>Count character.</summary>
/// <remarks>Fiedler, 27.08.2013.</remarks>
/// <param name="str">input string.</param>
/// <param name="c">The character.</param>
/// <returns>The total number of the specified character in the string.</returns>
public static int CountChar(string str, char c)
{
int retValue = 0;
for (int i = 0; i < str.Length; i++)
{
if (str[i].Equals(c))
{
retValue++;
}
}
return retValue;
}
#endregion
}
}

View File

@@ -20,7 +20,7 @@ namespace CampusAppWPortalLib8.Utility
/// <param name="exception">exception which has to log</param>
public static void LogException(Exception exception)
{
// Console.WriteLine(exception);
// Console.WriteLine(exception);
}
/// <summary>
@@ -29,7 +29,7 @@ namespace CampusAppWPortalLib8.Utility
/// <param name="msg">to be logged message</param>
public static void LogMsg(string msg)
{
// Console.WriteLine(msg);
// Console.WriteLine(msg);
}
}
}

View File

@@ -1,154 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="NDEFMessage.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>21.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Utility.NDEF
{
using System.Collections.Generic;
using System.IO;
/// <summary>Ndef message.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public class NDEFMessage
{
#region Members
/// <summary>The records.</summary>
private List<NDEFRecord> records;
#endregion
#region constructors
/// <summary>Initializes a new instance of the NDEFMessage class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="content">The content.</param>
/// <param name="type"> The type.</param>
/// <param name="tnf"> (Optional) the tnf.</param>
public NDEFMessage(string content, TYPEVAL type, NDEFRecord.TNFVAL tnf = NDEFRecord.TNFVAL.WKT)
{
this.records = new List<NDEFRecord>();
float recordsCount = (float)content.Length / NDEFRecord.MaxRecordPayLoad;
NDEFRecord tmpRecord = null;
string praefix = NDEFMessage.GetPraefix(type);
for (int i = 0; recordsCount > 0; i++)
{
tmpRecord = new NDEFShortRecord();
tmpRecord.Type = type;
tmpRecord.TNF = tnf;
tmpRecord.PayloadPraefix = praefix;
int recordsize = 255;
if (content.Length < (i + 1) * recordsize)
{
recordsize = content.Length - (i * recordsize);
}
tmpRecord.Payload = content.Substring(i * 255, recordsize);
if (i == 0)
{
tmpRecord.MB = NDEFRecord.NDEFFlags.MBSET;
}
this.records.Add(tmpRecord);
recordsCount--;
}
this.records[this.records.IndexOf(tmpRecord)].ME = NDEFRecord.NDEFFlags.MESET;
}
/// <summary>Initializes a new instance of the NDEFMessage class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="array">The array.</param>
public NDEFMessage(byte[] array)
{
this.records = new List<NDEFRecord>();
NDEFRecord tmpRecord = null;
for (int i = 0; i < array.Length; i += tmpRecord.RecordSize)
{
tmpRecord = new NDEFShortRecord(array, i);
this.records.Add(tmpRecord);
}
}
#endregion
#region enum
/// <summary>Values that represent TYPEVAL.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public enum TYPEVAL
{
/// <summary>An enum constant representing the empty option.</summary>
EMPTY = 0x00,
/// <summary>An enum constant representing the URL option.</summary>
URL = 0x55,
/// <summary>An enum constant representing the text option.</summary>
TEXT = 0x54,
}
#endregion
#region Methods
/// <summary>Gets a praefix.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="type">The type.</param>
/// <returns>The praefix.</returns>
public static string GetPraefix(TYPEVAL type)
{
string praefix = string.Empty;
switch (type)
{
case TYPEVAL.TEXT:
praefix = "\x02" + "de";
break;
case TYPEVAL.URL:
praefix = "\x01";
break;
default:
break;
}
return praefix;
}
/// <summary>Gets the content.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>The content.</returns>
public string GetContent()
{
string result = string.Empty;
foreach (NDEFRecord record in this.records)
{
result += record.Payload;
}
return result;
}
/// <summary>Converts this object to a byte array.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a byte[].</returns>
public byte[] ToByteArray()
{
MemoryStream ms = new MemoryStream();
foreach (NDEFRecord record in this.records)
{
ms.Write(record.ToByteArray(), 0, record.RecordSize);
}
return ms.ToArray();
}
#endregion
}
}

View File

@@ -1,188 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="NDEFRecord.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>21.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Utility.NDEF
{
using System.IO;
using System.Text;
/// <summary>Ndef record of a NDEFMessage.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public abstract class NDEFRecord
{
#region Members
/// <summary>The maximum record pay load.</summary>
public const int MaxRecordPayLoad = 255;
/// <summary>Size of the type.</summary>
protected const byte TypeSize = 0x01;
#endregion
#region Constructors
/// <summary>Initializes a new instance of the NDEFRecord class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public NDEFRecord()
{
}
/// <summary>Initializes a new instance of the NDEFRecord class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="array">The array.</param>
/// <param name="index">(Optional) zero-based index of the.</param>
public NDEFRecord(byte[] array, int index = 0)
{
this.FormatFlags = array[index];
}
#endregion
#region enum
/// <summary>Values that represent NDEFFlags.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public enum NDEFFlags
{
/// <summary>An Enum constant representing the UNSET option.</summary>
UNSET = 0x00,
/// <summary>An Enum constant representing the Message begin option.</summary>
MBSET = 0x80,
/// <summary>An Enum constant representing the Message end option.</summary>
MESET = 0x40,
/// <summary>An Enum constant representing the CHUNK FLAG option.</summary>
CFSET = 0x20,
/// <summary>An Enum constant representing the Short Record set option.</summary>
SRSET = 0x10,
/// <summary>An Enum constant representing the ID length option.</summary>
ILSET = 0x08,
/// <summary>An enum constant representing the tnfset option.</summary>
TNFSET = 0x03
}
/// <summary>Values that represent TNFVAL.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public enum TNFVAL
{
/// <summary>An enum constant representing the empty option.</summary>
EMPTY = 0x00,
/// <summary>An enum constant representing the Well-Know-Type option.</summary>
WKT = 0x01,
/// <summary>An enum constant representing the MediaType option.</summary>
MEDIATYPE = 0x02,
/// <summary>An enum constant representing the URI option.</summary>
URI = 0x03,
/// <summary>An enum constant representing the NFCE option.</summary>
NFCE = 0x04,
/// <summary>An enum constant representing the unknow option.</summary>
unknow = 0x05,
/// <summary>An enum constant representing the unchanged option.</summary>
UNCHANGED = 0x06,
/// <summary>An enum constant representing the reserved option.</summary>
RESERVED = 0x07
}
#endregion
#region Properties
/// <summary>Gets or sets the MBFlag.</summary>
/// <value>The MBFlag.</value>
public NDEFFlags MB { get; set; }
/// <summary>Gets or sets MEFlag.</summary>
/// <value>The MEFlag .</value>
public NDEFFlags ME { get; set; }
/// <summary>Gets or sets the CFFlag.</summary>
/// <value>The CFFlag.</value>
public NDEFFlags CF { get; set; }
/// <summary>Gets or sets the SRFlag.</summary>
/// <value>The SRFlag.</value>
public NDEFFlags SR { get; set; }
/// <summary>Gets or sets the ILFlag.</summary>
/// <value>The ILFlag.</value>
public NDEFFlags IL { get; set; }
/// <summary>Gets or sets the TNFField.</summary>
/// <value>The TNFField.</value>
public TNFVAL TNF { get; set; }
/// <summary>Gets or sets the type.</summary>
/// <value>The type.</value>
public NDEFMessage.TYPEVAL Type { get; set; }
/// <summary>Gets or sets the format flags.</summary>
/// <value>The format flags.</value>
public byte FormatFlags
{
get
{
return (byte)((byte)this.TNF | ((byte)this.MB) | ((byte)this.ME) | ((byte)this.CF) | ((byte)this.SR) | ((byte)this.IL));
}
protected set
{
this.TNF = (TNFVAL)(value & (byte)NDEFFlags.TNFSET);
this.MB = (NDEFFlags)(value & (byte)NDEFFlags.MBSET);
this.ME = (NDEFFlags)(value & (byte)NDEFFlags.MESET);
this.CF = (NDEFFlags)(value & (byte)NDEFFlags.CFSET);
this.SR = (NDEFFlags)(value & (byte)NDEFFlags.SRSET);
this.IL = (NDEFFlags)(value & (byte)NDEFFlags.ILSET);
}
}
/// <summary>Gets or sets the payload.</summary>
/// <value>The payload.</value>
public string Payload { get; set; }
/// <summary>Gets the size of the record.</summary>
/// <value>The size of the record.</value>
public int RecordSize
{
get
{
return this.HeaderSize + this.Payload.Length + this.PayloadPraefix.Length;
}
}
/// <summary>Gets or sets the payload praefix.</summary>
/// <value>The payload praefix.</value>
public string PayloadPraefix { get; set; }
/// <summary>Gets or sets the size of the header.</summary>
/// <value>The size of the header.</value>
protected int HeaderSize { get; set; }
#endregion
#region Methods
/// <summary>Converts the record to a byte array.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a byte[].</returns>
public abstract byte[] ToByteArray();
#endregion
}
}
// End of Utility\NDEF\NDEFRecord.cs

View File

@@ -1,63 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="NDEFShortRecord.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>21.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Utility.NDEF
{
using System.Text;
/// <summary>Ndef short record.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public class NDEFShortRecord : NDEFRecord
{
/// <summary>Initializes a new instance of the NDEFShortRecord class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public NDEFShortRecord()
{
this.HeaderSize = 4;
this.SR = NDEFFlags.SRSET;
this.IL = NDEFFlags.UNSET;
this.CF = NDEFFlags.UNSET;
}
/// <summary>Initializes a new instance of the NDEFShortRecord class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="array">The array.</param>
/// <param name="index">(Optional) zero-based index of the.</param>
public NDEFShortRecord(byte[] array, int index = 0)
: base(array)
{
this.HeaderSize = 4;
this.Type = (NDEFMessage.TYPEVAL)array[index + 3];
this.PayloadPraefix = NDEFMessage.GetPraefix(this.Type);
int payLoadSize = array[index + 2] - this.PayloadPraefix.Length;
this.Payload = Encoding.UTF8.GetString(array, index + this.HeaderSize + this.PayloadPraefix.Length, payLoadSize);
}
/// <summary>Converts this NDEFShortRecord to a byte array.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a byte[].</returns>
public override byte[] ToByteArray()
{
byte[] payloadAr = Encoding.UTF8.GetBytes(this.PayloadPraefix + this.Payload);
byte[] array = new byte[payloadAr.Length + this.HeaderSize];
array[0] = this.FormatFlags;
array[1] = NDEFRecord.TypeSize;
array[2] = (byte)(Payload.Length + this.PayloadPraefix.Length);
array[3] = (byte)this.Type;
int i = this.HeaderSize;
foreach (byte b in payloadAr)
{
array[i] = b;
i++;
}
return array;
}
}
}

View File

@@ -1,59 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="StringManager.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>06.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Utility
{
using System.Text.RegularExpressions;
/// <summary>
/// Class provides some special StringMethods
/// </summary>
public static class StringManager
{
#region Members
/// <summary>
/// Patter for Html-Tags
/// </summary>
private static readonly string HtmlTagPattern = "<.*?>";
#endregion
#region Methods
/// <summary>
/// Method removes Html-Tag of a String
/// </summary>
/// <param name="inputString">String with Html-Tags</param>
/// <returns>String without Html-Tags</returns>
public static string StripHTML(string inputString)
{
return Regex.Replace(inputString, HtmlTagPattern, string.Empty);
}
/// <summary>
/// Method add an Newline to a string
/// </summary>
/// <param name="str">input string</param>
/// <returns>input string + newline</returns>
public static string AddNewLine(string str)
{
return str.ToString() + "\n";
}
/// <summary>
/// Method remove(TrimEND!) an Newline to a string
/// </summary>
/// <param name="str">input string</param>
/// <returns>input string - newline</returns
public static string RemoveNewLine(string str)
{
return str.TrimEnd('\n');
}
#endregion
}
}