Merge branch 'feature/#188' into develop
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -25,6 +25,7 @@
|
||||
*.csproj -text merge=union
|
||||
*.sln -text merge=union
|
||||
*.resx -text merge=union
|
||||
*.StyleCop -text merge=union
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
@@ -131,7 +130,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\Exams\Exams.xaml.cs">
|
||||
<DependentUpon>Exams.xaml</DependentUpon>
|
||||
@@ -145,7 +143,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" />
|
||||
@@ -178,8 +178,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" />
|
||||
@@ -190,13 +188,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>
|
||||
@@ -249,7 +244,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>
|
||||
@@ -275,7 +269,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" />
|
||||
@@ -287,11 +280,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">
|
||||
@@ -547,7 +539,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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CampusAppWP8.File.Places
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.GeoDb;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
/// <summary>Places file.</summary>
|
||||
/// <remarks>Stubbfel, 09.09.2013.</remarks>
|
||||
|
||||
@@ -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 + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -273,10 +273,10 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
msgText += AppResources.PlaceLabel_Name + ": ";
|
||||
msgText += place.GetInformationsValue(Constants.PisInformationName_Name);
|
||||
msgText = StringManager.AddNewLine(msgText);
|
||||
msgText = Wp8StringManager.AddNewLine(msgText);
|
||||
msgText += AppResources.PlaceLabel_ShortDesc + ": ";
|
||||
msgText += place.GetInformationsValue(Constants.PisInformationName_ShortDesc);
|
||||
msgText = StringManager.AddNewLine(msgText);
|
||||
msgText = Wp8StringManager.AddNewLine(msgText);
|
||||
}
|
||||
|
||||
MessageBoxes.ShowMainModelInfoMessageBox(msgText);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace CampusAppWP8.Pages
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -19,6 +20,7 @@ namespace CampusAppWP8.Pages
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.File.Places;
|
||||
using CampusAppWP8.Utility.Lui.Tiles;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the StartPage
|
||||
@@ -278,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
|
||||
}
|
||||
}
|
||||
@@ -150,6 +150,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>
|
||||
@@ -483,69 +492,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>
|
||||
@@ -555,24 +501,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>
|
||||
|
||||
@@ -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>
|
||||
@@ -464,4 +437,7 @@
|
||||
<data name="PlaceLabel_ShortDesc" xml:space="preserve">
|
||||
<value>Beschreibung</value>
|
||||
</data>
|
||||
<data name="ContextMenu_PinToStart" xml:space="preserve">
|
||||
<value>Auf Startseite</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1068,15 +1068,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>
|
||||
@@ -1122,51 +1113,6 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&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&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&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&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&app=2&appversion=1 ähnelt.
|
||||
/// </summary>
|
||||
@@ -1301,14 +1247,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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&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&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&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&v=1</value>
|
||||
</data>
|
||||
<data name="SpsApi_CampusDomain" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
@@ -534,4 +507,10 @@
|
||||
<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>
|
||||
</root>
|
||||
@@ -1,26 +1,27 @@
|
||||
<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>pid</Value>
|
||||
<Value>pids</Value>
|
||||
<Value>pis</Value>
|
||||
<Value>prev</Value>
|
||||
<Value>pss</Value>
|
||||
<Value>Senftenberg</Value>
|
||||
<Value>sps</Value>
|
||||
<Value>Stubbfel</Value>
|
||||
<Value>uni</Value>
|
||||
<Value>wifi</Value>
|
||||
</CollectionProperty>
|
||||
</GlobalSettings>
|
||||
<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>Senftenberg</Value>
|
||||
<Value>sps</Value>
|
||||
<Value>Stubbfel</Value>
|
||||
<Value>uni</Value>
|
||||
<Value>wifi</Value>
|
||||
</CollectionProperty>
|
||||
</GlobalSettings>
|
||||
</StyleCopSettings>
|
||||
125
CampusAppWP8/CampusAppWP8/Utility/BackgroundTasks.cs
Normal file
125
CampusAppWP8/CampusAppWP8/Utility/BackgroundTasks.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ namespace CampusAppWP8.Utility
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
using Windows.Storage;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
166
CampusAppWP8/CampusAppWP8/Utility/Lui/Tiles/TileCreator.cs
Normal file
166
CampusAppWP8/CampusAppWP8/Utility/Lui/Tiles/TileCreator.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
29
CampusAppWP8/CampusAppWP8/Utility/Wp8StringManager.cs
Normal file
29
CampusAppWP8/CampusAppWP8/Utility/Wp8StringManager.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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")]
|
||||
99
CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Resources/AppResources.Designer.cs
generated
Normal file
99
CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Resources/AppResources.Designer.cs
generated
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
90
CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Resources/Constants1.Designer.cs
generated
Normal file
90
CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Resources/Constants1.Designer.cs
generated
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
373
CampusAppWP8/CampusAppWP8ScheduledTaskAgent/ScheduledAgent.cs
Normal file
373
CampusAppWP8/CampusAppWP8ScheduledTaskAgent/ScheduledAgent.cs
Normal 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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<StyleCopSettings Version="105">
|
||||
<GlobalSettings>
|
||||
<CollectionProperty Name="RecognizedWords">
|
||||
<Value>perodic</Value>
|
||||
</CollectionProperty>
|
||||
</GlobalSettings>
|
||||
</StyleCopSettings>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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
|
||||
@@ -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
|
||||
136
CampusAppWP8/CampusAppWPortalLib8/Resources/AppResources.Designer.cs
generated
Normal file
136
CampusAppWP8/CampusAppWPortalLib8/Resources/AppResources.Designer.cs
generated
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
144
CampusAppWP8/CampusAppWPortalLib8/Resources/AppResources.resx
Normal file
144
CampusAppWP8/CampusAppWPortalLib8/Resources/AppResources.resx
Normal 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>
|
||||
156
CampusAppWP8/CampusAppWPortalLib8/Resources/Constants.resx
Normal file
156
CampusAppWP8/CampusAppWPortalLib8/Resources/Constants.resx
Normal 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&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&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&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&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>
|
||||
172
CampusAppWP8/CampusAppWPortalLib8/Resources/Constants1.Designer.cs
generated
Normal file
172
CampusAppWP8/CampusAppWPortalLib8/Resources/Constants1.Designer.cs
generated
Normal 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&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&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&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&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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
CampusAppWP8/CampusAppWPortalLib8/Settings.StyleCop
Normal file
11
CampusAppWP8/CampusAppWPortalLib8/Settings.StyleCop
Normal file
@@ -0,0 +1,11 @@
|
||||
<StyleCopSettings Version="105">
|
||||
<GlobalSettings>
|
||||
<CollectionProperty Name="RecognizedWords">
|
||||
<Value>param</Value>
|
||||
<Value>str</Value>
|
||||
<Value>stubbfel</Value>
|
||||
<Value>telefon</Value>
|
||||
<Value>uni</Value>
|
||||
</CollectionProperty>
|
||||
</GlobalSettings>
|
||||
</StyleCopSettings>
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StringManager.cs" company="BTU/IIT">
|
||||
// <copyright file="DefaultStringManager.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>06.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
namespace CampusAppWPortalLib8.Utility
|
||||
{
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWPortalLib8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Class provides some special StringMethods
|
||||
/// </summary>
|
||||
public static class StringManager
|
||||
public class DefaultStringManager
|
||||
{
|
||||
#region Members
|
||||
|
||||
@@ -37,8 +37,7 @@ namespace CampusAppWP8.Utility
|
||||
/// <returns>String without Html-Tags</returns>
|
||||
public static string StripHTML(string inputString)
|
||||
{
|
||||
string result = Regex.Replace(inputString, HtmlTagPattern, string.Empty);
|
||||
return System.Net.HttpUtility.HtmlDecode(result);
|
||||
return Regex.Replace(inputString, DefaultStringManager.HtmlTagPattern, string.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -71,7 +70,7 @@ namespace CampusAppWP8.Utility
|
||||
{
|
||||
return Regex.IsMatch(
|
||||
strIn,
|
||||
StringManager.EMailValidRegex,
|
||||
DefaultStringManager.EMailValidRegex,
|
||||
RegexOptions.IgnoreCase);
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -101,6 +100,24 @@ namespace CampusAppWP8.Utility
|
||||
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;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user