Compare commits
99 Commits
pagesdraft
...
20130627
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22a0315fdd | ||
|
|
fe46e28a26 | ||
|
|
31b4e4459e | ||
|
|
0991901c90 | ||
|
|
94a12f2a77 | ||
|
|
2b96528c7d | ||
|
|
7ee3fa5535 | ||
|
|
a8d93ee943 | ||
|
|
2a8d321a64 | ||
|
|
4b5587770c | ||
|
|
a750b5e1a2 | ||
|
|
709f7fc289 | ||
|
|
811ad35fa9 | ||
|
|
ab0ba5ac6b | ||
|
|
bb3de8beec | ||
|
|
c5ea535489 | ||
|
|
bbc6269ed1 | ||
|
|
d8b3848086 | ||
|
|
775533ec32 | ||
|
|
eb91cbae44 | ||
|
|
b52c0c8625 | ||
|
|
52872b108b | ||
|
|
d06b86bc41 | ||
|
|
c293c331fb | ||
|
|
e044450f1d | ||
|
|
ce6358b9f7 | ||
|
|
e27a8bb989 | ||
|
|
c666a526f0 | ||
|
|
6fed7482ca | ||
|
|
4d79854ee7 | ||
|
|
57da34fc6b | ||
|
|
518bbc00ce | ||
|
|
38b379c6d6 | ||
|
|
24f7607f84 | ||
|
|
55d55c64e0 | ||
|
|
8f472d7662 | ||
|
|
919c1f8d08 | ||
|
|
ff81278aba | ||
|
|
0b71ef13fe | ||
|
|
e180ca3a45 | ||
|
|
978fb9b83b | ||
|
|
fcd674aa4e | ||
|
|
7e2552a8e3 | ||
|
|
ffc902c78f | ||
|
|
5dbcc01dd2 | ||
|
|
a2463795f9 | ||
|
|
53d5fa413e | ||
|
|
5c3a8a3432 | ||
|
|
e451f7ff89 | ||
|
|
25b05855a2 | ||
|
|
52625e6bee | ||
|
|
6da4552e79 | ||
|
|
1c890fd43d | ||
|
|
f8f90ab247 | ||
|
|
0f6196a521 | ||
|
|
eac32fadd3 | ||
|
|
3d3a0fa9e2 | ||
|
|
a93ea28794 | ||
|
|
f49d1bba36 | ||
|
|
db46c1a451 | ||
|
|
7068d54406 | ||
|
|
2f4034a4f2 | ||
|
|
ec3fd17234 | ||
|
|
bff8eb07c8 | ||
|
|
512d367a7e | ||
|
|
eb533e8008 | ||
|
|
6071f96b3b | ||
|
|
72495a5bc5 | ||
|
|
84266dfb59 | ||
|
|
9c973b2b8f | ||
|
|
590cf43751 | ||
|
|
5b66041f81 | ||
|
|
9a81b166cd | ||
|
|
70a8f7a266 | ||
|
|
4bde4a8ba2 | ||
|
|
66e5bd95b8 | ||
|
|
8c8d5bc2ce | ||
|
|
a71a67cd06 | ||
|
|
d935b7c2d9 | ||
|
|
61c0a9c736 | ||
|
|
4b41d8b764 | ||
|
|
1bf0531e34 | ||
|
|
6f92d8f268 | ||
|
|
13c2e96867 | ||
|
|
faa5dc7440 | ||
|
|
29bc862035 | ||
|
|
c2bfc2b1d3 | ||
|
|
78ff7bf24f | ||
|
|
c3a9109a7e | ||
|
|
1265e916c7 | ||
|
|
586718d983 | ||
|
|
ffa0d8a009 | ||
|
|
04695ee32f | ||
|
|
159dab18f3 | ||
|
|
4ef5e7995b | ||
|
|
fa9f3c0fe2 | ||
|
|
a5c37eef1e | ||
|
|
c60fb42122 | ||
|
|
56d7145878 |
32
CampusAppWP8/CampusAppWP8/Api/Lecture/LectureApi.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureApi.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Api.Lecture
|
||||
{
|
||||
using System;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the feed of the Lecture
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// need the XmlAPI
|
||||
/// </remarks>
|
||||
public class LectureApi : XmlApi<LectureList>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureApi" /> class.
|
||||
/// </summary>
|
||||
public LectureApi()
|
||||
: base(new Uri(Constants.UrlLecture_ApiBaseAddr))
|
||||
{
|
||||
this.ValidRootName = Constants.LectureXmlValidRootName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
<!--Anwendungsressourcen-->
|
||||
<Application.Resources>
|
||||
<local:LocalizedStrings xmlns:local="clr-namespace:CampusAppWP8" x:Key="LocalizedStrings"/>
|
||||
<local:ThemelizedIcons xmlns:local="clr-namespace:CampusAppWP8" x:Key="ThemelizedIcons"/>
|
||||
</Application.Resources>
|
||||
|
||||
<Application.ApplicationLifetimeObjects>
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.Resources;
|
||||
using System.IO.IsolatedStorage;
|
||||
|
||||
|
||||
namespace CampusAppWP8
|
||||
@@ -59,6 +60,70 @@ namespace CampusAppWP8
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method save any object to the IsolatedStorage
|
||||
/// </summary>
|
||||
/// <param name="key"> key of the object</param>
|
||||
/// <param name="value">value of the object, if value == null => remove key</param>
|
||||
public static void SaveToIsolatedStorage<T>(string key, T value)
|
||||
{
|
||||
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
|
||||
isolatedStore.Remove(key);
|
||||
if (value != null)
|
||||
{
|
||||
isolatedStore.Add(key, value);
|
||||
}
|
||||
|
||||
isolatedStore.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method load any object to the IsolatedStorage
|
||||
/// </summary>
|
||||
/// <param name="key"> key of the object</param>
|
||||
public static T LoadFromIsolatedStorage<T>(string key)
|
||||
{
|
||||
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
|
||||
|
||||
if(isolatedStore.Contains(key)) {
|
||||
object value = isolatedStore[key];
|
||||
return (T)value;
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method save any object to the IsolatedStorage
|
||||
/// </summary>
|
||||
/// <param name="key"> key of the object</param>
|
||||
/// <param name="value">value of the object, if value == null => remove key</param>
|
||||
public static void SaveToAppState<T>(string key, T value)
|
||||
{
|
||||
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
|
||||
isolatedStore.Remove(key);
|
||||
if (value != null)
|
||||
{
|
||||
isolatedStore.Add(key, value);
|
||||
}
|
||||
|
||||
isolatedStore.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method load any object to the IsolatedStorage
|
||||
/// </summary>
|
||||
/// <param name="key"> key of the object</param>
|
||||
public static T LoadFromAppState<T>(string key)
|
||||
{
|
||||
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
|
||||
|
||||
if (isolatedStore.Contains(key))
|
||||
{
|
||||
object value = isolatedStore[key];
|
||||
return (T)value;
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
// Code, der beim Starten der Anwendung ausgeführt werden soll (z. B. über "Start")
|
||||
// Dieser Code wird beim Reaktivieren der Anwendung nicht ausgeführt
|
||||
private void Application_Launching(object sender, LaunchingEventArgs e)
|
||||
|
||||
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/campus_159.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/link_159.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/mensa_159.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/news_159.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/phone_159.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/search_159.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/webmail_159.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/campus_159.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/link_159.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/mensa_159.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/news_159.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 11 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/phone_159.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/search_159.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/testmap.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
@@ -1,253 +1,361 @@
|
||||
<?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>{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}</ProjectGuid>
|
||||
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CampusAppWP8</RootNamespace>
|
||||
<AssemblyName>CampusAppWP8</AssemblyName>
|
||||
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
||||
<SilverlightApplication>true</SilverlightApplication>
|
||||
<SupportedCultures>
|
||||
</SupportedCultures>
|
||||
<XapOutputs>true</XapOutputs>
|
||||
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
|
||||
<XapFilename>CampusAppWP8_$(Configuration)_$(Platform).xap</XapFilename>
|
||||
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
|
||||
<SilverlightAppEntry>CampusAppWP8.App</SilverlightAppEntry>
|
||||
<ValidateXaml>true</ValidateXaml>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
|
||||
<ExpressionBlendVersion>5.0.40218.0</ExpressionBlendVersion>
|
||||
</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>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</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="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="Model\departments\ChairModel.cs" />
|
||||
<Compile Include="Model\departments\DepartmentModel.cs" />
|
||||
<Compile Include="Model\departments\DepartmentViewModel.cs" />
|
||||
<Compile Include="Model\departments\FacultyModel.cs" />
|
||||
<Compile Include="Model\Mensa\MenuModel.cs" />
|
||||
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
|
||||
<Compile Include="Pages\campusmap\CampusMapPage.xaml.cs">
|
||||
<DependentUpon>CampusMapPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\departments\DepartmentPage.xaml.cs">
|
||||
<DependentUpon>DepartmentPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\lecture\LecturePage.xaml.cs">
|
||||
<DependentUpon>LecturePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\BaseModel.cs" />
|
||||
<Compile Include="Model\BaseViewModel.cs" />
|
||||
<Compile Include="Feed\Mensa\MensaFeed.cs" />
|
||||
<Compile Include="Pages\Mensa\MensaPage.xaml.cs">
|
||||
<DependentUpon>MensaPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\news\NewsPage.xaml.cs">
|
||||
<DependentUpon>NewsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\news\RSSItem.cs" />
|
||||
<Compile Include="Pages\news\RSSNewsTemplate.xaml.cs">
|
||||
<DependentUpon>RSSNewsTemplate.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\StartPage.xaml.cs">
|
||||
<DependentUpon>StartPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\webmail\WebmailPage.xaml.cs">
|
||||
<DependentUpon>WebmailPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\AppResources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Constants.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Constants.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Feed.cs" />
|
||||
<Compile Include="Utility\FeedEventHandler.cs" />
|
||||
<Compile Include="Utility\FileList.cs" />
|
||||
<Compile Include="Utility\FileManager.cs" />
|
||||
<Compile Include="Utility\Logger.cs" />
|
||||
<Compile Include="Utility\URLList.cs" />
|
||||
<Compile Include="Utility\XmlFeed.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="Pages\campusmap\CampusMapPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\departments\DepartmentPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\lecture\LecturePage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Mensa\MensaPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Pages\news\NewsPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\news\RSSNewsTemplate.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\StartPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\webmail\WebmailPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Assets\psd\holo_optionsbuttons.psd" />
|
||||
<None Include="Assets\psd\iconbutton_effects2.psd" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\AppManifest.xml" />
|
||||
<None Include="Properties\WMAppManifest.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\AlignmentGrid.png" />
|
||||
<Content Include="Assets\ApplicationIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileMediumLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="README_FIRST.txt" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Cancel.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Check.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Delete.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Select.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\AppResources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Constants.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Constants.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Phone.Controls.Toolkit">
|
||||
<HintPath>..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<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.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ProjectExtensions />
|
||||
<?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>{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}</ProjectGuid>
|
||||
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CampusAppWP8</RootNamespace>
|
||||
<AssemblyName>CampusAppWP8</AssemblyName>
|
||||
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
||||
<SilverlightApplication>true</SilverlightApplication>
|
||||
<SupportedCultures>
|
||||
</SupportedCultures>
|
||||
<XapOutputs>true</XapOutputs>
|
||||
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
|
||||
<XapFilename>CampusAppWP8_$(Configuration)_$(Platform).xap</XapFilename>
|
||||
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
|
||||
<SilverlightAppEntry>CampusAppWP8.App</SilverlightAppEntry>
|
||||
<ValidateXaml>true</ValidateXaml>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
|
||||
<ExpressionBlendVersion>5.0.40218.0</ExpressionBlendVersion>
|
||||
</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>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</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="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Feed\Openinghours\OpeninghoursFeed.cs" />
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="Model\Campusmap\MapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\MapPinModel.cs" />
|
||||
<Compile Include="Model\Departments\ChairModel.cs" />
|
||||
<Compile Include="Model\Departments\DepartmentModel.cs" />
|
||||
<Compile Include="Model\Departments\DepartmentViewModel.cs" />
|
||||
<Compile Include="Model\Departments\FacultyModel.cs" />
|
||||
<Compile Include="Model\Events\RSSChannelModel.cs" />
|
||||
<Compile Include="Model\Events\RSSViewModel.cs" />
|
||||
<Compile Include="Model\Lecture\LectureActivity.cs" />
|
||||
<Compile Include="Model\Lecture\LectureCourse.cs" />
|
||||
<Compile Include="Model\Lecture\LectureDate.cs" />
|
||||
<Compile Include="Model\Lecture\LectureLecturer.cs" />
|
||||
<Compile Include="Model\Lecture\LectureList.cs" />
|
||||
<Compile Include="Model\Lecture\LectureModule.cs" />
|
||||
<Compile Include="Model\Lecture\LecturePageModel.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\Utility\UrlParamModel.cs" />
|
||||
<Compile Include="Pages\Campusmap\CampusMapPage.xaml.cs">
|
||||
<DependentUpon>CampusMapPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Api\Lecture\LectureApi.cs" />
|
||||
<Compile Include="Feed\Departments\DepartmentFeed.cs" />
|
||||
<Compile Include="Pages\Departments\DepartmentPage.xaml.cs">
|
||||
<DependentUpon>DepartmentPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Feed\Events\EventFeed.cs" />
|
||||
<Compile Include="Pages\Events\EventIndexPage.xaml.cs">
|
||||
<DependentUpon>EventIndexPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Events\EventPage.xaml.cs">
|
||||
<DependentUpon>EventPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="pages\lecture\LecturePage.xaml.cs">
|
||||
<DependentUpon>LecturePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\BaseModel.cs" />
|
||||
<Compile Include="Model\BaseViewModel.cs" />
|
||||
<Compile Include="Feed\Mensa\MensaFeed.cs" />
|
||||
<Compile Include="Pages\Lecture\ModulWebPage.xaml.cs">
|
||||
<DependentUpon>ModulWebPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\Utility\ListPickerItemModel.cs" />
|
||||
<Compile Include="Pages\Lecture\ResultDetailPage.xaml.cs">
|
||||
<DependentUpon>ResultDetailPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Lecture\ResultPage.xaml.cs">
|
||||
<DependentUpon>ResultPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Mensa\MensaPage.xaml.cs">
|
||||
<DependentUpon>MensaPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Feed\News\NewsFeed.cs" />
|
||||
<Compile Include="Pages\News\NewsIndexPage.xaml.cs">
|
||||
<DependentUpon>NewsIndexPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\News\NewsPage.xaml.cs">
|
||||
<DependentUpon>NewsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\Events\RSSModel.cs" />
|
||||
<Compile Include="Pages\Openinghours\OpeninghoursPage.xaml.cs">
|
||||
<DependentUpon>OpeninghoursPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="pages\StartPage.xaml.cs">
|
||||
<DependentUpon>StartPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Webmail\WebmailPage.xaml.cs">
|
||||
<DependentUpon>WebmailPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\AppResources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Constants.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Constants.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Icons.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Icons.resx</DependentUpon>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
<Compile Include="ThemelizedIcons.cs" />
|
||||
<Compile Include="Utility\Api.cs" />
|
||||
<Compile Include="Utility\ApiEventHandler.cs" />
|
||||
<Compile Include="Utility\Feed.cs" />
|
||||
<Compile Include="Utility\FeedEventHandler.cs" />
|
||||
<Compile Include="Utility\FileList.cs" />
|
||||
<Compile Include="Utility\FileManager.cs" />
|
||||
<Compile Include="Utility\Logger.cs" />
|
||||
<Compile Include="Utility\HttpRequest.cs" />
|
||||
<Compile Include="Utility\StringManager.cs" />
|
||||
<Compile Include="Utility\URLList.cs" />
|
||||
<Compile Include="Utility\XmlApi.cs" />
|
||||
<Compile Include="Utility\XmlFeed.cs" />
|
||||
<Compile Include="Utility\XmlManager.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="Pages\Campusmap\CampusMapPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Departments\DepartmentPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\LecturePage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\ModulWebPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\ResultDetailPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\ResultPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Events\EventIndexPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Events\EventPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Pages\Mensa\MensaPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Pages\News\NewsIndexPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\News\NewsPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Openinghours\OpeninghoursPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="pages\StartPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Webmail\WebmailPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Assets\psd\holo_optionsbuttons.psd" />
|
||||
<None Include="Assets\psd\iconbutton_effects2.psd" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\AppManifest.xml" />
|
||||
<None Include="Properties\WMAppManifest.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\AlignmentGrid.png" />
|
||||
<Content Include="Assets\ApplicationIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Icons\DarkTheme\campus_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\phone_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\campus_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\departments_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\departments_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\homework_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\homework_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\link_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\link_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\lectures_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\lectures_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\mensa_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\mensa_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\news_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\news_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\openhours_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\openhours_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\schedule_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\phone_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\schedule_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\search_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\search_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\student_council_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\student_council_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\webmail_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\webmail_159.png" />
|
||||
<Content Include="Assets\testmap.png" />
|
||||
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileMediumLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="README_FIRST.txt" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Cancel.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Check.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Delete.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Select.png" />
|
||||
</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>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Constants.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Icons.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Icons.Designer.cs</LastGenOutput>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Phone.Controls.Toolkit">
|
||||
<HintPath>..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<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.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ProjectExtensions />
|
||||
</Project>
|
||||
37
CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using CampusAppWP8.Model.Departments;
|
||||
using CampusAppWP8.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CampusAppWP8.Api.Departments
|
||||
{
|
||||
class DepartmentFeed : XmlFeed<DepartmentViewModel>
|
||||
{
|
||||
public DepartmentFeed() : base(URLList.DepartmentFeedURL, "DepartmentFeed.xml")
|
||||
{
|
||||
|
||||
}
|
||||
public System.Collections.ObjectModel.ObservableCollection<FacultyModel> _faculties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using CampusAppWP8.Model.events_news;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
namespace CampusAppWP8.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Event Feed.
|
||||
/// </summary>
|
||||
public class EventFeed : XmlFeed<RSSViewModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public EventFeed() : base(URLList.EventsFeedURL, "EventFeed.xml")
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Mensa
|
||||
namespace CampusAppWP8.Api.Mensa
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -27,15 +27,6 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets i List of MenuModel
|
||||
/// </summary>
|
||||
public ObservableCollection<MenuModel> Menus { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
@@ -43,7 +34,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
#region Protected
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
@@ -53,7 +44,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
@@ -66,22 +57,6 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
|
||||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate this day of the week, which its gets new menus
|
||||
/// </summary>
|
||||
/// <returns>Date of NewMenuWeekDay</returns>
|
||||
private DateTime CalcNewMenuWeekDay()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
while (now.DayOfWeek != DayOfWeek.Monday)
|
||||
{
|
||||
now = now.Subtract(new TimeSpan(1, 0, 0, 0));
|
||||
}
|
||||
|
||||
DateTime monday = new DateTime(now.Year, now.Month, now.Day);
|
||||
return monday;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the last modification was later as the NewMenuWeekDay
|
||||
/// </summary>
|
||||
@@ -89,7 +64,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
int diff = lastModified.CompareTo(this.CalcNewMenuWeekDay());
|
||||
int diff = lastModified.CompareTo(MenuWeekModel.CalcFirstWeekDay());
|
||||
|
||||
if (diff < 0)
|
||||
{
|
||||
|
||||
42
CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using CampusAppWP8.Model.events_news;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
namespace CampusAppWP8.Api.News
|
||||
{
|
||||
/// <summary>
|
||||
/// News Feed.
|
||||
/// </summary>
|
||||
public class NewsFeed : XmlFeed<RSSViewModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public NewsFeed() : base(URLList.NewsFeedURL, "NewsFeed.xml")
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Openinghours
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using CampusAppWP8.Model.Openinghours;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for MesaFeeds
|
||||
/// </summary>
|
||||
public class OpeninghoursFeed : XmlFeed<OpeninghoursModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursFeed" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursFeed()
|
||||
: base(URLList.OpeninghoursFeedURL, FileList.OpeninghoursXmlFile)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Protected
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
{
|
||||
DateTime lastModified = this.Model.CreateTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
{
|
||||
DateTime lastModified = FileManager.GetFileInfo(FileName).LastWriteTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
177
CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs
Normal file
@@ -0,0 +1,177 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
/// <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()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageSource of the map
|
||||
/// </summary>
|
||||
public string ImageSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageWidth of the map
|
||||
/// </summary>
|
||||
public double ImageWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageHeight of the map
|
||||
/// </summary>
|
||||
public double ImageHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetX of the map
|
||||
/// </summary>
|
||||
public double MapImageOffsetX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetY of the map
|
||||
/// </summary>
|
||||
public double MapImageOffsetY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the GeoOffsetX of the map
|
||||
/// </summary>
|
||||
public double GeoOffsetX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the GeoOffsetY of the map
|
||||
/// </summary>
|
||||
public double GeoOffsetY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Scale (to pixel) of the map
|
||||
/// </summary>
|
||||
public double Scale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the reference point
|
||||
/// </summary>
|
||||
public Point RefPoint { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate the coordinates of ScrollToOffsets point
|
||||
/// </summary>
|
||||
/// <param name="point">input point</param>
|
||||
/// <returns>point (in pixel)</returns>
|
||||
public Point GetScrollPoint(Point point)
|
||||
{
|
||||
return this.GetScrollPoint(point.X, point.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate the coordinates of ScrollToOffsets point
|
||||
/// </summary>
|
||||
/// <remarks>the input-point will be shown in the center</remarks>
|
||||
/// <param name="x">x - coordinate</param>
|
||||
/// <param name="y">y - coordinate</param>
|
||||
/// <returns>point (in pixel)</returns>
|
||||
public Point GetScrollPoint(double x, double y)
|
||||
{
|
||||
x = this.RefPoint.X + this.MapImageOffsetX + x;
|
||||
y = this.RefPoint.Y + this.MapImageOffsetY - y;
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create in image, which can show at a certain position
|
||||
/// </summary>
|
||||
/// <param name="x">the x- coordinate</param>
|
||||
/// <param name="y">the y-coordinate</param>
|
||||
/// <returns>image of the pin</returns>
|
||||
public Image AddPin(double x, double y)
|
||||
{
|
||||
Point position = new Point(x, y);
|
||||
return this.AddPin(position);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create in image, which can show at a certain position depend of the <see cref="RefPoint" />
|
||||
/// </summary>
|
||||
/// <param name="x">the x-coordinate</param>
|
||||
/// <param name="y">the y-coordinate</param>
|
||||
/// <returns>image of the pin</returns>
|
||||
public Image AddPinFromRefPoint(double x, double y)
|
||||
{
|
||||
Point position = new Point(this.RefPoint.X + x, this.RefPoint.Y - y);
|
||||
return this.AddPin(position);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create in image, which can show at a certain position depend of the <see cref="RefPoint" />
|
||||
/// </summary>
|
||||
/// <param name="position">input point</param>
|
||||
/// <returns>image of the pin</returns>
|
||||
public Image AddPinFromRefPoint(Point position)
|
||||
{
|
||||
return this.AddPinFromRefPoint(position.X, position.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create in image, which can show at a certain position
|
||||
/// </summary>
|
||||
/// <param name="position">input point</param>
|
||||
/// <returns>image of the pin</returns>
|
||||
public Image AddPin(Point position)
|
||||
{
|
||||
MapPinModel pin = new MapPinModel() { Position = position };
|
||||
Image pinImg = new Image() { Source = new BitmapImage(new Uri(pin.ImageSource, UriKind.Relative)), Width = pin.ImageWidth };
|
||||
Canvas.SetTop(pinImg, pin.Position.Y);
|
||||
Canvas.SetLeft(pinImg, pin.Position.X);
|
||||
return pinImg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a coordinates to coordinates which address pixels
|
||||
/// </summary>
|
||||
/// <param name="x">the x-coordinate</param>
|
||||
/// <param name="y">the y-coordinate</param>
|
||||
/// <returns>Point in pixel-size</returns>
|
||||
public Point ConverToPixelPoint(double x, double y)
|
||||
{
|
||||
return new Point { X = this.Scale * x, Y = this.Scale * y };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a coordinates to coordinates which address pixels
|
||||
/// </summary>
|
||||
/// <param name="point">not scaled point</param>
|
||||
/// <returns>Point in pixel-size</returns>
|
||||
public Point ConverToPixelPoint(Point point)
|
||||
{
|
||||
return this.ConverToPixelPoint(point.X, point.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
106
CampusAppWP8/CampusAppWP8/Model/Campusmap/MapPinModel.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapPinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
|
||||
/// <summary>
|
||||
/// This Class manage the properties of a MapPin
|
||||
/// </summary>
|
||||
public class MapPinModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Variable of the actual position of the pin
|
||||
/// </summary>
|
||||
private Point position;
|
||||
|
||||
#endregion
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MapPinModel" /> class.
|
||||
/// </summary>
|
||||
public MapPinModel()
|
||||
{
|
||||
this.ImageSource = "/Assets/icons/search_159_light.png";
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -24;
|
||||
this.PinImageOffsetY = -24;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageSource of the pin
|
||||
/// </summary>
|
||||
public string ImageSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageWidth of the pin
|
||||
/// </summary>
|
||||
public double ImageWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageHeight of the pin
|
||||
/// </summary>
|
||||
public double ImageHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetX of the pin
|
||||
/// </summary>
|
||||
public double PinImageOffsetX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetY of the pin
|
||||
/// </summary>
|
||||
public double PinImageOffsetY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets position of the pin
|
||||
/// </summary>
|
||||
public Point Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.position;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
// null assert
|
||||
if (value == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.position == null)
|
||||
{
|
||||
this.position = value;
|
||||
return;
|
||||
}
|
||||
|
||||
// check the x-value
|
||||
if (value.X + this.PinImageOffsetX != this.position.X)
|
||||
{
|
||||
this.position.X = value.X + this.PinImageOffsetX;
|
||||
}
|
||||
|
||||
// check the y-value
|
||||
if (value.Y + this.PinImageOffsetY != this.position.Y)
|
||||
{
|
||||
this.position.Y = value.Y + this.PinImageOffsetY;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
90
CampusAppWP8/CampusAppWP8/Model/Departments/ChairModel.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.Departments
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to hold information about a professorship chair.
|
||||
/// </summary>
|
||||
public class ChairModel : BaseModel
|
||||
{
|
||||
private string name_de; // german name of the chair
|
||||
private string url; // link-url to the chair homepage
|
||||
private string name_en; // english name of the chair
|
||||
|
||||
/// <summary>
|
||||
/// Default Constructor. Set every class variable to default value.
|
||||
/// </summary>
|
||||
public ChairModel()
|
||||
{
|
||||
this.name_de = String.Empty;
|
||||
this.name_en = String.Empty;
|
||||
this.url = String.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor. Set the german and english name.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the professorship chair.</param>
|
||||
public ChairModel(string name)
|
||||
{
|
||||
this.name_de = name;
|
||||
this.name_en = name;
|
||||
this.url = String.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set or return the german name of the chair.
|
||||
/// </summary>
|
||||
[XmlAttribute("name_de")]
|
||||
public string Name_DE
|
||||
{
|
||||
get { return this.name_de; }
|
||||
set
|
||||
{
|
||||
if (value != this.name_de)
|
||||
{
|
||||
this.name_de = value;
|
||||
NotifyPropertyChanged("chair");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set or return the english name of the chair.
|
||||
/// </summary>
|
||||
[XmlAttribute("name_en")]
|
||||
public string Name_EN
|
||||
{
|
||||
get { return this.name_en; }
|
||||
set
|
||||
{
|
||||
if (value != this.name_en)
|
||||
{
|
||||
this.name_en = value;
|
||||
NotifyPropertyChanged("chair");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set or return the url of the chair homepage.
|
||||
/// </summary>
|
||||
[XmlAttribute("url")]
|
||||
public string Url
|
||||
{
|
||||
get { return this.url; }
|
||||
set
|
||||
{
|
||||
if (value != this.url)
|
||||
{
|
||||
this.url = value;
|
||||
NotifyPropertyChanged("chair");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,26 +3,32 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.departments
|
||||
namespace CampusAppWP8.Model.Departments
|
||||
{
|
||||
public class DepartmentModel : BaseModel
|
||||
{
|
||||
private ObservableCollection<ChairModel> _chairs = null;
|
||||
private string _name;
|
||||
|
||||
[XmlElement("chair")]
|
||||
public ObservableCollection<ChairModel> _chairs { get; set; }
|
||||
|
||||
private string _name = "d_mod";
|
||||
private Visibility visible;
|
||||
|
||||
public DepartmentModel()
|
||||
{
|
||||
this.visible = Visibility.Collapsed;
|
||||
this.Chairs = new ObservableCollection<ChairModel>();
|
||||
this.LoadData();
|
||||
//this.LoadData();
|
||||
}
|
||||
|
||||
public DepartmentModel(string name)
|
||||
{
|
||||
this.visible = Visibility.Collapsed;
|
||||
_name = name;
|
||||
this.Chairs = new ObservableCollection<ChairModel>();
|
||||
this.LoadData();
|
||||
//this.LoadData();
|
||||
}
|
||||
|
||||
public void LoadData()
|
||||
@@ -64,5 +70,17 @@ namespace CampusAppWP8.Model.departments
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility Visible
|
||||
{
|
||||
get { return this.visible; }
|
||||
set
|
||||
{
|
||||
if (value != this.visible)
|
||||
{
|
||||
this.visible = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,26 +4,20 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.departments
|
||||
namespace CampusAppWP8.Model.Departments
|
||||
{
|
||||
[XmlRoot("root")]
|
||||
public class DepartmentViewModel : BaseViewModel
|
||||
{
|
||||
private ObservableCollection<FacultyModel> _faculties = null;
|
||||
[XmlArray("professorships")]
|
||||
[XmlArrayItem("faculty")]
|
||||
public ObservableCollection<FacultyModel> _faculties { get; set; }
|
||||
|
||||
public DepartmentViewModel()
|
||||
public DepartmentViewModel()
|
||||
{
|
||||
this.Faculties = new ObservableCollection<FacultyModel>();
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
public void LoadData()
|
||||
{
|
||||
this.Faculties.Add(new FacultyModel("Fakultät 1"));
|
||||
this.Faculties.Add(new FacultyModel("Fakultät 2"));
|
||||
this.Faculties.Add(new FacultyModel("Fakultät 3"));
|
||||
this.Faculties.Add(new FacultyModel("Fakultät 4"));
|
||||
this.Faculties.Add(new FacultyModel("Favoriten"));
|
||||
}
|
||||
|
||||
public ObservableCollection<FacultyModel> Faculties
|
||||
62
CampusAppWP8/CampusAppWP8/Model/Departments/FacultyModel.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
namespace CampusAppWP8.Model.Departments
|
||||
{
|
||||
public class FacultyModel : BaseModel
|
||||
{
|
||||
[XmlElement("chair")]
|
||||
public ObservableCollection<ChairModel> chairs { get; set; }
|
||||
//public ObservableCollection<DepartmentModel> _faculties { get; set; }
|
||||
|
||||
private string name = "t_fak";
|
||||
|
||||
public FacultyModel()
|
||||
{
|
||||
//this.Faculties = new ObservableCollection<DepartmentModel>();
|
||||
this.chairs = new ObservableCollection<ChairModel>();
|
||||
}
|
||||
|
||||
public FacultyModel(string name)
|
||||
{
|
||||
this.name = name;
|
||||
//this.Faculties = new ObservableCollection<DepartmentModel>();
|
||||
this.chairs = new ObservableCollection<ChairModel>();
|
||||
}
|
||||
|
||||
public ObservableCollection<ChairModel> Chairs
|
||||
{
|
||||
get { return this.chairs; }
|
||||
set
|
||||
{
|
||||
if (value != this.chairs)
|
||||
{
|
||||
this.chairs = value;
|
||||
NotifyPropertyChanged("faculty");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[XmlAttribute("id")]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppResources.Faculty + " " + this.name;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != this.name)
|
||||
{
|
||||
this.name = value;
|
||||
NotifyPropertyChanged("faculty");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
CampusAppWP8/CampusAppWP8/Model/Events/RSSChannelModel.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using CampusAppWP8.Model;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.events_news
|
||||
{
|
||||
/// <summary>
|
||||
/// Channel Model, which contains the rss feed item list.
|
||||
/// </summary>
|
||||
public class RSSChannelModel : BaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// RssFeed information item list.
|
||||
/// </summary>
|
||||
[XmlElement("item")]
|
||||
public ObservableCollection<RSSModel> item { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public RSSChannelModel()
|
||||
{
|
||||
this.item = new ObservableCollection<RSSModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the rss feed item list.
|
||||
/// </summary>
|
||||
public ObservableCollection<RSSModel> Item
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.item;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != this.item)
|
||||
{
|
||||
this.item = value;
|
||||
NotifyPropertyChanged("item");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
204
CampusAppWP8/CampusAppWP8/Model/Events/RSSModel.cs
Normal file
@@ -0,0 +1,204 @@
|
||||
using CampusAppWP8.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.events_news
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the rss feed informations.
|
||||
/// </summary>
|
||||
public class RSSModel : BaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Title of the fees
|
||||
/// </summary>
|
||||
private string title;
|
||||
/// <summary>
|
||||
/// Description text of the feed.
|
||||
/// </summary>
|
||||
private string text;
|
||||
/// <summary>
|
||||
/// Timestamp (publication date) of the event or news.
|
||||
/// </summary>
|
||||
private DateTime timestamp;
|
||||
/// <summary>
|
||||
/// Url of the feed.
|
||||
/// </summary>
|
||||
private string link;
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the title of the feed.
|
||||
/// </summary>
|
||||
[XmlElement("title")]
|
||||
public string Title
|
||||
{
|
||||
get { return this.title; }
|
||||
set
|
||||
{
|
||||
if (this.title != value)
|
||||
{
|
||||
this.title = value;
|
||||
NotifyPropertyChanged("rss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the text of the feed.
|
||||
/// </summary>
|
||||
[XmlElement("description")]
|
||||
public string Text
|
||||
{
|
||||
get { return this.text; }
|
||||
set
|
||||
{
|
||||
if (this.text != HTMLUnicodeToString(value))
|
||||
{
|
||||
this.text = HTMLUnicodeToString(value);
|
||||
NotifyPropertyChanged("rss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the timestamp of the feed as string.
|
||||
/// </summary>
|
||||
[XmlElement("pubDate")]
|
||||
public string Timestamp
|
||||
{
|
||||
get { return this.timestamp.ToString("R"); }
|
||||
set
|
||||
{
|
||||
if (this.timestamp != DateTime.Parse(value))
|
||||
{
|
||||
this.timestamp = DateTime.Parse(value);
|
||||
NotifyPropertyChanged("rss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the timestamp of the feed as DateTime object.
|
||||
/// </summary>
|
||||
public DateTime DTTimestamp
|
||||
{
|
||||
get { return this.timestamp; }
|
||||
set { this.timestamp = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the date of the timestamp as string.
|
||||
/// example: Mon, 25.06.2013.
|
||||
/// </summary>
|
||||
public string Date
|
||||
{
|
||||
get { return String.Format("{0:ddd, dd.MM.yyyy}", this.timestamp); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the time of the timestamp as string.
|
||||
/// example: 12:56 Uhr.
|
||||
/// </summary>
|
||||
public string Time
|
||||
{
|
||||
get { return String.Format("{0:h:mm} Uhr", this.timestamp); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the link/url of the feed.
|
||||
/// </summary>
|
||||
[XmlElement("link")]
|
||||
public string Link
|
||||
{
|
||||
get { return this.link; }
|
||||
set
|
||||
{
|
||||
if (this.link != value)
|
||||
{
|
||||
this.link = value;
|
||||
NotifyPropertyChanged("rss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove or transform html-unicode specific tags into ascii.
|
||||
/// </summary>
|
||||
/// <param name="htmluni">html string</param>
|
||||
/// <returns>ascii string</returns>
|
||||
private string HTMLUnicodeToString(string htmluni)
|
||||
{
|
||||
StringBuilder retValue = new StringBuilder();
|
||||
|
||||
for(int i = 0; i < htmluni.Length; i++)
|
||||
{
|
||||
switch (htmluni[i])
|
||||
{
|
||||
// beginning tag of the unicode
|
||||
case '&':
|
||||
{
|
||||
int startOff = i + 2;
|
||||
// sear closing tag of the unicode
|
||||
int endOff = htmluni.IndexOf(';', startOff);
|
||||
// get and parse value inbetween
|
||||
string sub = htmluni.Substring(startOff, endOff - startOff);
|
||||
int cVal = int.Parse(sub);
|
||||
|
||||
switch (cVal)
|
||||
{
|
||||
// if the unicode value is 128 (€)
|
||||
case 128:
|
||||
retValue.Append('€');
|
||||
break;
|
||||
|
||||
default:
|
||||
retValue.Append((char)cVal);
|
||||
break;
|
||||
}
|
||||
|
||||
// set the current index to the end of the unicode tag
|
||||
i = endOff;
|
||||
}
|
||||
break;
|
||||
case '<':
|
||||
{
|
||||
// ignoring <..> html tags
|
||||
i = htmluni.IndexOf('>', i);
|
||||
}
|
||||
break;
|
||||
case '\t':
|
||||
// removing tabs
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
// adding other characters to the return string
|
||||
retValue.Append(htmluni[i]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retValue.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Comparing function for Datetime-Timestamps.
|
||||
/// (currently unused)
|
||||
/// </summary>
|
||||
/// <param name="item1">first item</param>
|
||||
/// <param name="item2">secound item</param>
|
||||
/// <returns></returns>
|
||||
public static int CompareTimeStamp(RSSModel item1, RSSModel item2)
|
||||
{
|
||||
if (item1.DTTimestamp > item2.DTTimestamp)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
47
CampusAppWP8/CampusAppWP8/Model/Events/RSSViewModel.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using CampusAppWP8.Model;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.events_news
|
||||
{
|
||||
/// <summary>
|
||||
/// ViewModel of the rss feed, containing the feed/channel object.
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class RSSViewModel : BaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// channel list for the rss feeds.
|
||||
/// </summary>
|
||||
[XmlArray("rss")]
|
||||
[XmlArrayItem("channel")]
|
||||
public ObservableCollection<RSSChannelModel> channel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public RSSViewModel()
|
||||
{
|
||||
this.channel = new ObservableCollection<RSSChannelModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the channel list.
|
||||
/// </summary>
|
||||
public ObservableCollection<RSSChannelModel> Channel
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.channel;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != this.channel)
|
||||
{
|
||||
this.channel = value;
|
||||
NotifyPropertyChanged("channel");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
221
CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs
Normal file
@@ -0,0 +1,221 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureActivity.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a Activity
|
||||
/// </summary>
|
||||
public class LectureActivity
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// List of lecturer
|
||||
/// </summary>
|
||||
private ObservableCollection<LectureLecturer> lecturer;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the names of the lecturers
|
||||
/// </summary>
|
||||
private string lecturerString;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the names of the courses
|
||||
/// </summary>
|
||||
private string courseString;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the topic of the lecture
|
||||
/// </summary>
|
||||
private string topic;
|
||||
|
||||
#endregion
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureActivity" /> class.
|
||||
/// </summary>
|
||||
public LectureActivity()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the activity
|
||||
/// </summary>
|
||||
[XmlElement("art")]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the activity
|
||||
/// </summary>
|
||||
[XmlAttribute("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets semester of the activity
|
||||
/// </summary>
|
||||
[XmlElement("semester")]
|
||||
public int Semester { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the contact hour
|
||||
/// </summary>
|
||||
[XmlElement("sws")]
|
||||
public string SWS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets LectureModule
|
||||
/// </summary>
|
||||
[XmlElement("modul")]
|
||||
public LectureModule Modul { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets LectureTitel
|
||||
/// </summary>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the lecturers
|
||||
/// </summary>
|
||||
[XmlElement("lehrperson")]
|
||||
public ObservableCollection<LectureLecturer> Lecturer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.lecturer;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.lecturer)
|
||||
{
|
||||
this.lecturer = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the formatted string of the lecturers
|
||||
/// </summary>
|
||||
public string LecturerString
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.lecturerString;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.lecturerString)
|
||||
{
|
||||
this.lecturerString = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets formatted string of the courses
|
||||
/// </summary>
|
||||
public string CourseString
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.courseString;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.courseString)
|
||||
{
|
||||
this.courseString = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the courses
|
||||
/// </summary>
|
||||
[XmlElement("studiengang")]
|
||||
public ObservableCollection<LectureCourse> Course { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the dates of the activity
|
||||
/// </summary>
|
||||
[XmlElement("termin")]
|
||||
public ObservableCollection<LectureDate> Dates { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Department
|
||||
/// </summary>
|
||||
[XmlElement("zugeordnete_einrichtung")]
|
||||
public string Department { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the topic of the Lecture
|
||||
/// </summary>
|
||||
[XmlElement("lehrinhalt")]
|
||||
public string Topic
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.topic;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.topic)
|
||||
{
|
||||
this.topic = StringManager.StripHTML(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method create a formatted string of the LecturerList
|
||||
/// </summary>
|
||||
public void CreateLectureString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
foreach (LectureLecturer tmpLecturer in this.Lecturer)
|
||||
{
|
||||
result += StringManager.AddNewLine(tmpLecturer.ToString());
|
||||
}
|
||||
|
||||
this.LecturerString = StringManager.RemvoveNewLine(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create a formatted string of the CourseList
|
||||
/// </summary>
|
||||
public void CreateCourseString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
foreach (LectureCourse course in this.Course)
|
||||
{
|
||||
result += StringManager.AddNewLine(course.Title);
|
||||
}
|
||||
|
||||
this.CourseString = StringManager.RemvoveNewLine(result);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
29
CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
// <copyright file="LectureCourse.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a course
|
||||
/// </summary>
|
||||
public class LectureCourse
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureCourse" /> class.
|
||||
/// </summary>
|
||||
public LectureCourse()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the course
|
||||
/// </summary>
|
||||
[XmlElement("bezeichnung")]
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
||||
67
CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureDate.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the date of an activity
|
||||
/// </summary>
|
||||
public class LectureDate
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureDate" /> class.
|
||||
/// </summary>
|
||||
public LectureDate()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets WeekDay
|
||||
/// </summary>
|
||||
[XmlElement("wochentag")]
|
||||
public string WeekDay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets From
|
||||
/// </summary>
|
||||
[XmlElement("von")]
|
||||
public string From { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets To
|
||||
/// </summary>
|
||||
[XmlElement("bis")]
|
||||
public string To { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Interval
|
||||
/// </summary>
|
||||
[XmlElement("rhythmus")]
|
||||
public string Interval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Room
|
||||
/// </summary>
|
||||
[XmlElement("raum")]
|
||||
public string Room { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets StartDate
|
||||
/// </summary>
|
||||
[XmlElement("anfangsdatum")]
|
||||
public string StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets EndDate
|
||||
/// </summary>
|
||||
[XmlElement("enddatum")]
|
||||
public string EndDate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
72
CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureLecturer.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a lecturer
|
||||
/// </summary>
|
||||
public class LectureLecturer
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureLecturer" /> class.
|
||||
/// </summary>
|
||||
public LectureLecturer()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the FirstName of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("vorname")]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the LastName of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("name")]
|
||||
public string LastName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Responsibility of a lecturer
|
||||
/// </summary>
|
||||
[XmlAttribute("zustaendigkeit")]
|
||||
public string Responsibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Method overrides the base ToString() and create an formatted string of the lecturer
|
||||
/// </summary>
|
||||
/// <returns>returns a string like: [Title] FirstName LastName [(Responsibility)]</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
|
||||
if (!this.Title.Equals(string.Empty))
|
||||
{
|
||||
result += this.Title + " ";
|
||||
}
|
||||
|
||||
result += this.FirstName + " ";
|
||||
result += this.LastName + " ";
|
||||
|
||||
if (!this.Responsibility.Equals(string.Empty))
|
||||
{
|
||||
result += "(" + this.Responsibility + ") ";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
57
CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureList.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a List of LectureActivity
|
||||
/// </summary>
|
||||
[XmlRoot("lsf_auszug")]
|
||||
public class LectureList
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureList" /> class.
|
||||
/// </summary>
|
||||
public LectureList()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets List of the activities
|
||||
/// </summary>
|
||||
[XmlArray("veranstaltungsliste")]
|
||||
[XmlArrayItem("veranstaltung")]
|
||||
public ObservableCollection<LectureActivity> Activities { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method return a certain activity
|
||||
/// </summary>
|
||||
/// <param name="id"> id of the activity</param>
|
||||
/// <returns> the activity (FirstOrDefault)</returns>
|
||||
public LectureActivity GetActivity(int id)
|
||||
{
|
||||
LectureActivity activity = this.Activities.Where(p => p.Id == id).FirstOrDefault();
|
||||
return activity;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
98
CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModule.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureModule.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the module of an lecture
|
||||
/// </summary>
|
||||
public class LectureModule
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Number of the module (like an id)
|
||||
/// </summary>
|
||||
private int number;
|
||||
|
||||
/// <summary>
|
||||
/// Url to the website of the module
|
||||
/// </summary>
|
||||
private Uri url;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureModule" /> class.
|
||||
/// </summary>
|
||||
public LectureModule()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the module
|
||||
/// </summary>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of the module and create the URL
|
||||
/// </summary>
|
||||
[XmlElement("nummer")]
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.number;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.number)
|
||||
{
|
||||
this.number = value;
|
||||
this.CreateUrl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URL of the module
|
||||
/// </summary>
|
||||
public Uri Url
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.url;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method create the url of the module
|
||||
/// </summary>
|
||||
private void CreateUrl()
|
||||
{
|
||||
this.url = new Uri(Constants.UrlLecture_ModulBaseAddr + this.number.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
242
CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs
Normal file
@@ -0,0 +1,242 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LecturePageModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>18.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the LecturePage
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class LecturePageModel
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// List for the courses of the BTU
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// need to be extend to full list
|
||||
/// </remarks>
|
||||
private List<ListPickerItemModel> courseList;
|
||||
|
||||
/// <summary>
|
||||
/// List of the degrees
|
||||
/// </summary>
|
||||
private List<ListPickerItemModel> degreeList;
|
||||
|
||||
/// <summary>
|
||||
/// List of the semester
|
||||
/// </summary>
|
||||
private List<ListPickerItemModel> semesterList;
|
||||
|
||||
/// <summary>
|
||||
/// List for the number of semester
|
||||
/// </summary>
|
||||
private List<ListPickerItemModel> numberList;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LecturePageModel" /> class.
|
||||
/// </summary>
|
||||
public LecturePageModel()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected course index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectCourseIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected degree index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectDegreeIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected semester-index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectSemesterIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected from-index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectFromIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected to-index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectToIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets List for the courses of the BTU
|
||||
/// </summary>
|
||||
public List<ListPickerItemModel> CourseList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.courseList;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets List of the degrees
|
||||
/// </summary>
|
||||
public List<ListPickerItemModel> DegreeList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.degreeList;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets List of the semester
|
||||
/// </summary>
|
||||
public List<ListPickerItemModel> SemesterList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.semesterList;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets List for the number of semester
|
||||
/// </summary>
|
||||
public List<ListPickerItemModel> NumberList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.numberList;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Load all ListPickerLists
|
||||
/// </summary>
|
||||
public void LoadLists()
|
||||
{
|
||||
this.LoadCourseList();
|
||||
this.LoadDegreeList();
|
||||
this.LoadNumberList();
|
||||
this.LoadSemesterList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Load the NumberList
|
||||
/// </summary>
|
||||
private void LoadNumberList()
|
||||
{
|
||||
this.numberList = new List<ListPickerItemModel>();
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "1", Value = "1" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "2", Value = "2" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "3", Value = "3" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "4", Value = "4" });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the SemesterList
|
||||
/// </summary>
|
||||
private void LoadSemesterList()
|
||||
{
|
||||
this.semesterList = new List<ListPickerItemModel>();
|
||||
this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 13", Value = "20131" });
|
||||
this.semesterList.Add(new ListPickerItemModel() { Text = "WiSe 13/14", Value = "20132" });
|
||||
this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 14", Value = "20131" });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the DegreeList
|
||||
/// </summary>
|
||||
private void LoadDegreeList()
|
||||
{
|
||||
this.degreeList = new List<ListPickerItemModel>();
|
||||
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Bachelor, Value = "82" });
|
||||
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Master, Value = "88" });
|
||||
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Diploma, Value = "11" });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the DegreeList
|
||||
/// </summary>
|
||||
private void LoadCourseList()
|
||||
{
|
||||
this.courseList = new List<ListPickerItemModel>();
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Architektur", Value = "013" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Bauingenieurwesen", Value = "017" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Betriebswirtschaftslehre", Value = "021" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsrecht für Technologieunternehmen", Value = "042" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Elektrotechnik", Value = "048" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Informatik ", Value = "079" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Maschinenbau", Value = "104" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Mathematik", Value = "105" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Physik ", Value = "128" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsingenieurwesen", Value = "179" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftswissenschaften ", Value = "184" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Biomedizinische Gerätetechnik ", Value = "215" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik", Value = "226" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsmathematik ", Value = "276" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Kultur und Technik ", Value = "711" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Physik der Halbleiter-Technologie", Value = "744" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Angewandte Mathematik ", Value = "749" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Technologie- und Innovationsmanagement", Value = "764" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Stadt- und Regionalplanung", Value = "766" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Informations- und Medientechnik ", Value = "767" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "World Heritage Studies", Value = "768" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen und Verfahrenstechnik", Value = "770" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Environmental and Resource Management", Value = "771" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Landnutzung und Wasserbewirtschaftung", Value = "772" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Bauen und Erhalten", Value = "773" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen", Value = "774" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "eBusiness", Value = "794" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Civil Engineering", Value = "798" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Structural Engineering", Value = "799" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Electrical Power Engineering ", Value = "800" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Euro Hydroinformatics and Water Management", Value = "841" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Technologien Biogener Rohstoffe", Value = "842" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Environmental Technologies", Value = "843" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Process Engineering and Plant Design", Value = "844" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Architekturvermittlung", Value = "845" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Nachwachsende Rohstoffe und Erneuerbare Energien", Value = "851" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Energieträger aus Biomasse und Abfällen", Value = "852" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Power Engineering", Value = "853" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik - Prozess- und Anlagentechnik", Value = "857" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Architektur.Studium.Generale", Value = "858" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Verarbeitungstechnologien der Werkstoffe", Value = "860" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Forensic Sciences and Engineering", Value = "871" });
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,581 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursInstitutionModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Openinghours
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
public class OpeninghoursInstitutionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// German version of the institution title.
|
||||
/// </summary>
|
||||
private string titleDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the institution title.
|
||||
/// </summary>
|
||||
private string titleEN = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on monday.
|
||||
/// </summary>
|
||||
private string dayMonday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on tuesday.
|
||||
/// </summary>
|
||||
private string dayTuesday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on wednesday.
|
||||
/// </summary>
|
||||
private string dayWednesday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on thursday.
|
||||
/// </summary>
|
||||
private string dayThursday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on friday.
|
||||
/// </summary>
|
||||
private string dayFriday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on saturday.
|
||||
/// </summary>
|
||||
private string daySaturday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on sunday.
|
||||
/// </summary>
|
||||
private string daySunday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Email address of the institution.
|
||||
/// </summary>
|
||||
private string infoEmail = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Phone number of the institution.
|
||||
/// </summary>
|
||||
private string infoPhone = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Building name where the institution is located.
|
||||
/// </summary>
|
||||
private string infoBuilding = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Room where the institution is located.
|
||||
/// </summary>
|
||||
private string infoRoom = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// German version of the comment.
|
||||
/// </summary>
|
||||
private string commentDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the comment.
|
||||
/// </summary>
|
||||
private string commentEN = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursInstitutionModel" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursInstitutionModel()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german title of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("title_de")]
|
||||
public string Title_DE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.titleDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.titleDE = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english title of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("title_en")]
|
||||
public string Title_EN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.titleEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.titleEN = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on monday.
|
||||
/// </summary>
|
||||
[XmlAttribute("monday")]
|
||||
public string Monday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayMonday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayMonday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on tuesday.
|
||||
/// </summary>
|
||||
[XmlAttribute("tuesday")]
|
||||
public string Tuesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayTuesday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayTuesday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on wednesday.
|
||||
/// </summary>
|
||||
[XmlAttribute("wednesday")]
|
||||
public string Wednesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayWednesday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayWednesday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on thursday.
|
||||
/// </summary>
|
||||
[XmlAttribute("thursday")]
|
||||
public string Thursday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayThursday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayThursday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on friday.
|
||||
/// </summary>
|
||||
[XmlAttribute("friday")]
|
||||
public string Friday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayFriday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayFriday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on saturday.
|
||||
/// </summary>
|
||||
[XmlAttribute("saturday")]
|
||||
public string Saturday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.daySaturday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.daySaturday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on sunday.
|
||||
/// </summary>
|
||||
[XmlAttribute("sunday")]
|
||||
public string Sunday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.daySunday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.daySunday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email address of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("email")]
|
||||
public string EMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoEmail;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoEmail = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the phone number of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("phone")]
|
||||
public string Phone
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoPhone;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoPhone = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the building where the institution is located.
|
||||
/// </summary>
|
||||
[XmlAttribute("location_building")]
|
||||
public string Building
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoBuilding;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoBuilding = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the room where the institution is located.
|
||||
/// </summary>
|
||||
[XmlAttribute("location_room")]
|
||||
public string Room
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoRoom;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoRoom = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german comment.
|
||||
/// </summary>
|
||||
[XmlAttribute("comment_de")]
|
||||
public string Comment_DE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.commentDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.commentDE = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english comment.
|
||||
/// </summary>
|
||||
[XmlAttribute("comment_en")]
|
||||
public string Comment_EN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.commentEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.commentEN = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized title. If the phone is set to german language,
|
||||
/// the german title will be returned otherwise the english title.
|
||||
/// </summary>
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.titleDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.titleEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized comment. if the phone is set to german language,
|
||||
/// the german comment will be returned otherwise the english comment.
|
||||
/// </summary>
|
||||
public string Comment
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.commentDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.commentEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string containing the email address and the institution
|
||||
/// title separated by ':'.
|
||||
/// </summary>
|
||||
public string EMailTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.EMail + ":" + this.Title;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string containing the phone number and the institution
|
||||
/// title separated by ':'.
|
||||
/// </summary>
|
||||
public string PhoneTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Phone + ":" + this.Title;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the monday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleMonday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayMonday == string.Empty) || (this.dayMonday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the tuesday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleTuesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayTuesday == string.Empty) || (this.dayTuesday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the wednesday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleWednesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayWednesday == string.Empty) || (this.dayWednesday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the thursday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleThursday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayThursday == string.Empty) || (this.dayThursday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the friday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleFriday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayFriday == string.Empty) || (this.dayFriday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the saturday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleSaturday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.daySaturday == string.Empty) || (this.daySaturday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the sunday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleSunday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.daySunday == string.Empty) || (this.daySunday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the comment.
|
||||
/// </summary>
|
||||
public Visibility VisibleComment
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.Comment == string.Empty) || (this.Comment.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the email address.
|
||||
/// </summary>
|
||||
public Visibility VisibleEMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoEmail == string.Empty) || (this.infoEmail.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the phone number.
|
||||
/// </summary>
|
||||
public Visibility VisiblePhone
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoPhone == string.Empty) || (this.infoPhone.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the room.
|
||||
/// </summary>
|
||||
public Visibility VisibleRoom
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoRoom == string.Empty) || (this.infoRoom.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the building.
|
||||
/// </summary>
|
||||
public Visibility VisibleBuilding
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoBuilding == string.Empty) || (this.infoBuilding.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Removes unwanted chars in a string.
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>fixed string</returns>
|
||||
private string FixOpeninghoursString(string str)
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
retValue = str.Replace(" | ", "\n");
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Openinghours
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for opening hours.
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class OpeninghoursModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Time when the model was created.
|
||||
/// </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets feed information item list.
|
||||
/// </summary>
|
||||
[XmlArray("data")]
|
||||
[XmlArrayItem("institution")]
|
||||
public ObservableCollection<OpeninghoursInstitutionModel> institutions { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursModel" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursModel()
|
||||
{
|
||||
this.createTime = DateTime.Now;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model.
|
||||
/// </summary>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.createTime;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Institutions.
|
||||
/// </summary>
|
||||
public ObservableCollection<OpeninghoursInstitutionModel> Institutions
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.institutions;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ListPickerItemModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for the ListPickerItems
|
||||
/// </summary>
|
||||
public class ListPickerItemModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Value of an Item
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Text (caption) of an Item
|
||||
/// </summary>
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
||||
96
CampusAppWP8/CampusAppWP8/Model/Utility/URLParamModel.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="URLParamModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>17.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// This class is a Model for the URLParameter like GET-Parameter
|
||||
/// </summary>
|
||||
public class UrlParamModel
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Variable of the key
|
||||
/// </summary>
|
||||
private readonly string key;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UrlParamModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="key">the key for the parameter</param>
|
||||
public UrlParamModel(string key)
|
||||
{
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UrlParamModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="key">the key for the parameter</param>>
|
||||
/// <param name="value">value of the parameter</param>
|
||||
public UrlParamModel(string key, string value)
|
||||
{
|
||||
this.key = key;
|
||||
this.Value = value;
|
||||
}
|
||||
#endregion
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the Parameter
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the key of the parameter
|
||||
/// </summary>
|
||||
public string Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.key;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the parameter is valid
|
||||
/// </summary>
|
||||
/// <returns>true if is it valid, otherwise false</returns>
|
||||
public virtual bool IsParamValid()
|
||||
{
|
||||
if (this.key == null || string.Empty.Equals(this.key) || string.Empty.Equals(this.Value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method return a formatted string like Key=Value
|
||||
/// </summary>
|
||||
/// <returns> return formatted string</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
if (!this.IsParamValid())
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return "&" + this.key + "=" + this.Value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:Location="clr-namespace:System.Device.Location;assembly=System.Device"
|
||||
x:Class="CampusAppWP8.Pages.campusmap.CampusMapPage"
|
||||
x:Class="CampusAppWP8.Pages.Campusmap.CampusMapPage"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -35,17 +35,25 @@
|
||||
<Grid Grid.Row="0">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Grid.Column="0" />
|
||||
<Image Grid.Column="1" Source="/Toolkit.Content/ApplicationBar.Check.png" />
|
||||
<TextBox Name="XPoint" Grid.Column="0" Text="0" />
|
||||
<TextBox Name="YPoint" Grid.Column="1" Text="0"/>
|
||||
<Button Grid.Column="2" Click="Button_Click">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="60"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Controls:Map Grid.Row="1" ZoomLevel="16">
|
||||
<Controls:Map.Center>
|
||||
<Location:GeoCoordinate Altitude="NaN" Course="NaN" HorizontalAccuracy="NaN" Longitude="14.3242" Latitude="51.7662" Speed="NaN" VerticalAccuracy="NaN"/>
|
||||
</Controls:Map.Center>
|
||||
</Controls:Map>
|
||||
<ScrollViewer Name="MapScroller" Grid.Row="1" HorizontalScrollBarVisibility="Auto" RenderTransformOrigin="0,0">
|
||||
<Canvas Name="MapCanvas" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" Height="{Binding ImageHeight}" Width="{Binding ImageWidth}">
|
||||
<Canvas.Background>
|
||||
<ImageBrush Stretch="Fill" ImageSource="{Binding ImageSource}">
|
||||
|
||||
</ImageBrush>
|
||||
</Canvas.Background>
|
||||
</Canvas>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using System.Windows.Media;
|
||||
using CampusAppWP8.Model.Campusmap;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
public partial class CampusMapPage : PhoneApplicationPage
|
||||
{
|
||||
private MapModel map;
|
||||
public CampusMapPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.map = new MapModel() { ImageSource = "/Assets/testmap.png", ImageWidth = 2000, ImageHeight = 2000, MapImageOffsetX = -228, MapImageOffsetY = -300, RefPoint = new Point(1000, 1000), Scale = 20};
|
||||
this.MapCanvas.DataContext = map;
|
||||
|
||||
}
|
||||
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedTo-Method
|
||||
/// </summary>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MapCanvas.Children.Clear();
|
||||
Point scrollPoint = map.GetScrollPoint(map.ConverToPixelPoint(double.Parse(XPoint.Text), double.Parse(YPoint.Text)));
|
||||
MapCanvas.Children.Add(map.AddPinFromRefPoint(map.ConverToPixelPoint(double.Parse(XPoint.Text), double.Parse(YPoint.Text))));
|
||||
|
||||
MapScroller.ScrollToVerticalOffset(scrollPoint.Y);
|
||||
MapScroller.ScrollToHorizontalOffset(scrollPoint.X);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.departments.DepartmentPage"
|
||||
x:Class="CampusAppWP8.Pages.Departments.DepartmentPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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.departments"
|
||||
xmlns:viewModel="clr-namespace:CampusAppWP8.Model.Departments"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -16,40 +16,44 @@
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<phone:PhoneApplicationPage.Resources>
|
||||
<viewModel:DepartmentViewModel x:Key="DepartmentViewModel" />
|
||||
<viewModel:DepartmentViewModel x:Key="DepartmentViewModel" x:Name="DepartmentView" />
|
||||
</phone:PhoneApplicationPage.Resources>
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<!-- LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.DataContext>
|
||||
<viewModel:DepartmentViewModel/>
|
||||
<viewModel:DepartmentViewModel />
|
||||
</Grid.DataContext>
|
||||
<!--Pivotsteuerelement-->
|
||||
<phone:Pivot Title="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" ItemsSource="{Binding Faculties}">
|
||||
<!-- Pivot -->
|
||||
<phone:Pivot x:Name="DepartmentPivot" Title="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" ItemsSource="{Binding Faculties}">
|
||||
<!-- Pivotitem template -->
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
<TextBlock Text="{Binding Path=Name, Mode=OneWay}" />
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ScrollViewer>
|
||||
<!-- TEMPORARILY REMOVED, will be abck in soon
|
||||
<phone:LongListSelector ItemsSource="{Binding Faculties}">
|
||||
<phone:LongListSelector.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource PhoneTextTitle2Style}" />
|
||||
<phone:LongListSelector ItemsSource="{Binding Chairs}">
|
||||
<phone:LongListSelector.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</phone:LongListSelector.ItemTemplate>
|
||||
</phone:LongListSelector>
|
||||
<Button x:Name="DepartmentBtn" Content="{Binding Name}" Background="Gray" BorderBrush="Gray" Foreground="Black" Click="DepartmentBtn_Click"/>
|
||||
<phone:LongListSelector Tag="{Binding Name}" Visibility="{Binding Visible}" ItemsSource="{Binding Chairs}">
|
||||
-->
|
||||
<ListBox ItemsSource="{Binding Chairs}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock x:Name="ChairTB" Tag="{Binding Url}" Text="{Binding Name_DE}" MouseLeftButtonDown="ChairTB_Click" Margin="12,6,12,6" Padding="0,0,0,0" HorizontalAlignment="Stretch" TextWrapping="Wrap" FontSize="24"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<!--
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</phone:LongListSelector.ItemTemplate>
|
||||
</phone:LongListSelector>
|
||||
</ScrollViewer>
|
||||
-->
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
</phone:Pivot>
|
||||
@@ -0,0 +1,130 @@
|
||||
using CampusAppWP8.Api.Departments;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Tasks;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
|
||||
namespace CampusAppWP8.Pages.Departments
|
||||
{
|
||||
/// <summary>
|
||||
/// Pivot page with list of the chairs of the facultis.
|
||||
/// </summary>
|
||||
public partial class DepartmentPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Stores the last visible department panel.
|
||||
/// </summary>
|
||||
private UIElement lastVisibleUIElem = null;
|
||||
/// <summary>
|
||||
/// department/chair feed object, storing the model and data.
|
||||
/// </summary>
|
||||
private DepartmentFeed feed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public DepartmentPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
// init feed object
|
||||
this.feed = new DepartmentFeed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On naviagtion to this page.
|
||||
/// Init the feed loading.
|
||||
/// </summary>
|
||||
/// <param name="e">event args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupDepartmentPivot);
|
||||
this.feed.LoadFeed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called after the feeds are loaded.
|
||||
/// Set the pivotitem source of this page.
|
||||
/// </summary>
|
||||
private void SetupDepartmentPivot()
|
||||
{
|
||||
DepartmentPivot.ItemsSource = feed.Model._faculties;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On orientation changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">unused</param>
|
||||
/// <param name="e">unused</param>
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called at clicking on the department headline buttons.
|
||||
/// Collapses all visible department panels and open (set to visible)
|
||||
/// the clicked department list.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked department button</param>
|
||||
/// <param name="e">unused</param>
|
||||
private void DepartmentBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// if the sender was a button
|
||||
if(sender is Button)
|
||||
{
|
||||
Button btn = sender as Button;
|
||||
|
||||
// if the parent is a stackpanel
|
||||
if(btn.Parent is StackPanel)
|
||||
{
|
||||
StackPanel pan = (StackPanel)btn.Parent;
|
||||
|
||||
// if there is a child after the clicked button in the parent panel
|
||||
if ((pan.Children.Count() > 1) && (pan.Children[1] != null))
|
||||
{
|
||||
// if the clicked department wasn't the one clicked before
|
||||
if (pan.Children[1] != this.lastVisibleUIElem)
|
||||
{
|
||||
// collapse the last visible chair list
|
||||
if (this.lastVisibleUIElem != null)
|
||||
this.lastVisibleUIElem.Visibility = Visibility.Collapsed;
|
||||
|
||||
// open the choosen chair list
|
||||
pan.Children[1].Visibility = Visibility.Visible;
|
||||
this.lastVisibleUIElem = pan.Children[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking a chair textbolock.
|
||||
/// Open the browser with the url of the chair.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked chair textblock</param>
|
||||
/// <param name="e"></param>
|
||||
private void ChairTB_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is FrameworkElement)
|
||||
{
|
||||
FrameworkElement btn = sender as FrameworkElement;
|
||||
|
||||
// if the chair has a url in the tag element
|
||||
if ((btn.Tag != null) && ((btn.Tag as string).Length > 0))
|
||||
{
|
||||
// open browser with the url
|
||||
WebBrowserTask task = new WebBrowserTask();
|
||||
task.Uri = new Uri(btn.Tag.ToString(), UriKind.Absolute);
|
||||
task.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
32
CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml
Normal file
@@ -0,0 +1,32 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Events.EventIndexPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Title and headline -->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
|
||||
</StackPanel>
|
||||
<!-- Content -->
|
||||
<ListBox x:Name="ButtonPanel" Grid.Row="1">
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
117
CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="EventIndexPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Events
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Api.Events;
|
||||
using CampusAppWP8.Model.events_news;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Overview page of all events.
|
||||
/// </summary>
|
||||
public partial class EventIndexPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets Event Feed object, which contains the RSS models and data.
|
||||
/// </summary>
|
||||
public static EventFeed eventFeed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EventIndexPage" /> class.
|
||||
/// </summary>
|
||||
public EventIndexPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
EventIndexPage.eventFeed = new EventFeed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On navigation to this page, creates a FeedEventHandler and load the RSS feed data.
|
||||
/// </summary>
|
||||
/// <param name="e">event args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if ((EventIndexPage.eventFeed.Model == null)
|
||||
|| (EventIndexPage.eventFeed.Model.Channel == null)
|
||||
|| (EventIndexPage.eventFeed.Model.Channel.Count() == 0)
|
||||
|| (EventIndexPage.eventFeed.Model.Channel[0].item == null)
|
||||
|| (EventIndexPage.eventFeed.Model.Channel[0].item.Count() == 0))
|
||||
{
|
||||
// Set handler and load the fees informations.
|
||||
EventIndexPage.eventFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.SetupEventPageList);
|
||||
EventIndexPage.eventFeed.LoadFeed();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called after the RSS feeds are loaded into the eventFeed model.
|
||||
/// If there was no feed information set to the UI, the feed list
|
||||
/// will be sorted by timestamp and the buttons will be created.
|
||||
/// </summary>
|
||||
private void SetupEventPageList()
|
||||
{
|
||||
if ((EventIndexPage.eventFeed.Model != null)
|
||||
&& (EventIndexPage.eventFeed.Model.Channel != null)
|
||||
&& (EventIndexPage.eventFeed.Model.Channel.Count() >= 1)
|
||||
&& (this.ButtonPanel.Items.Count() == 0))
|
||||
{
|
||||
// Sort the list of rssfeeds.
|
||||
IEnumerable<RSSModel> tempList = EventIndexPage.eventFeed.Model.Channel[0].item.OrderByDescending(e => e.DTTimestamp);
|
||||
EventIndexPage.eventFeed.Model.Channel[0].item = new ObservableCollection<RSSModel>(tempList);
|
||||
|
||||
// Create the buttons for the fees selection and add it to the buttonpanel.
|
||||
for (int i = 0; i < EventIndexPage.eventFeed.Model.Channel[0].item.Count(); i++)
|
||||
{
|
||||
Button tempBtn = new Button();
|
||||
tempBtn.Name = "EventRowAppButton";
|
||||
tempBtn.Content = EventIndexPage.eventFeed.Model.Channel[0].item[i].Title;
|
||||
tempBtn.VerticalContentAlignment = VerticalAlignment.Stretch;
|
||||
tempBtn.HorizontalContentAlignment = HorizontalAlignment.Stretch;
|
||||
tempBtn.BorderThickness = new Thickness(0.0);
|
||||
tempBtn.Padding = new Thickness(0.0);
|
||||
tempBtn.Click += this.EventRowAppButton_Click;
|
||||
tempBtn.Tag = i;
|
||||
|
||||
this.ButtonPanel.Items.Add(tempBtn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the eventFeed object.
|
||||
/// </summary>
|
||||
public static EventFeed GetEventFeed
|
||||
{
|
||||
get { return EventIndexPage.eventFeed; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called on clicking on a feed button.
|
||||
/// Navigates to the event pivot page with the information of the
|
||||
/// selected feed index.
|
||||
/// </summary>
|
||||
/// <param name="sender">pressed button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void EventRowAppButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempElem = sender as FrameworkElement;
|
||||
|
||||
NavigationService.Navigate(new Uri("/pages/events/EventPage.xaml?pivotindex=" + tempElem.Tag, UriKind.Relative));
|
||||
}
|
||||
}
|
||||
}
|
||||
60
CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml
Normal file
@@ -0,0 +1,60 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Events.EventPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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.events_news"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" 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">
|
||||
<!-- Pivotpage -->
|
||||
<phone:Pivot x:Name="EventPivot" Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}">
|
||||
<!-- Pivotitem template -->
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Date, Mode=OneWay}" />
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="100"/>-->
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="90"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid x:Name="EventTextGrid" Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock x:Name="EventHeadline" Text="{Binding Path=Title, Mode=OneWay}" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="42"/>
|
||||
<ScrollViewer x:Name="EventTextScroll" Grid.Row="1">
|
||||
<TextBlock x:Name="EventText" Text="{Binding Path=Text, Mode=OneWay}" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="24" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<phone:WebBrowser x:Name="WebBrowser" Grid.Row="0" IsScriptEnabled="True" Visibility="Collapsed"/>
|
||||
|
||||
<Button Name="EventHome" Content="{Binding Path=LocalizedResources.NewsHomeBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Left" Click="EventHome_Click"/>
|
||||
<Button Name="EventLink" Tag="{Binding Path=Link, Mode=OneWay}" Content="{Binding Path=LocalizedResources.NewsLinkBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="EventLink_Click"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
</phone:Pivot>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
135
CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="EventPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Pages.Events
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// EventPage, where every event fees has his own PivotItem.
|
||||
/// </summary>
|
||||
public partial class EventPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// for checking if the feed source is already set or not.
|
||||
/// </summary>
|
||||
private bool isSourceSet = false;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EventPage" /> class.
|
||||
/// </summary>
|
||||
public EventPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On navigation to this page.
|
||||
/// The PivotItem source will be set, if it wasn't before.
|
||||
/// Navigating to the submitted index of the chosen PivotItem page.
|
||||
/// </summary>
|
||||
/// <param name="e">Event Args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
// Set pivotitem Source
|
||||
if (this.isSourceSet == false)
|
||||
{
|
||||
if ((EventIndexPage.GetEventFeed.Model != null)
|
||||
&& (EventIndexPage.GetEventFeed.Model.Channel != null)
|
||||
&& (EventIndexPage.GetEventFeed.Model.Channel.Count() >= 1))
|
||||
{
|
||||
this.EventPivot.ItemsSource = EventIndexPage.GetEventFeed.Model.Channel[0].item;
|
||||
this.isSourceSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
string pivotIndex = string.Empty;
|
||||
|
||||
// Navigate to the selected pivotitem
|
||||
if (NavigationContext.QueryString.TryGetValue("pivotindex", out pivotIndex))
|
||||
{
|
||||
int pivotIndexInt = int.Parse(pivotIndex);
|
||||
|
||||
// if the index is in the range of the array
|
||||
if ((pivotIndexInt >= 0) && (pivotIndexInt < EventIndexPage.GetEventFeed.Model.Channel[0].item.Count()))
|
||||
{
|
||||
EventPivot.SelectedIndex = pivotIndexInt;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("ERROR: pivotIndex out of range!!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the home button (lower left).
|
||||
/// Navigate back to the event index page.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void EventHome_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Navigate back to the event index page
|
||||
NavigationService.GoBack();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the link button if a link exists in the feed
|
||||
/// (lower right).
|
||||
/// Open the WebBrowser with the url set in the feed.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void EventLink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement fe = sender as FrameworkElement;
|
||||
|
||||
// Open the webbrowser
|
||||
Grid grfe = fe.Parent as Grid;
|
||||
FrameworkElement eventTextGrid = null;
|
||||
FrameworkElement eventWeb = null;
|
||||
|
||||
foreach (FrameworkElement tempElem in grfe.Children)
|
||||
{
|
||||
if (tempElem.Name == "EventTextGrid")
|
||||
{
|
||||
eventTextGrid = tempElem;
|
||||
}
|
||||
else if (tempElem.Name == "WebBrowser")
|
||||
{
|
||||
eventWeb = tempElem;
|
||||
}
|
||||
}
|
||||
|
||||
if ((eventTextGrid != null)
|
||||
&& (eventWeb != null))
|
||||
{
|
||||
if (eventTextGrid.Visibility == Visibility.Visible)
|
||||
{
|
||||
eventTextGrid.Visibility = Visibility.Collapsed;
|
||||
eventWeb.Visibility = Visibility.Visible;
|
||||
(eventWeb as WebBrowser).Navigate(new Uri(fe.Tag.ToString(), UriKind.Absolute));
|
||||
}
|
||||
else
|
||||
{
|
||||
eventWeb.Visibility = Visibility.Collapsed;
|
||||
eventTextGrid.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
169
CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml
Normal file
@@ -0,0 +1,169 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Lecture.LecturePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,0,0,2" >
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<ScrollViewer Grid.Row="1" Margin="12,0,12,0">
|
||||
<Grid x:Name="ContentPanel">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" >
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureName, Source={StaticResource LocalizedStrings}}"/>
|
||||
<TextBox Name="ActivtyName"/>
|
||||
</StackPanel>
|
||||
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="1">
|
||||
<StackPanel >
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Course, Source={StaticResource LocalizedStrings}}"/>
|
||||
<!-- Listpicket of courses -->
|
||||
<toolkit:ListPicker Name="Course" ExpansionMode="FullScreenOnly" FullModeHeader="{Binding Path=LocalizedResources.LectureApp_ListPickerHeaderCourse, Source={StaticResource LocalizedStrings}}" >
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="2">
|
||||
<StackPanel >
|
||||
<!-- Listpicket of degree-->
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Degree, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker Name="Degree">
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="3">
|
||||
<StackPanel >
|
||||
<!-- Listpicket of semesters(from to) -->
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Term, Source={StaticResource LocalizedStrings}}"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<toolkit:ListPicker Width="60" Name="From" >
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
<TextBlock Text="bis" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<toolkit:ListPicker Width="60" Name="To">
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="4">
|
||||
<StackPanel>
|
||||
<!-- Listpicket of semster -->
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Semester, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker Name="Semester">
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="5">
|
||||
<Button Name="SearchButton" Click="SendRequest">
|
||||
<Image Name="SearchButtonImg" Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="100" />
|
||||
</Button>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
205
CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs
Normal file
@@ -0,0 +1,205 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LecturePage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Api.Lecture;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the LecturePage
|
||||
/// </summary>
|
||||
public partial class LecturePage : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// actual LectureAPI
|
||||
/// </summary>
|
||||
private LectureApi api;
|
||||
|
||||
/// <summary>
|
||||
/// List for the courses of the BTU
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// need to be extend to full list
|
||||
/// </remarks>
|
||||
private LecturePageModel pageModel;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LecturePage" /> class.
|
||||
/// </summary>
|
||||
public LecturePage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.LoadPageModel();
|
||||
this.SetupListPickers();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
#region protected
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedFrom-Method
|
||||
/// </summary>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
// delete all models
|
||||
App.SaveToIsolatedStorage<LecturePageModel>(Constants.IsolatedStorage_LecturePageModel, null);
|
||||
App.SaveToIsolatedStorage<LectureList>(Constants.IsolatedStorage_LectureModel, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.StoreSelectedIndex();
|
||||
App.SaveToIsolatedStorage<LecturePageModel>(Constants.IsolatedStorage_LecturePageModel, this.pageModel);
|
||||
}
|
||||
|
||||
base.OnNavigatedFrom(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Load the PageModel
|
||||
/// </summary>
|
||||
private void LoadPageModel()
|
||||
{
|
||||
this.pageModel = new LecturePageModel();
|
||||
this.pageModel.LoadLists();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method sets the ItemSource of the ListPickers
|
||||
/// </summary>
|
||||
private void SetupListPickers()
|
||||
{
|
||||
this.Course.ItemsSource = this.pageModel.CourseList;
|
||||
this.Degree.ItemsSource = this.pageModel.DegreeList;
|
||||
this.From.ItemsSource = this.pageModel.NumberList;
|
||||
this.To.ItemsSource = this.pageModel.NumberList;
|
||||
this.Semester.ItemsSource = this.pageModel.SemesterList;
|
||||
|
||||
// load values from last request
|
||||
LecturePageModel lastPageModel = App.LoadFromIsolatedStorage<LecturePageModel>(Constants.IsolatedStorage_LecturePageModel);
|
||||
if (lastPageModel != null)
|
||||
{
|
||||
this.SetLastSelectedIndex(lastPageModel);
|
||||
}
|
||||
|
||||
this.SetSelectedIndex();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the last selected index of the ListPickers
|
||||
/// </summary>
|
||||
/// <param name="lastPageModel">Last PageModel</param>
|
||||
private void SetLastSelectedIndex(LecturePageModel lastPageModel)
|
||||
{
|
||||
this.pageModel.SelectCourseIndex = lastPageModel.SelectCourseIndex;
|
||||
this.pageModel.SelectDegreeIndex = lastPageModel.SelectDegreeIndex;
|
||||
this.pageModel.SelectFromIndex = lastPageModel.SelectFromIndex;
|
||||
this.pageModel.SelectToIndex = lastPageModel.SelectToIndex;
|
||||
this.pageModel.SelectSemesterIndex = lastPageModel.SelectSemesterIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the last selected index of the ListPickers
|
||||
/// </summary>
|
||||
private void SetSelectedIndex()
|
||||
{
|
||||
this.Course.SelectedIndex = this.pageModel.SelectCourseIndex;
|
||||
this.Degree.SelectedIndex = this.pageModel.SelectDegreeIndex;
|
||||
this.Semester.SelectedIndex = this.pageModel.SelectSemesterIndex;
|
||||
this.From.SelectedIndex = this.pageModel.SelectFromIndex;
|
||||
this.To.SelectedIndex = this.pageModel.SelectToIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method store the actual selectIndex to the models
|
||||
/// </summary>
|
||||
private void StoreSelectedIndex()
|
||||
{
|
||||
this.pageModel.SelectCourseIndex = this.Course.SelectedIndex;
|
||||
this.pageModel.SelectDegreeIndex = this.Degree.SelectedIndex;
|
||||
this.pageModel.SelectSemesterIndex = this.Semester.SelectedIndex;
|
||||
this.pageModel.SelectFromIndex = this.From.SelectedIndex;
|
||||
this.pageModel.SelectToIndex = this.To.SelectedIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method send a request to the Feed
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// have to refactors
|
||||
/// </remarks>
|
||||
/// <param name="sender">sender of this event</param>
|
||||
/// <param name="e"> events arguments</param>
|
||||
private void SendRequest(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.api = new LectureApi();
|
||||
this.api.EventHandler.ApiIsReadyEvent += new ApiEventHandler.ApiReadyHandler(this.ApiIsReady);
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
List<UrlParamModel> parameterList = this.CreateUrlParameter();
|
||||
this.api.ApiGet(parameterList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method read the values from the inputs and put them in a list of parameters
|
||||
/// </summary>
|
||||
/// <returns>a list of parameters</returns>
|
||||
private List<UrlParamModel> CreateUrlParameter()
|
||||
{
|
||||
ListPickerItemModel semester = (ListPickerItemModel)this.Semester.SelectedItem;
|
||||
ListPickerItemModel degree = (ListPickerItemModel)this.Degree.SelectedItem;
|
||||
ListPickerItemModel course = (ListPickerItemModel)this.Course.SelectedItem;
|
||||
ListPickerItemModel from = (ListPickerItemModel)this.From.SelectedItem;
|
||||
ListPickerItemModel to = (ListPickerItemModel)this.To.SelectedItem;
|
||||
|
||||
List<UrlParamModel> parameterList = new List<UrlParamModel>();
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_Semester, semester.Value));
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_Degree, degree.Value));
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_Course, course.Value));
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_From, from.Value));
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_To, to.Value));
|
||||
return parameterList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is ready
|
||||
/// </summary>
|
||||
private void ApiIsReady()
|
||||
{
|
||||
App.SaveToIsolatedStorage<LectureList>(Constants.IsolatedStorage_LectureModel, this.api.Model);
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
Uri url = new Uri(Constants.PathLecture_ResultPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
27
CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Lecture.ModulWebPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<phone:WebBrowser x:Name="WebmailBrowser" IsScriptEnabled="True"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
43
CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ModulWebPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows Webpages from the BaseAddress <see cref="Constants.UrlLecture_ModulBaseAddr" />
|
||||
/// </summary>
|
||||
public partial class ModulWebPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModulWebPage" /> class.
|
||||
/// </summary>
|
||||
public ModulWebPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelLecture_ModulNumber))
|
||||
{
|
||||
string number = NavigationContext.QueryString[Constants.ParamModelLecture_ModulNumber];
|
||||
this.WebmailBrowser.Navigate(new Uri(Constants.UrlLecture_ModulBaseAddr + number, UriKind.Absolute));
|
||||
}
|
||||
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Lecture.ResultDetailPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_DetailsHeader, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<ScrollViewer>
|
||||
<StackPanel>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,0,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Type, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding Type}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureName, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding Title}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Officer, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding LecturerString}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Courses, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding CourseString}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Department, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding Department}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureTopic, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding Topic}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -0,0 +1,59 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ResultDetailPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows details of an activity
|
||||
/// </summary>
|
||||
public partial class ResultDetailPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ResultDetailPage" /> class.
|
||||
/// </summary>
|
||||
public ResultDetailPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelLecture_ActivityId))
|
||||
{
|
||||
string activityId = NavigationContext.QueryString[Constants.ParamModelLecture_ActivityId];
|
||||
this.LoadActivity(int.Parse(activityId));
|
||||
}
|
||||
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method load a certain Activity from the model
|
||||
/// </summary>
|
||||
/// <param name="activityId">id of the activity</param>
|
||||
private void LoadActivity(int activityId)
|
||||
{
|
||||
LectureList list = App.LoadFromIsolatedStorage<LectureList>(Constants.IsolatedStorage_LectureModel);
|
||||
if (list != null)
|
||||
{
|
||||
LectureActivity activity = list.GetActivity(activityId);
|
||||
activity.CreateLectureString();
|
||||
activity.CreateCourseString();
|
||||
this.ContentPanel.DataContext = activity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
70
CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml
Normal file
@@ -0,0 +1,70 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Lecture.ResultPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<phone:PhoneApplicationPage.Resources>
|
||||
<DataTemplate x:Key="LectureItemTemplate">
|
||||
|
||||
<Border Background="{x:Null}" BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Button Click="ToggleOptions" BorderBrush="{x:Null}">
|
||||
<Grid>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Type}" Grid.Column="0" Grid.Row="0"/>
|
||||
|
||||
<TextBlock Text=" : " Grid.Column="1" Grid.Row="0"/>
|
||||
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Grid.Column="2" Grid.Row="0"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
|
||||
<Button Name="Link" Visibility="Collapsed" Content="Link" Tag="{Binding Modul.Number}" Click="ShowModulWebPage"/>
|
||||
<Button Name="Details" Visibility="Collapsed" Content="Details" Tag="{Binding Id}" Click="ShowDetailPage"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</phone:PhoneApplicationPage.Resources>
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<ScrollViewer>
|
||||
<phone:LongListSelector Name="ResultList" ItemTemplate="{StaticResource LectureItemTemplate}" HorizontalContentAlignment="Left" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
|
||||
154
CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs
Normal file
@@ -0,0 +1,154 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ResultPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows the results of an LectureRequest
|
||||
/// </summary>
|
||||
public partial class ResultPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ResultPage" /> class.
|
||||
/// </summary>
|
||||
public ResultPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
LectureList list = App.LoadFromIsolatedStorage<LectureList>(Constants.IsolatedStorage_LectureModel);
|
||||
if (list == null)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathLecture_LecturePage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
return;
|
||||
}
|
||||
|
||||
this.ResultList.ItemsSource = list.Activities;
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method toggle the Visibility of the Link- and Details-Buttons
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void ToggleOptions(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Button button = (Button)sender;
|
||||
StackPanel parent = (StackPanel)button.Parent;
|
||||
|
||||
Button link = (Button)parent.FindName("Link");
|
||||
Button details = (Button)parent.FindName("Details");
|
||||
if (link.Tag == null)
|
||||
{
|
||||
link.IsEnabled = false;
|
||||
}
|
||||
|
||||
this.ToogleVisibility(link);
|
||||
this.ToogleVisibility(details);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method shows the Link- and Details-Buttons
|
||||
/// </summary>
|
||||
/// <param name="parent">Reference of the StackPanel which include the buttons </param>
|
||||
private void ShowOptions(StackPanel parent)
|
||||
{
|
||||
Button link = (Button)parent.FindName("Link");
|
||||
Button details = (Button)parent.FindName("Details");
|
||||
this.ShowVisibility(link);
|
||||
this.ShowVisibility(details);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method hide the Link- and Details-Buttons
|
||||
/// </summary>
|
||||
/// <param name="parent">Reference of the StackPanel which include the buttons </param>
|
||||
private void HideOptions(StackPanel parent)
|
||||
{
|
||||
UIElement link = (UIElement)parent.FindName("Link");
|
||||
UIElement details = (UIElement)parent.FindName("Details");
|
||||
this.HideVisibility(link);
|
||||
this.HideVisibility(details);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method toggle the Visibility of an UIElement
|
||||
/// </summary>
|
||||
/// <param name="element">UIElement which Visibility has to be toggle</param>
|
||||
private void ToogleVisibility(UIElement element)
|
||||
{
|
||||
if (System.Windows.Visibility.Visible.Equals(element.Visibility))
|
||||
{
|
||||
this.HideVisibility(element);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ShowVisibility(element);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the Visibility=true of an UIElement
|
||||
/// </summary>
|
||||
/// <param name="element">UIElement which Visibility has to been true</param>
|
||||
private void ShowVisibility(UIElement element)
|
||||
{
|
||||
element.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the Visibility=false of an UIElement
|
||||
/// </summary>
|
||||
/// <param name="element">UIElement which Visibility has to been false</param>
|
||||
private void HideVisibility(UIElement element)
|
||||
{
|
||||
element.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method navigate to ModuleWebPage
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void ShowModulWebPage(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Button btn = (Button)sender;
|
||||
HideOptions((StackPanel)btn.Parent);
|
||||
Uri url = new Uri(Constants.PathLecture_ModulWebPage + "?" + Constants.ParamModelLecture_ModulNumber + "=" + btn.Tag, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method navigate to DetailPage
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void ShowDetailPage(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Button btn = (Button)sender;
|
||||
HideOptions((StackPanel)btn.Parent);
|
||||
Uri url = new Uri(Constants.PathLecture_ResultDetailPage + "?" + Constants.ParamModelLecture_ActivityId + "=" + btn.Tag, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
33
CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml
Normal file
@@ -0,0 +1,33 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.News.NewsIndexPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Title and headline -->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
|
||||
</StackPanel>
|
||||
<!-- Content -->
|
||||
<ListBox x:Name="ButtonPanel" Grid.Row="1">
|
||||
</ListBox>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
117
CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="NewsIndexPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.News
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Api.News;
|
||||
using CampusAppWP8.Model.events_news;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Overview page of all news.
|
||||
/// </summary>
|
||||
public partial class NewsIndexPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets News Feed object, which contains the RSS models and data.
|
||||
/// </summary>
|
||||
public static NewsFeed newsFeed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NewsIndexPage" /> class.
|
||||
/// </summary>
|
||||
public NewsIndexPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
NewsIndexPage.newsFeed = new NewsFeed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On navigation to this page, creates a FeedEventHandler and load the RSS feed data.
|
||||
/// </summary>
|
||||
/// <param name="e">event args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if ((NewsIndexPage.newsFeed.Model == null)
|
||||
|| (NewsIndexPage.newsFeed.Model.Channel == null)
|
||||
|| (NewsIndexPage.newsFeed.Model.Channel.Count() == 0)
|
||||
|| (NewsIndexPage.newsFeed.Model.Channel[0].item == null)
|
||||
|| (NewsIndexPage.newsFeed.Model.Channel[0].item.Count() == 0))
|
||||
{
|
||||
// Set handler and load the fees informations.
|
||||
NewsIndexPage.newsFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.SetupNewsPageList);
|
||||
NewsIndexPage.newsFeed.LoadFeed();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called after the RSS feeds are loaded into the newsFeed model.
|
||||
/// If there was no feed information set to the UI, the feed list
|
||||
/// will be sorted by timestamp and the buttons will be created.
|
||||
/// </summary>
|
||||
private void SetupNewsPageList()
|
||||
{
|
||||
if ((NewsIndexPage.newsFeed.Model != null)
|
||||
&& (NewsIndexPage.newsFeed.Model.Channel != null)
|
||||
&& (NewsIndexPage.newsFeed.Model.Channel.Count() >= 1)
|
||||
&& (this.ButtonPanel.Items.Count() == 0))
|
||||
{
|
||||
// Sort the list of rssfeeds.
|
||||
IEnumerable<RSSModel> tempList = NewsIndexPage.newsFeed.Model.Channel[0].item.OrderByDescending(e => e.DTTimestamp);
|
||||
NewsIndexPage.newsFeed.Model.Channel[0].item = new ObservableCollection<RSSModel>(tempList);
|
||||
|
||||
// Create the buttons for the fees selection and add it to the buttonpanel.
|
||||
for (int i = 0; i < NewsIndexPage.newsFeed.Model.Channel[0].item.Count(); i++)
|
||||
{
|
||||
Button tempBtn = new Button();
|
||||
tempBtn.Name = "NewsRowAppButton";
|
||||
tempBtn.Content = NewsIndexPage.newsFeed.Model.Channel[0].item[i].Title;
|
||||
tempBtn.VerticalContentAlignment = VerticalAlignment.Stretch;
|
||||
tempBtn.HorizontalContentAlignment = HorizontalAlignment.Stretch;
|
||||
tempBtn.BorderThickness = new Thickness(0.0);
|
||||
tempBtn.Padding = new Thickness(0.0);
|
||||
tempBtn.Click += this.NewsRowAppButton_Click;
|
||||
tempBtn.Tag = i;
|
||||
|
||||
this.ButtonPanel.Items.Add(tempBtn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the newsFeed object.
|
||||
/// </summary>
|
||||
public static NewsFeed GetNewsFeed
|
||||
{
|
||||
get { return NewsIndexPage.newsFeed; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called on clicking on a feed button.
|
||||
/// Navigates to the news pivot page with the information of the
|
||||
/// selected feed index.
|
||||
/// </summary>
|
||||
/// <param name="sender">pressed button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void NewsRowAppButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempElem = sender as FrameworkElement;
|
||||
|
||||
NavigationService.Navigate(new Uri("/pages/news/NewsPage.xaml?pivotindex=" + tempElem.Tag, UriKind.Relative));
|
||||
}
|
||||
}
|
||||
}
|
||||
59
CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml
Normal file
@@ -0,0 +1,59 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.News.NewsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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.events_news"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" 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">
|
||||
<!-- Pivotpage -->
|
||||
<phone:Pivot x:Name="NewsPivot" Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}">
|
||||
<!-- Pivotitem template -->
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Date, Mode=OneWay}" />
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="90"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid x:Name="NewsTextGrid" Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock x:Name="NewsHeadline" Text="{Binding Path=Title, Mode=OneWay}" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="42"/>
|
||||
<ScrollViewer Grid.Row="1">
|
||||
<TextBlock x:Name="NewsText" Text="{Binding Path=Text, Mode=OneWay}" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="24" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<phone:WebBrowser x:Name="WebBrowser" Grid.Row="0" IsScriptEnabled="True" Visibility="Collapsed"/>
|
||||
|
||||
<Button Name="NewsHome" Content="{Binding Path=LocalizedResources.NewsHomeBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Left" Click="NewsHome_Click"/>
|
||||
<Button Name="NewsLink" Tag="{Binding Path=Link, Mode=OneWay}" Content="{Binding Path=LocalizedResources.NewsLinkBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="NewsLink_Click"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
</phone:Pivot>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
136
CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="NewsPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Pages.News
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// EventPage, where every news fees has his own PivotItem.
|
||||
/// </summary>
|
||||
public partial class NewsPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// for checking if the feed source is already set or not.
|
||||
/// </summary>
|
||||
private bool isSourceSet = false;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NewsPage" /> class.
|
||||
/// </summary>
|
||||
public NewsPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On navigation to this page.
|
||||
/// The PivotItem source will be set, if it wasn't before.
|
||||
/// Navigating to the submitted index of the chosen PivotItem page.
|
||||
/// </summary>
|
||||
/// <param name="e">Event Args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
// Set pivotitem Source
|
||||
if (this.isSourceSet == false)
|
||||
{
|
||||
if ((NewsIndexPage.GetNewsFeed.Model != null)
|
||||
&& (NewsIndexPage.GetNewsFeed.Model.Channel != null)
|
||||
&& (NewsIndexPage.GetNewsFeed.Model.Channel.Count() >= 1)
|
||||
&& (this.NewsPivot.Items.Count() == 0))
|
||||
{
|
||||
this.NewsPivot.ItemsSource = NewsIndexPage.GetNewsFeed.Model.Channel[0].item;
|
||||
this.isSourceSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
string pivotIndex = string.Empty;
|
||||
|
||||
// Navigate to the selected pivotitem
|
||||
if (NavigationContext.QueryString.TryGetValue("pivotindex", out pivotIndex))
|
||||
{
|
||||
int pivotIndexInt = int.Parse(pivotIndex);
|
||||
|
||||
// if the index is in the range of the array
|
||||
if ((pivotIndexInt >= 0) && (pivotIndexInt < NewsIndexPage.GetNewsFeed.Model.Channel[0].item.Count()))
|
||||
{
|
||||
NewsPivot.SelectedIndex = pivotIndexInt;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("ERROR: pivotIndex out of range!!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the home button (lower left).
|
||||
/// Navigate back to the news index page.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void NewsHome_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Navigate back to the news index page
|
||||
NavigationService.GoBack();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the link button if a link exists in the feed
|
||||
/// (lower right).
|
||||
/// Open the WebBrowser with the url set in the feed.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void NewsLink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement fe = sender as FrameworkElement;
|
||||
|
||||
// Open the webbrowser
|
||||
Grid grfe = fe.Parent as Grid;
|
||||
FrameworkElement newsTextGrid = null;
|
||||
FrameworkElement newsWeb = null;
|
||||
|
||||
foreach (FrameworkElement tempElem in grfe.Children)
|
||||
{
|
||||
if (tempElem.Name == "NewsTextGrid")
|
||||
{
|
||||
newsTextGrid = tempElem;
|
||||
}
|
||||
else if (tempElem.Name == "WebBrowser")
|
||||
{
|
||||
newsWeb = tempElem;
|
||||
}
|
||||
}
|
||||
|
||||
if ((newsTextGrid != null)
|
||||
&& (newsWeb != null))
|
||||
{
|
||||
if (newsTextGrid.Visibility == Visibility.Visible)
|
||||
{
|
||||
newsTextGrid.Visibility = Visibility.Collapsed;
|
||||
newsWeb.Visibility = Visibility.Visible;
|
||||
(newsWeb as WebBrowser).Navigate(new Uri(fe.Tag.ToString(), UriKind.Absolute));
|
||||
}
|
||||
else
|
||||
{
|
||||
newsWeb.Visibility = Visibility.Collapsed;
|
||||
newsTextGrid.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Openinghours.OpeninghoursPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
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"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Title and headline -->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.OpenHoursApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="64"/>
|
||||
</StackPanel>
|
||||
<!-- Content -->
|
||||
<ProgressBar Name="ProgressBar" Grid.Row="1" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<ListBox x:Name="InstitutionPanel" Grid.Row="1">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<Button Content="{Binding Title}" Background="Gray" BorderBrush="Gray" Foreground="Black" Margin="-10,-10,-10,-10" Click="InstitutionBtn_Click"/>
|
||||
<StackPanel Visibility="Collapsed">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!--day-->
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<!--time-->
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<!--monday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--tuesday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--wednesday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--thursday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--friday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--saturday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--sunday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--row 0 monday-->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Monday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleMonday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Monday}" Visibility="{Binding VisibleMonday}" HorizontalAlignment="Left"/>
|
||||
<!--row 1 tuesday-->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Tuesday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleTuesday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Tuesday}" Visibility="{Binding VisibleTuesday}" HorizontalAlignment="Left"/>
|
||||
<!--row 2 wednesday-->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Wednesday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleWednesday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Wednesday}" Visibility="{Binding VisibleWednesday}" HorizontalAlignment="Left"/>
|
||||
<!--row 3 thursday-->
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Thursday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleThursday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Thursday}" Visibility="{Binding VisibleThursday}" HorizontalAlignment="Left"/>
|
||||
<!--row 4 friday-->
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Friday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleFriday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding Friday}" Visibility="{Binding VisibleFriday}" HorizontalAlignment="Left"/>
|
||||
<!--row 5 saturday-->
|
||||
<TextBlock Grid.Row="5" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Saturday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleSaturday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding Saturday}" Visibility="{Binding VisibleSaturday}" HorizontalAlignment="Left"/>
|
||||
<!--row 6 sunday-->
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Sunday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleSunday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding Sunday}" Visibility="{Binding VisibleSunday}" HorizontalAlignment="Left"/>
|
||||
</Grid>
|
||||
<Grid Margin="0,12,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--building-->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Path=LocalizedResources.Building, Source={StaticResource LocalizedStrings}}" Visibility="{Binding VisibleBuilding}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Building}" Visibility="{Binding VisibleBuilding}" HorizontalAlignment="Left" Padding="10,3,10,0"/>
|
||||
<!--room-->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Path=LocalizedResources.Room, Source={StaticResource LocalizedStrings}}" Visibility="{Binding VisibleRoom}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Room}" Visibility="{Binding VisibleRoom}" HorizontalAlignment="Left" Padding="10,3,10,0"/>
|
||||
</Grid>
|
||||
<!--hint text-->
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Hint, Source={StaticResource LocalizedStrings}}" Visibility="{Binding VisibleComment}" Padding="10,3,10,0" Margin="0,12,0,0" FontStyle="Italic"/>
|
||||
<TextBlock Text="{Binding Comment}" Visibility="{Binding VisibleComment}" TextWrapping="Wrap" Padding="10,3,10,0"/>
|
||||
<Grid Margin="0,6,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--mail button-->
|
||||
<Button Grid.Column="0" Tag="{Binding EMailTitle}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisibleEMail}" Click="EMailBtn_Click" Padding="0" Margin="-10">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.WebMail, Source={StaticResource ThemelizedIcons}}"/>
|
||||
</Button>
|
||||
<!--phone button-->
|
||||
<Button Grid.Column="1" Tag="{Binding PhoneTitle}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisiblePhone}" Click="PhoneBtn_Click" Padding="0" Margin="-10">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Phone, Source={StaticResource ThemelizedIcons}}"/>
|
||||
</Button>
|
||||
<!--location button-->
|
||||
<Button Grid.Column="2" Tag="{Binding Building}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisibleBuilding}" Click="LocationBtn_Click" Padding="0" Margin="-10">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Campus, Source={StaticResource ThemelizedIcons}}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -0,0 +1,196 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Openinghours
|
||||
{
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.Openinghours;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours page.
|
||||
/// </summary>
|
||||
public partial class OpeninghoursPage : PhoneApplicationPage
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours feed object.
|
||||
/// </summary>
|
||||
private OpeninghoursFeed feed = null;
|
||||
|
||||
/// <summary>
|
||||
/// last visible UI element.
|
||||
/// </summary>
|
||||
private UIElement lastOpenUIElem = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursPage" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.InitializeFeed();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method.
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
if (this.feed == null)
|
||||
{
|
||||
this.InitializeFeed();
|
||||
}
|
||||
|
||||
if (e.NavigationMode != System.Windows.Navigation.NavigationMode.Back)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
|
||||
this.feed.LoadFeed();
|
||||
}
|
||||
|
||||
// protected
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the opening hours feed.
|
||||
/// </summary>
|
||||
private void InitializeFeed()
|
||||
{
|
||||
this.feed = new OpeninghoursFeed();
|
||||
this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will be execute if the feed is ready.
|
||||
/// </summary>
|
||||
private void FeedIsReady()
|
||||
{
|
||||
this.SetupInstitutionList();
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Setup the institution list.
|
||||
/// </summary>
|
||||
private void SetupInstitutionList()
|
||||
{
|
||||
this.InstitutionPanel.ItemsSource = this.feed.Model.Institutions;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a institution.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void InstitutionBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.lastOpenUIElem != null)
|
||||
{
|
||||
this.lastOpenUIElem.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
FrameworkElement btn = sender as FrameworkElement;
|
||||
StackPanel parent = btn.Parent as StackPanel;
|
||||
|
||||
if (parent.Children.Count() >= 2)
|
||||
{
|
||||
if (this.lastOpenUIElem != parent.Children[1])
|
||||
{
|
||||
this.lastOpenUIElem = parent.Children[1];
|
||||
this.lastOpenUIElem.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lastOpenUIElem = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a mail button.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void EMailBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempUIElem = sender as FrameworkElement;
|
||||
|
||||
string[] info = tempUIElem.Tag.ToString().Split(':');
|
||||
|
||||
if ((info.Count() > 0) && (info[0] != null))
|
||||
{
|
||||
EmailComposeTask emailTask = new EmailComposeTask();
|
||||
emailTask.To = "mailto:" + info[0];
|
||||
emailTask.Show();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a phone button.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void PhoneBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempUIElem = sender as FrameworkElement;
|
||||
PhoneCallTask phoneCallTask = new PhoneCallTask();
|
||||
|
||||
string[] info = tempUIElem.Tag.ToString().Split(':');
|
||||
|
||||
if ((info.Count() > 0) && (info[0] != null))
|
||||
{
|
||||
phoneCallTask.PhoneNumber = info[0];
|
||||
}
|
||||
|
||||
if ((info.Count() > 1) && (info[1] != null))
|
||||
{
|
||||
phoneCallTask.DisplayName = info[1];
|
||||
}
|
||||
|
||||
phoneCallTask.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a location button.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void LocationBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempUIElem = sender as FrameworkElement;
|
||||
|
||||
// TODO: open campusmap
|
||||
}
|
||||
|
||||
// private
|
||||
#endregion
|
||||
// Method
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.webmail.Webmail"
|
||||
x:Class="CampusAppWP8.Pages.Webmail.WebmailPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
36
CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="WebmailPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>12.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Webmail
|
||||
{
|
||||
using System;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the WebmailPage
|
||||
/// </summary>
|
||||
public partial class WebmailPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WebmailPage" /> class.
|
||||
/// </summary>
|
||||
public WebmailPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.LoadWebmailPage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method load WebmailPage
|
||||
/// </summary>
|
||||
private void LoadWebmailPage()
|
||||
{
|
||||
this.WebmailBrowser.Navigate(new Uri(Constants.UrlWebMail_Addr, UriKind.Absolute));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,10 @@
|
||||
<Capability Name="ID_CAP_MAP" />
|
||||
<Capability Name="ID_CAP_LOCATION" />
|
||||
<Capability Name="ID_CAP_ISV_CAMERA" />
|
||||
<Capability Name="ID_CAP_PHONEDIALER" />
|
||||
</Capabilities>
|
||||
<Tasks>
|
||||
<DefaultTask Name="_default" NavigationPage="pages/mensa/MensaPage.xaml" />
|
||||
<DefaultTask Name="_default" NavigationPage="pages/StartPage.xaml" />
|
||||
</Tasks>
|
||||
<Tokens>
|
||||
<PrimaryToken TokenID="CampusAppWP8Token" TaskName="_default">
|
||||
|
||||
@@ -87,6 +87,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Gebäude ähnelt.
|
||||
/// </summary>
|
||||
public static string Building {
|
||||
get {
|
||||
return ResourceManager.GetString("Building", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt.
|
||||
/// </summary>
|
||||
@@ -96,6 +105,33 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Bachelor ähnelt.
|
||||
/// </summary>
|
||||
public static string Degree_Bachelor {
|
||||
get {
|
||||
return ResourceManager.GetString("Degree_Bachelor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Diplom ähnelt.
|
||||
/// </summary>
|
||||
public static string Degree_Diploma {
|
||||
get {
|
||||
return ResourceManager.GetString("Degree_Diploma", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Master ähnelt.
|
||||
/// </summary>
|
||||
public static string Degree_Master {
|
||||
get {
|
||||
return ResourceManager.GetString("Degree_Master", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt.
|
||||
/// </summary>
|
||||
@@ -114,6 +150,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Fakultät ähnelt.
|
||||
/// </summary>
|
||||
public static string Faculty {
|
||||
get {
|
||||
return ResourceManager.GetString("Faculty", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Hinweis ähnelt.
|
||||
/// </summary>
|
||||
public static string Hint {
|
||||
get {
|
||||
return ResourceManager.GetString("Hint", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Hausaufgaben ähnelt.
|
||||
/// </summary>
|
||||
@@ -132,6 +186,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Studiengänge ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_Courses {
|
||||
get {
|
||||
return ResourceManager.GetString("LectureApp_Courses", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Abschluss ähnelt.
|
||||
/// </summary>
|
||||
@@ -142,7 +205,25 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Vorlesungsname ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Lehrstuhl ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_Department {
|
||||
get {
|
||||
return ResourceManager.GetString("LectureApp_Department", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Vorlesungen - Details ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_DetailsHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("LectureApp_DetailsHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Veranstaltungsname ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_LectureName {
|
||||
get {
|
||||
@@ -150,6 +231,33 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Lehrinhalt ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_LectureTopic {
|
||||
get {
|
||||
return ResourceManager.GetString("LectureApp_LectureTopic", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Studiengangauswahl ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_ListPickerHeaderCourse {
|
||||
get {
|
||||
return ResourceManager.GetString("LectureApp_ListPickerHeaderCourse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Verantwortlicher ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_Officer {
|
||||
get {
|
||||
return ResourceManager.GetString("LectureApp_Officer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Semester ähnelt.
|
||||
/// </summary>
|
||||
@@ -169,7 +277,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Vorlesung ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Vorlesungen ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_Title {
|
||||
get {
|
||||
@@ -177,6 +285,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Veranstaltungsart ähnelt.
|
||||
/// </summary>
|
||||
public static string LectureApp_Type {
|
||||
get {
|
||||
return ResourceManager.GetString("LectureApp_Type", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Links ähnelt.
|
||||
/// </summary>
|
||||
@@ -232,7 +349,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Essen 3 ähnelt.
|
||||
/// </summary>
|
||||
public static string MensaApp_Dinner3 {
|
||||
get {
|
||||
@@ -249,6 +366,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 84 ähnelt.
|
||||
/// </summary>
|
||||
public static string MensaApp_DinnerLabelW {
|
||||
get {
|
||||
return ResourceManager.GetString("MensaApp_DinnerLabelW", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Heute nicht im Angbot ähnelt.
|
||||
/// </summary>
|
||||
@@ -285,6 +411,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Link ähnelt.
|
||||
/// </summary>
|
||||
public static string NewsLinkBtn {
|
||||
get {
|
||||
return ResourceManager.GetString("NewsLinkBtn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Öffnungszeiten ähnelt.
|
||||
/// </summary>
|
||||
@@ -303,6 +438,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt.
|
||||
/// </summary>
|
||||
public static string Professorship_chairs {
|
||||
get {
|
||||
return ResourceManager.GetString("Professorship_chairs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt.
|
||||
/// </summary>
|
||||
@@ -321,6 +465,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Raum ähnelt.
|
||||
/// </summary>
|
||||
public static string Room {
|
||||
get {
|
||||
return ResourceManager.GetString("Room", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Beispielwert für die Laufzeiteigenschaft ähnelt.
|
||||
/// </summary>
|
||||
@@ -348,6 +501,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Samstag ähnelt.
|
||||
/// </summary>
|
||||
public static string Time_Day_Saturday {
|
||||
get {
|
||||
return ResourceManager.GetString("Time_Day_Saturday", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Sonntag ähnelt.
|
||||
/// </summary>
|
||||
public static string Time_Day_Sunday {
|
||||
get {
|
||||
return ResourceManager.GetString("Time_Day_Sunday", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Donnerstag ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
<value>Hausaufgaben</value>
|
||||
</data>
|
||||
<data name="LectureApp_Title" xml:space="preserve">
|
||||
<value>Vorlesung</value>
|
||||
<value>Vorlesungen</value>
|
||||
</data>
|
||||
<data name="LinkApp_Title" xml:space="preserve">
|
||||
<value>Links</value>
|
||||
@@ -183,7 +183,7 @@
|
||||
<value>Abschluss</value>
|
||||
</data>
|
||||
<data name="LectureApp_LectureName" xml:space="preserve">
|
||||
<value>Vorlesungsname</value>
|
||||
<value>Veranstaltungsname</value>
|
||||
</data>
|
||||
<data name="LectureApp_Semester" xml:space="preserve">
|
||||
<value>Semester</value>
|
||||
@@ -219,15 +219,72 @@
|
||||
<value>Essen 2</value>
|
||||
</data>
|
||||
<data name="MensaApp_Dinner3" xml:space="preserve">
|
||||
<value>Essen 2</value>
|
||||
<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>
|
||||
<data name="NewsHomeBtn" xml:space="preserve">
|
||||
<value>zur Übersicht</value>
|
||||
</data>
|
||||
<data name="MensaApp_DinnerLabelW" xml:space="preserve">
|
||||
<value>84</value>
|
||||
</data>
|
||||
<data name="LectureApp_Courses" xml:space="preserve">
|
||||
<value>Studiengänge</value>
|
||||
</data>
|
||||
<data name="LectureApp_Department" xml:space="preserve">
|
||||
<value>Lehrstuhl</value>
|
||||
</data>
|
||||
<data name="LectureApp_DetailsHeader" xml:space="preserve">
|
||||
<value>Vorlesungen - Details</value>
|
||||
</data>
|
||||
<data name="LectureApp_LectureTopic" xml:space="preserve">
|
||||
<value>Lehrinhalt</value>
|
||||
</data>
|
||||
<data name="LectureApp_Officer" xml:space="preserve">
|
||||
<value>Verantwortlicher</value>
|
||||
</data>
|
||||
<data name="LectureApp_Type" xml:space="preserve">
|
||||
<value>Veranstaltungsart</value>
|
||||
</data>
|
||||
<data name="Faculty" xml:space="preserve">
|
||||
<value>Fakultät</value>
|
||||
</data>
|
||||
<data name="Professorship_chairs" xml:space="preserve">
|
||||
<value>Lehrstühle</value>
|
||||
</data>
|
||||
<data name="NewsLinkBtn" xml:space="preserve">
|
||||
<value>Link</value>
|
||||
</data>
|
||||
<data name="Degree_Bachelor" xml:space="preserve">
|
||||
<value>Bachelor</value>
|
||||
</data>
|
||||
<data name="Degree_Diploma" xml:space="preserve">
|
||||
<value>Diplom</value>
|
||||
</data>
|
||||
<data name="Degree_Master" xml:space="preserve">
|
||||
<value>Master</value>
|
||||
</data>
|
||||
<data name="LectureApp_ListPickerHeaderCourse" xml:space="preserve">
|
||||
<value>Studiengangauswahl</value>
|
||||
</data>
|
||||
<data name="Building" xml:space="preserve">
|
||||
<value>Gebäude</value>
|
||||
</data>
|
||||
<data name="Hint" xml:space="preserve">
|
||||
<value>Hinweis</value>
|
||||
</data>
|
||||
<data name="Room" xml:space="preserve">
|
||||
<value>Raum</value>
|
||||
</data>
|
||||
<data name="Time_Day_Saturday" xml:space="preserve">
|
||||
<value>Samstag</value>
|
||||
</data>
|
||||
<data name="Time_Day_Sunday" xml:space="preserve">
|
||||
<value>Sonntag</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -60,6 +60,213 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die LectureModel ähnelt.
|
||||
/// </summary>
|
||||
internal static string IsolatedStorage_LectureModel {
|
||||
get {
|
||||
return ResourceManager.GetString("IsolatedStorage_LectureModel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die IsolatedStorage_LecturePageModel ähnelt.
|
||||
/// </summary>
|
||||
internal static string IsolatedStorage_LecturePageModel {
|
||||
get {
|
||||
return ResourceManager.GetString("IsolatedStorage_LecturePageModel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die lsf_auszug ähnelt.
|
||||
/// </summary>
|
||||
internal static string LectureXmlValidRootName {
|
||||
get {
|
||||
return ResourceManager.GetString("LectureXmlValidRootName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt.
|
||||
/// </summary>
|
||||
internal static string ParamGetLecture_Course {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamGetLecture_Course", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Abschluss ähnelt.
|
||||
/// </summary>
|
||||
internal static string ParamGetLecture_Degree {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamGetLecture_Degree", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Von ähnelt.
|
||||
/// </summary>
|
||||
internal static string ParamGetLecture_From {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamGetLecture_From", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Semester ähnelt.
|
||||
/// </summary>
|
||||
internal static string ParamGetLecture_Semester {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamGetLecture_Semester", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Bis ähnelt.
|
||||
/// </summary>
|
||||
internal static string ParamGetLecture_To {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamGetLecture_To", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die ActivityId ähnelt.
|
||||
/// </summary>
|
||||
internal static string ParamModelLecture_ActivityId {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamModelLecture_ActivityId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die ModulNumber ähnelt.
|
||||
/// </summary>
|
||||
internal static string ParamModelLecture_ModulNumber {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamModelLecture_ModulNumber", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Url ähnelt.
|
||||
/// </summary>
|
||||
internal static string ParamUrl {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamUrl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Events/EventIndexPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathEvents_EventsIndexPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathEvents_EventsIndexPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/LecturePage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathLecture_LecturePage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathLecture_LecturePage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/ModulWebPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathLecture_ModulWebPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathLecture_ModulWebPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/ResultDetailPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathLecture_ResultDetailPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathLecture_ResultDetailPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/ResultPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathLecture_ResultPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathLecture_ResultPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Webmail/WebmailPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathMail_WebMailPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathMail_WebMailPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Mensa/MensaPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathMensa_MensaPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathMensa_MensaPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/News/NewsIndexPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathNews_NewsIndexPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathNews_NewsIndexPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Openinghours/OpeninghoursPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathOpeninghours_OpeninghoursPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathOpeninghours_OpeninghoursPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.zv.tu-cottbus.de/LSFveranst/LSF4 ähnelt.
|
||||
/// </summary>
|
||||
internal static string UrlLecture_ApiBaseAddr {
|
||||
get {
|
||||
return ResourceManager.GetString("UrlLecture_ApiBaseAddr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die https://www.tu-cottbus.de/modul/ ähnelt.
|
||||
/// </summary>
|
||||
internal static string UrlLecture_ModulBaseAddr {
|
||||
get {
|
||||
return ResourceManager.GetString("UrlLecture_ModulBaseAddr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die https://webmail.tu-cottbus.de ähnelt.
|
||||
/// </summary>
|
||||
internal static string UrlWebMail_Addr {
|
||||
get {
|
||||
return ResourceManager.GetString("UrlWebMail_Addr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die root ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -117,7 +117,76 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="IsolatedStorage_LectureModel" xml:space="preserve">
|
||||
<value>LectureModel</value>
|
||||
</data>
|
||||
<data name="ParamModelLecture_ActivityId" xml:space="preserve">
|
||||
<value>ActivityId</value>
|
||||
</data>
|
||||
<data name="ParamModelLecture_ModulNumber" xml:space="preserve">
|
||||
<value>ModulNumber</value>
|
||||
</data>
|
||||
<data name="ParamUrl" xml:space="preserve">
|
||||
<value>Url</value>
|
||||
</data>
|
||||
<data name="PathLecture_ModulWebPage" xml:space="preserve">
|
||||
<value>/Pages/Lecture/ModulWebPage.xaml</value>
|
||||
</data>
|
||||
<data name="PathLecture_ResultDetailPage" xml:space="preserve">
|
||||
<value>/Pages/Lecture/ResultDetailPage.xaml</value>
|
||||
</data>
|
||||
<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>
|
||||
<data name="PathLecture_ResultPage" xml:space="preserve">
|
||||
<value>/Pages/Lecture/ResultPage.xaml</value>
|
||||
</data>
|
||||
<data name="LectureXmlValidRootName" xml:space="preserve">
|
||||
<value>lsf_auszug</value>
|
||||
</data>
|
||||
<data name="ParamGetLecture_Course" xml:space="preserve">
|
||||
<value>Studiengang</value>
|
||||
</data>
|
||||
<data name="ParamGetLecture_Degree" xml:space="preserve">
|
||||
<value>Abschluss</value>
|
||||
</data>
|
||||
<data name="ParamGetLecture_From" xml:space="preserve">
|
||||
<value>Von</value>
|
||||
</data>
|
||||
<data name="ParamGetLecture_Semester" xml:space="preserve">
|
||||
<value>Semester</value>
|
||||
</data>
|
||||
<data name="ParamGetLecture_To" xml:space="preserve">
|
||||
<value>Bis</value>
|
||||
</data>
|
||||
<data name="UrlLecture_ApiBaseAddr" xml:space="preserve">
|
||||
<value>http://www.zv.tu-cottbus.de/LSFveranst/LSF4</value>
|
||||
</data>
|
||||
<data name="IsolatedStorage_LecturePageModel" xml:space="preserve">
|
||||
<value>IsolatedStorage_LecturePageModel</value>
|
||||
</data>
|
||||
<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>
|
||||
<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="PathOpeninghours_OpeninghoursPage" xml:space="preserve">
|
||||
<value>/Pages/Openinghours/OpeninghoursPage.xaml</value>
|
||||
</data>
|
||||
</root>
|
||||
240
CampusAppWP8/CampusAppWP8/Resources/Icons.Designer.cs
generated
Normal file
@@ -0,0 +1,240 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.18046
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Resources
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
/// <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 Icons
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Icons()
|
||||
{
|
||||
}
|
||||
|
||||
/// <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("CampusAppWP8.Resources.Icons",
|
||||
|
||||
typeof(Icons).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>
|
||||
/// Returns the full filename of the icon, depending on the current theme.
|
||||
/// </summary>
|
||||
/// <param name="_key">Tagname</param>
|
||||
/// <returns>Filename</returns>
|
||||
private static string Themerize(string _key)
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible)
|
||||
{
|
||||
retValue = "/Assets/Icons/DarkTheme/";
|
||||
}
|
||||
else
|
||||
{
|
||||
retValue = "/Assets/Icons/LightTheme/";
|
||||
}
|
||||
|
||||
retValue += ResourceManager.GetString(_key, resourceCulture);
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die campus_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Campus");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die departments_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Departments
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Departments");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die homework_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Homework
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Homework");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die lectures_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Lectures
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Lectures");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die link_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Link
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Link");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die mensa_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Mensa
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Mensa");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die news_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string News
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("News");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die openhours_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Openhours
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Openhours");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die schedule_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Schedule
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Schedule");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die search_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Search
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Search");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die student_council_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string StudentCouncil
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("StudentCouncil");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die webmail_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string WebMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("WebMail");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die phone_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Phone
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Phone");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
159
CampusAppWP8/CampusAppWP8/Resources/Icons.resx
Normal file
@@ -0,0 +1,159 @@
|
||||
<?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="Campus" xml:space="preserve">
|
||||
<value>campus_159.png</value>
|
||||
</data>
|
||||
<data name="Departments" xml:space="preserve">
|
||||
<value>departments_159.png</value>
|
||||
</data>
|
||||
<data name="Homework" xml:space="preserve">
|
||||
<value>homework_159.png</value>
|
||||
</data>
|
||||
<data name="Lectures" xml:space="preserve">
|
||||
<value>lectures_159.png</value>
|
||||
</data>
|
||||
<data name="Link" xml:space="preserve">
|
||||
<value>link_159.png</value>
|
||||
</data>
|
||||
<data name="Mensa" xml:space="preserve">
|
||||
<value>mensa_159.png</value>
|
||||
</data>
|
||||
<data name="News" xml:space="preserve">
|
||||
<value>news_159.png</value>
|
||||
</data>
|
||||
<data name="Openhours" xml:space="preserve">
|
||||
<value>openhours_159.png</value>
|
||||
</data>
|
||||
<data name="Phone" xml:space="preserve">
|
||||
<value>phone_159.png</value>
|
||||
</data>
|
||||
<data name="Schedule" xml:space="preserve">
|
||||
<value>schedule_159.png</value>
|
||||
</data>
|
||||
<data name="Search" xml:space="preserve">
|
||||
<value>search_159.png</value>
|
||||
</data>
|
||||
<data name="StudentCouncil" xml:space="preserve">
|
||||
<value>student_council_159.png</value>
|
||||
</data>
|
||||
<data name="WebMail" xml:space="preserve">
|
||||
<value>webmail_159.png</value>
|
||||
</data>
|
||||
</root>
|
||||
33
CampusAppWP8/CampusAppWP8/ThemelizedIcons.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ThemelizedIcons.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Theme icons.
|
||||
/// </summary>
|
||||
public class ThemelizedIcons
|
||||
{
|
||||
/// <summary>
|
||||
/// Resource object.
|
||||
/// </summary>
|
||||
private static Icons themelized = new Icons();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the resource object.
|
||||
/// </summary>
|
||||
public Icons ThemelizedIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
return themelized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
144
CampusAppWP8/CampusAppWP8/Utility/Api.cs
Normal file
@@ -0,0 +1,144 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="Api.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>19.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// This abstract Class is for API
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type for model of the API</typeparam>
|
||||
public abstract class Api<T> : HttpRequest
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// EventHandler of the API
|
||||
/// </summary>
|
||||
private readonly ApiEventHandler eventHandler;
|
||||
|
||||
/// <summary>
|
||||
/// The model of the API
|
||||
/// </summary>
|
||||
private T model;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Api{T}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="apiBaseAddress">BaseUrl of the API</param>
|
||||
public Api(Uri apiBaseAddress)
|
||||
: base(apiBaseAddress)
|
||||
{
|
||||
this.eventHandler = new ApiEventHandler();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets for the model of the API
|
||||
/// </summary>
|
||||
public T Model
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.model;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if ((value == null && this.model != null) || !value.Equals(this.model))
|
||||
{
|
||||
this.model = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets for the event-handler of the API
|
||||
/// </summary>
|
||||
public ApiEventHandler EventHandler
|
||||
{
|
||||
get { return this.eventHandler; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method send an HTTP-Get for an API
|
||||
/// </summary>
|
||||
/// <param name="parameters">list of GetParameter</param>
|
||||
public void ApiGet(List<UrlParamModel> parameters)
|
||||
{
|
||||
Uri getUrl = this.CreateGetUrl(parameters);
|
||||
this.HttpGet(getUrl, this.DownloadCompleted);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Method implement the deserialization a Xml-API
|
||||
/// </summary>
|
||||
/// <param name="xmlString">content of the API</param>
|
||||
protected abstract void Deserialization(string xmlString);
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Method create the model of the API
|
||||
/// </summary>
|
||||
/// <param name="resultString">content of the API</param>
|
||||
private void CreateModel(string resultString)
|
||||
{
|
||||
if (resultString == null || resultString == string.Empty)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.Deserialization(resultString);
|
||||
this.EventHandler.FireApiReadyevent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the download of the API is completed and create the model
|
||||
/// </summary>
|
||||
/// <param name="sender">Sender of the event</param>
|
||||
/// <param name="e">Arguments of the event</param>
|
||||
private void DownloadCompleted(object sender, DownloadStringCompletedEventArgs e)
|
||||
{
|
||||
Exception downloadError = e.Error;
|
||||
if (downloadError != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string downloadResult = e.Result;
|
||||
if (downloadResult != null && !downloadResult.Equals(string.Empty))
|
||||
{
|
||||
this.CreateModel(downloadResult);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
47
CampusAppWP8/CampusAppWP8/Utility/ApiEventHandler.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ApiEventHandler.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>17.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// This class handle the events of a API <see cref="RestApi{T}"/>
|
||||
/// </summary>
|
||||
public class ApiEventHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiEventHandler" /> class.
|
||||
/// </summary>
|
||||
public ApiEventHandler()
|
||||
{
|
||||
}
|
||||
|
||||
#region Delegate&Events
|
||||
/// <summary>
|
||||
/// Delegate for the ready event
|
||||
/// </summary>
|
||||
public delegate void ApiReadyHandler();
|
||||
|
||||
/// <summary>
|
||||
/// The ready event
|
||||
/// </summary>
|
||||
public event ApiReadyHandler ApiIsReadyEvent;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Method fire a ready event
|
||||
/// </summary>
|
||||
public void FireApiReadyevent()
|
||||
{
|
||||
this.ApiIsReadyEvent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
200
CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs
Normal file
@@ -0,0 +1,200 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="HttpRequest.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------using System;
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class realize the access of restful HttpRequest
|
||||
/// </summary>
|
||||
public abstract class HttpRequest
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// the WebClient, which send the requests
|
||||
/// </summary>
|
||||
private WebClient client;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HttpRequest" /> class.
|
||||
/// </summary>
|
||||
public HttpRequest()
|
||||
{
|
||||
this.client = new WebClient();
|
||||
}
|
||||
|
||||
/// <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.client = new WebClient();
|
||||
this.client.BaseAddress = apiBaseAddress.AbsoluteUri;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-get-method resource
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
public void HttpGet(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
this.client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(action);
|
||||
this.client.DownloadStringAsync(url);
|
||||
}
|
||||
|
||||
/// <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;
|
||||
foreach (UrlParamModel parameter in parameters)
|
||||
{
|
||||
paramterStr += parameter.ToString();
|
||||
}
|
||||
|
||||
string getUrlStr = this.client.BaseAddress + "?" + paramterStr;
|
||||
return new Uri(getUrlStr, UriKind.Absolute);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-delete-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
public void HttpDelete(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-head-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
public void HttpHead(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-options-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
public void HttpOptions(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-connect-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
public void HttpConnect(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-trace-method
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// is not supported by WebClient
|
||||
/// </remarks>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
public void HttpTrace(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-post-method
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <param name="postData">Data which are sending via post to the HttpRequest</param>
|
||||
public void HttpPost(Uri url, Action<object, UploadStringCompletedEventArgs> action, string postData)
|
||||
{
|
||||
this.UploadData(url, action, "POST", postData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-put-method
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <param name="putData">Data which are sending via put to the HttpRequest</param>
|
||||
public void HttpPut(Uri url, Action<object, UploadStringCompletedEventArgs> action, string putData)
|
||||
{
|
||||
this.UploadData(url, action, "PUT", putData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method realize the http-patch-method
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <param name="patchData">Data which are sending via patch to the HttpRequest</param>
|
||||
public void HttpPatch(Uri url, Action<object, UploadStringCompletedEventArgs> action, string patchData)
|
||||
{
|
||||
this.UploadData(url, action, "PATCH", patchData);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Method uploaded Data to the HttpRequest
|
||||
/// </summary>
|
||||
/// <param name="url">Url of the resource</param>
|
||||
/// <param name="action">callback method</param>
|
||||
/// <param name="method">name of APIMethod, how the data will be uploaded</param>
|
||||
/// <param name="data">Data which are sending to the HttpRequest</param>
|
||||
private void UploadData(Uri url, Action<object, UploadStringCompletedEventArgs> action, string method, string data)
|
||||
{
|
||||
this.client.UploadStringCompleted += new UploadStringCompletedEventHandler(action);
|
||||
this.client.UploadStringAsync(url, method, data);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
59
CampusAppWP8/CampusAppWP8/Utility/StringManager.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StringManager.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>06.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.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 + \n</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 - \n</returns
|
||||
public static string RemvoveNewLine(string str)
|
||||
{
|
||||
return str.TrimEnd('\n');
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
84
CampusAppWP8/CampusAppWP8/Utility/XmlApi.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="XmlApi.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This abstract Class is for Xml-API
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type for model of the API</typeparam>
|
||||
public abstract class XmlApi<T> : Api<T>
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Variable for the name of the root-tag
|
||||
/// </summary>
|
||||
private string validRootName;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="XmlApi{T}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="apiBaseAddress">BaseUrl of the API</param>
|
||||
public XmlApi(Uri apiBaseAddress)
|
||||
: base(apiBaseAddress)
|
||||
{
|
||||
this.validRootName = Constants.XMLRootElementName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ValidRootName of the API
|
||||
/// </summary>
|
||||
protected string ValidRootName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.validRootName;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.validRootName)
|
||||
{
|
||||
this.validRootName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method implement the deserialization a Xml-API
|
||||
/// </summary>
|
||||
/// <param name="xmlString">content of the API</param>
|
||||
protected override void Deserialization(string xmlString)
|
||||
{
|
||||
T model = XmlManager.DeserializationToModel<T>(xmlString, this.ValidRootName);
|
||||
if (model != null)
|
||||
{
|
||||
this.Model = model;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
40
CampusAppWP8/CampusAppWP8/Utility/XmlManager.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="XmlManager.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>18.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Class provides some Xml-methods
|
||||
/// </summary>
|
||||
public class XmlManager
|
||||
{
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CampusAppWP8.Model.departments
|
||||
{
|
||||
public class ChairModel : BaseModel
|
||||
{
|
||||
private string _name;
|
||||
|
||||
public ChairModel()
|
||||
{
|
||||
_name = String.Empty;
|
||||
}
|
||||
public ChairModel(string name)
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != _name)
|
||||
{
|
||||
_name = value;
|
||||
NotifyPropertyChanged("chair");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CampusAppWP8.Model.departments
|
||||
{
|
||||
public class FacultyModel : BaseModel
|
||||
{
|
||||
private ObservableCollection<DepartmentModel> _faculties = null;
|
||||
private string _name;
|
||||
public FacultyModel()
|
||||
{
|
||||
this.Faculties = new ObservableCollection<DepartmentModel>();
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
public FacultyModel(string name)
|
||||
{
|
||||
_name = name;
|
||||
this.Faculties = new ObservableCollection<DepartmentModel>();
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
public void LoadData()
|
||||
{
|
||||
this.Faculties.Add(new DepartmentModel("Institut 1"));
|
||||
this.Faculties.Add(new DepartmentModel("Institut 2"));
|
||||
this.Faculties.Add(new DepartmentModel("Institut 3"));
|
||||
this.Faculties.Add(new DepartmentModel("Institut 4"));
|
||||
}
|
||||
|
||||
public ObservableCollection<DepartmentModel> Faculties
|
||||
{
|
||||
get
|
||||
{
|
||||
return _faculties;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != _faculties)
|
||||
{
|
||||
_faculties = value;
|
||||
NotifyPropertyChanged("faculty");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != _name)
|
||||
{
|
||||
_name = value;
|
||||
NotifyPropertyChanged("chair");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ namespace CampusAppWP8.Model.Mensa
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
@@ -22,22 +23,22 @@ namespace CampusAppWP8.Model.Mensa
|
||||
/// Name for bio dinner
|
||||
/// </summary>
|
||||
private string bio = AppResources.MensaApp_NotToday;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Name for 1. dinner
|
||||
/// </summary>
|
||||
private string dinner1 = AppResources.MensaApp_NotToday;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Name for 2. dinner
|
||||
/// </summary>
|
||||
private string dinner2 = AppResources.MensaApp_NotToday;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Name for 3. dinner
|
||||
/// </summary>
|
||||
private string dinner3 = AppResources.MensaApp_NotToday;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Name for 4. dinner
|
||||
/// </summary>
|
||||
@@ -48,6 +49,21 @@ namespace CampusAppWP8.Model.Mensa
|
||||
/// </summary>
|
||||
private string action = AppResources.MensaApp_NotToday;
|
||||
|
||||
/// <summary>
|
||||
/// Name of the day
|
||||
/// </summary>
|
||||
private string dayName;
|
||||
|
||||
/// <summary>
|
||||
/// DateTime of the day
|
||||
/// </summary>
|
||||
private DateTime date;
|
||||
|
||||
/// <summary>
|
||||
/// DateTime of the monday
|
||||
/// </summary>
|
||||
private DateTime monday;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
@@ -57,6 +73,7 @@ namespace CampusAppWP8.Model.Mensa
|
||||
/// </summary>
|
||||
public MenuModel()
|
||||
{
|
||||
this.monday = MenuWeekModel.CalcFirstWeekDay();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -67,7 +84,38 @@ namespace CampusAppWP8.Model.Mensa
|
||||
/// Gets or sets the WeekDay
|
||||
/// </summary>
|
||||
[XmlElement("Wochentag")]
|
||||
public string Day { get; set; }
|
||||
public string Day
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayName;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(value, ref this.dayName);
|
||||
this.CalcDateOfDay();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets of Date
|
||||
/// </summary>
|
||||
public DateTime Date
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.date;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.date)
|
||||
{
|
||||
this.date = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets dinner 1
|
||||
@@ -185,7 +233,35 @@ namespace CampusAppWP8.Model.Mensa
|
||||
{
|
||||
if (value != null && !string.Empty.Equals(value) && !value.Equals(property))
|
||||
{
|
||||
property = value;
|
||||
property = StringManager.StripHTML(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate the DateTime of the MenuDay
|
||||
/// </summary>
|
||||
private void CalcDateOfDay()
|
||||
{
|
||||
switch (this.dayName)
|
||||
{
|
||||
case "Montag":
|
||||
this.date = this.monday;
|
||||
break;
|
||||
case "Diensttag":
|
||||
this.date = this.monday.AddDays(1);
|
||||
break;
|
||||
case "Mittwoch":
|
||||
this.date = this.monday.AddDays(2);
|
||||
break;
|
||||
case "Donnerstag":
|
||||
this.date = this.monday.AddDays(3);
|
||||
break;
|
||||
case "Freitag":
|
||||
this.date = this.monday.AddDays(4);
|
||||
break;
|
||||
default:
|
||||
this.date = this.monday;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CampusAppWP8.Model.Mensa
|
||||
[XmlRoot("root")]
|
||||
public class MenuWeekModel
|
||||
{
|
||||
#region Members
|
||||
/// <summary>
|
||||
/// Time when the model was created
|
||||
/// </summary>
|
||||
@@ -30,6 +31,10 @@ namespace CampusAppWP8.Model.Mensa
|
||||
this.createTime = DateTime.Now;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the menus for the week
|
||||
/// </summary>
|
||||
@@ -37,6 +42,9 @@ namespace CampusAppWP8.Model.Mensa
|
||||
[XmlArrayItem("Tagesmenu")]
|
||||
public ObservableCollection<MenuModel> Menus { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model
|
||||
/// </summary>
|
||||
@@ -47,5 +55,27 @@ namespace CampusAppWP8.Model.Mensa
|
||||
return this.createTime;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate this day of the week, which its gets new menus
|
||||
/// </summary>
|
||||
/// <returns>Date of NewMenuWeekDay</returns>
|
||||
public static DateTime CalcFirstWeekDay()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
while (now.DayOfWeek != DayOfWeek.Monday)
|
||||
{
|
||||
now = now.Subtract(new TimeSpan(1, 0, 0, 0));
|
||||
}
|
||||
|
||||
DateTime monday = new DateTime(now.Year, now.Month, now.Day);
|
||||
return monday;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,89 +42,89 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Row 0 -->
|
||||
<Button Name="TimeTableAppButton" Grid.Row="0" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="TimeTableAppButton" Grid.Row="0" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Schedule, Source={StaticResource ThemelizedIcons}}" Height="100"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.TimeTableApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Name="LectureAppButton" Grid.Row="0" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="LectureAppButton" Grid.Row="0" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenLectureApp">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Lectures, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Name="NewsAppButton" Grid.Row="0" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="NewsAppButton" Grid.Row="0" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenNewsApp">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100"/>
|
||||
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- Row 1 -->
|
||||
<Button Name="MensaAppButton" Grid.Row="1" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="MensaAppButton" Grid.Row="1" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenMensaApp">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Mensa, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Name="CampusMapAppButton" Grid.Row="1" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="CampusMapAppButton" Grid.Row="1" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Campus, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.CampusMapApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Name="HomeworkAppButton" Grid.Row="1" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="HomeworkAppButton" Grid.Row="1" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Mensa, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.HomeworkApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- Row 2 -->
|
||||
<Button Name="DepartmentAppButton" Grid.Row="2" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="DepartmentAppButton" Grid.Row="2" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Departments, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Name="EventAppButton" Grid.Row="2" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="EventAppButton" Grid.Row="2" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenEventsApp">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Name="MailAppButton" Grid.Row="2" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="MailAppButton" Grid.Row="2" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenWebMailApp">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100"/>
|
||||
<Image Source="{Binding Path=ThemelizedIcon.WebMail, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.MailApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- Row 3 -->
|
||||
<Button Name="OpenHoursAppButton" Grid.Row="3" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="OpenHoursAppButton" Grid.Row="3" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenOpeninghoursApp">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100"/>
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Openhours, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.OpenHoursApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Name="OSAAppButton" Grid.Row="3" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="OSAAppButton" Grid.Row="3" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.StudentCouncil, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.OSAApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Name="LinkAppButton" Grid.Row="3" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
|
||||
<Button Name="LinkAppButton" Grid.Row="3" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Link, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
@@ -1,23 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using Windows.UI.Input;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StartPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>21.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the StartPage
|
||||
/// </summary>
|
||||
public partial class StartPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StartPage" /> class.
|
||||
/// </summary>
|
||||
public StartPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.InitializeComponent();
|
||||
|
||||
// if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible)
|
||||
// this.SetIconThemeToDark();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method handle OrientationPage
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
// Switch the placement of the buttons based on an orientation change.
|
||||
@@ -32,11 +49,10 @@ namespace CampusAppWP8.Pages
|
||||
LinkAppButton.SetValue(Grid.RowProperty, 2);
|
||||
LinkAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
ContentPanel.Margin = new Thickness(12, -24, 0, 0);
|
||||
|
||||
}
|
||||
// If not in portrait, move buttonList content to visible row and column.
|
||||
}
|
||||
else
|
||||
{
|
||||
// If not in portrait, move buttonList content to visible row and column.
|
||||
OpenHoursAppButton.SetValue(Grid.RowProperty, 3);
|
||||
OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0);
|
||||
|
||||
@@ -46,8 +62,73 @@ namespace CampusAppWP8.Pages
|
||||
LinkAppButton.SetValue(Grid.RowProperty, 3);
|
||||
LinkAppButton.SetValue(Grid.ColumnProperty, 2);
|
||||
ContentPanel.Margin = new Thickness(12, 0, 0, 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// start the LectureApp
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void OpenLectureApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathLecture_LecturePage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// start the NewsApp
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void OpenNewsApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathNews_NewsIndexPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// start the EventsApp
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void OpenEventsApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathEvents_EventsIndexPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// start the MensaApp
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void OpenMensaApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathMensa_MensaPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// start the WebmailApp
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void OpenWebMailApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathMail_WebMailPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the opening hours page.
|
||||
/// </summary>
|
||||
/// <param name="sender">opening hours button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void OpenOpeninghoursApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathOpeninghours_OpeninghoursPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
}
|
||||
}
|
||||