65 Commits

Author SHA1 Message Date
stubbfel
2f4034a4f2 Merge branch 'release/add#29' into develmaster 2013-06-13 12:14:41 +02:00
stubbfel
ec3fd17234 Merge branch 'feature/#29' into develop 2013-06-13 12:13:17 +02:00
stubbfel
bff8eb07c8 add documention to the models 2013-06-13 12:11:56 +02:00
stubbfel
512d367a7e add docmumentation to the pages 2013-06-13 10:50:37 +02:00
stubbfel
eb533e8008 update lecture 2013-06-12 15:21:16 +02:00
stubbfel
6071f96b3b lecture sendrequest and shows result 2013-06-12 13:07:24 +02:00
stubbfel
72495a5bc5 Merge branch 'hotfix/#30' into develop 2013-06-12 10:57:20 +02:00
stubbfel
84266dfb59 Merge branch 'hotfix/#30' into develmaster 2013-06-12 10:54:55 +02:00
stubbfel
9c973b2b8f resoved issue #30 2013-06-12 10:54:20 +02:00
stubbfel
590cf43751 Merge branch 'pagesdraft' into devel 2013-06-11 16:45:04 +02:00
stubbfel
5b66041f81 chaneg using 2013-06-11 16:44:21 +02:00
stubbfel
9a81b166cd Merge branch 'cf_departments' into pagesdraft
Conflicts:
	CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
	CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml
	CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
	CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs
	CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml
	CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml.cs
	CampusAppWP8/CampusAppWP8/utility/URLList.cs
2013-06-11 16:39:33 +02:00
stubbfel
70a8f7a266 commit department 2013-06-11 15:47:32 +02:00
stubbfel
4bde4a8ba2 Merge branch 'ĺecturepage' into HEAD
Conflicts:
	CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml
2013-06-11 15:37:54 +02:00
stubbfel
66e5bd95b8 Merge branch 'pagesdraft2' into HEAD
Conflicts:
	CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml
2013-06-11 15:35:25 +02:00
stubbfel
8c8d5bc2ce bla 2013-06-11 15:31:52 +02:00
stubbfel
a71a67cd06 finish ResultPage 2013-06-11 15:15:49 +02:00
stubbfel
d935b7c2d9 i18 to ResultDetailPage 2013-06-11 14:14:52 +02:00
Christian Fiedler
61c0a9c736 added startpage icons 2013-06-11 14:02:58 +02:00
stubbfel
4b41d8b764 finish ResultDetailPage 2013-06-11 13:42:20 +02:00
stubbfel
1bf0531e34 add save and load to isolatedstorage 2013-06-11 12:01:57 +02:00
stubbfel
6f92d8f268 finish ModulWepPage 2013-06-11 10:28:05 +02:00
Christian Fiedler
13c2e96867 events and news page changed and commited 2013-06-10 18:50:28 +02:00
stubbfel
faa5dc7440 add resultpage 2013-06-10 18:46:39 +02:00
stubbfel
29bc862035 add resultpage 2013-06-10 18:45:55 +02:00
stubbfel
c2bfc2b1d3 add model 2013-06-10 15:25:35 +02:00
stubbfel
78ff7bf24f add restthhp method 2013-06-10 12:26:11 +02:00
stubbfel
c3a9109a7e add RestApi httpget 2013-06-10 11:27:02 +02:00
Christian Fiedler
1265e916c7 Merge branch 'cf_eventsnews' into cf_departments 2013-06-07 13:32:35 +02:00
Christian Fiedler
586718d983 department stuff 2013-06-07 12:43:54 +02:00
stubbfel
ffa0d8a009 finish #25 2013-06-06 16:07:11 +02:00
stubbfel
04695ee32f model can calc date of week date 2013-06-06 15:51:43 +02:00
stubbfel
159dab18f3 mensamodec remove html tags 2013-06-06 15:14:46 +02:00
stubbfel
4ef5e7995b add Stringmanager 2013-06-06 15:12:27 +02:00
stubbfel
fa9f3c0fe2 adjust gui mensa 2013-06-06 15:03:30 +02:00
stubbfel
bdf7e8d379 commit add icon asstes 2013-06-04 15:21:49 +02:00
stubbfel
19c175a881 add doc to model,feed 2013-06-04 15:16:55 +02:00
stubbfel
5ba33e7261 add docs to utilty 2013-06-04 12:46:33 +02:00
stubbfel
1b3ff185a1 correction 2013-06-03 18:57:21 +02:00
stubbfel
f48b6a79e0 remove tepfiles 2013-06-03 18:52:19 +02:00
stubbfel
75a30578ed extend Utilty 2013-06-03 18:41:10 +02:00
Christian Fiedler
a5c37eef1e update 2013-06-03 11:34:49 +02:00
Christian Fiedler
c60fb42122 added events, sort events by date, added link in news and events 2013-05-31 18:36:59 +02:00
stubbfel
9444c1a2eb correct merge 2013-05-30 15:48:02 +02:00
stubbfel
23e4f23002 Merge branch 'cf_eventsnews' into pagesdraft
Conflicts:
	CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
	CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml
	CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
2013-05-30 15:47:32 +02:00
stubbfel
d70e3da558 test commit 2013-05-30 15:33:26 +02:00
stubbfel
4912aff6c4 extends Utiliy 2013-05-30 15:14:39 +02:00
Christian Fiedler
3d3e507849 update 2013-05-30 15:08:12 +02:00
stubbfel
1b0ebe3f98 updtade feedutlilty 2013-05-29 16:12:22 +02:00
stubbfel
072da70474 correct csproj -file 2013-05-29 10:31:03 +02:00
stubbfel
db68565d94 correct csproj -file 2013-05-29 10:14:36 +02:00
Christian Fiedler
3fafe262d5 News works with RSSFeed. link is not in 2013-05-28 14:34:24 +02:00
stubbfel
3c8fb4781b add departmentpage and modell 2013-05-28 14:00:22 +02:00
stubbfel
787e0dcab0 update pagedraft 2013-05-28 11:21:44 +02:00
stubbfel
3c2b9acc29 add mappage 2013-05-28 11:04:48 +02:00
stubbfel
89e020fdf2 Merge branch 'webmailpagedraft' into pagesdraft 2013-05-27 18:49:12 +02:00
stubbfel
02d9b31841 Merge branch 'mensamranch' into pagesdraft
Conflicts:
	CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
	CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml
	CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
2013-05-27 18:43:51 +02:00
stubbfel
074e3b6b79 add lecturepage 2013-05-27 18:21:37 +02:00
stubbfel
d864cc4425 add mensamodel 2013-05-27 17:15:03 +02:00
stubbfel
81cb710309 first draft 2013-05-27 13:06:03 +02:00
Christian Fiedler
80ec85297b initial commit 2013-05-24 12:50:52 +02:00
stubbfel
eca2bc91fb update webmail 2013-05-24 12:09:22 +02:00
stubbfel
6b7af1058b update startpage 2013-05-24 11:17:10 +02:00
stubbfel
852b2b881a add Landscape Orientation and Link to webmail 2013-05-23 15:49:03 +02:00
stubbfel
2463d1ad57 add new startpage 2013-05-22 16:16:10 +02:00
98 changed files with 6148 additions and 539 deletions

View File

@@ -1,20 +1,21 @@
<Application
x:Class="CampusAppWP8.App"
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:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
x:Class="CampusAppWP8.App"
>
<!--Anwendungsressourcen-->
<Application.Resources>
<local:LocalizedStrings xmlns:local="clr-namespace:CampusAppWP8" x:Key="LocalizedStrings"/>
<local:LocalizedStrings xmlns:local="clr-namespace:CampusAppWP8" x:Key="LocalizedStrings"/>
</Application.Resources>
<Application.ApplicationLifetimeObjects>
<!--Erforderliches Objekt, das Lebensdauerereignisse der Anwendung behandelt-->
<shell:PhoneApplicationService
Launching="Application_Launching" Closing="Application_Closing"
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
<shell:PhoneApplicationService
Launching="Application_Launching" Closing="Application_Closing"
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
</Application.ApplicationLifetimeObjects>
</Application>

View File

@@ -7,29 +7,14 @@ using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWP8.Resources;
using CampusAppWP8.ViewModels;
using System.IO.IsolatedStorage;
namespace CampusAppWP8
{
public partial class App : Application
{
private static MainViewModel viewModel = null;
/// <summary>
/// Eine statisches ViewModel, an das die Ansichten gebunden werden.
/// </summary>
/// <returns>MainViewModel-Objekt.</returns>
public static MainViewModel ViewModel
{
get
{
// Erstellung des Ansichtsmodells verzögern bis erforderlich
if (viewModel == null)
viewModel = new MainViewModel();
return viewModel;
}
}
/// <summary>
/// Bietet einen einfachen Zugriff auf den Stammframe der Phone-Anwendung.
@@ -75,6 +60,37 @@ 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);
}
// 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)
@@ -85,11 +101,7 @@ namespace CampusAppWP8
// Dieser Code wird beim ersten Starten der Anwendung nicht ausgeführt
private void Application_Activated(object sender, ActivatedEventArgs e)
{
// Sicherstellen, dass der Anwendungszustand ordnungsgemäß wiederhergestellt wird
if (!App.ViewModel.IsDataLoaded)
{
App.ViewModel.LoadData();
}
}
// Code, der ausgeführt werden soll, wenn die Anwendung deaktiviert wird (in den Hintergrund gebracht wird)

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -1,177 +1,326 @@
<?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>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\x86\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\ARM\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\ARM\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="LocalizedStrings.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.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="ViewModels\ItemViewModel.cs" />
<Compile Include="ViewModels\MainViewModel.cs" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<DesignData Include="SampleData\MainViewModelSampleData.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</DesignData>
</ItemGroup>
<ItemGroup>
<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>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Phone.Controls.Toolkit">
<HintPath>..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
</Reference>
</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="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\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\Mensa\MenuModel.cs" />
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
<Compile Include="Pages\Campusmap\CampusMapPage.xaml.cs">
<DependentUpon>CampusMapPage.xaml</DependentUpon>
</Compile>
<Compile Include="Feed\Lecture\LectureFeed.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\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\RestApi.cs" />
<Compile Include="Utility\StringManager.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\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\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\campus_159_dark.png" />
<Content Include="Assets\icons\campus_159_light.png" />
<Content Include="Assets\icons\departments_159_dark.png" />
<Content Include="Assets\icons\departments_159_light.png" />
<Content Include="Assets\icons\homework_159_dark.png" />
<Content Include="Assets\icons\homework_159_light.png" />
<Content Include="Assets\icons\link_159_dark.png" />
<Content Include="Assets\icons\link_159_light.png" />
<Content Include="Assets\icons\lectures_159_dark.png" />
<Content Include="Assets\icons\lectures_159_light.png" />
<Content Include="Assets\icons\mensa_159_dark.png" />
<Content Include="Assets\icons\mensa_159_light.png" />
<Content Include="Assets\icons\news_159_dark.png" />
<Content Include="Assets\icons\news_159_light.png" />
<Content Include="Assets\icons\openhours_159_dark.png" />
<Content Include="Assets\icons\openhours_159_light.png" />
<Content Include="Assets\icons\schedule_159_dark.png" />
<Content Include="Assets\icons\schedule_159_light.png" />
<Content Include="Assets\icons\student_council_159_dark.png" />
<Content Include="Assets\icons\student_council_159_light.png" />
<Content Include="Assets\icons\webmail_159_dark.png" />
<Content Include="Assets\icons\webmail_159_light.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>
</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>

View 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.Feed.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;
}
}
}

View 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.Feed.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;
}
}
}

View File

@@ -0,0 +1,67 @@
//-----------------------------------------------------------------------
// <copyright file="LectureFeed.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>13.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Lecture
{
using System;
using CampusAppWP8.Model.Lecture;
using CampusAppWP8.Utility;
/// <summary>
/// Class for the feed of the Lecture
/// </summary>
/// <remarks>
/// need the XmlAPI
/// </remarks>
public class LectureFeed : XmlFeed<LectureList>
{
/// <summary>
/// Initializes a new instance of the <see cref="LectureFeed" /> class.
/// </summary>
/// <param name="url">the RequestUrl</param>
public LectureFeed(Uri url)
: base(url, "Lecture.xml")
{
this.validRootName = "lsf_auszug";
}
/// <summary>
/// Method create the RequestUrl
/// </summary>
/// <remarks>
/// have to refactors
/// </remarks>
/// <param name="semester">value of the semester</param>
/// <param name="degree">value of the degree</param>
/// <param name="course">value of the course</param>
/// <param name="from">value of the from</param>
/// <param name="to">value of the to</param>
/// <returns>return the requestUrl</returns>
public static Uri CreateFeedUrl(string semester, string degree, string course, string from, string to)
{
return new Uri("http://www.zv.tu-cottbus.de/LSFveranst/LSF4?Semester=" + semester + "&Abschluss=" + degree + "&Studiengang=" + course + "&Von=" + from + "&Bis=" + to);
}
/// <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;
}
}
}

View File

@@ -0,0 +1,81 @@
//-----------------------------------------------------------------------
// <copyright file="MensaFeed.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Mensa
{
using System;
using System.Collections.ObjectModel;
using CampusAppWP8.Model.Mensa;
using CampusAppWP8.Utility;
/// <summary>
/// This Class is for MesaFeeds
/// </summary>
public class MensaFeed : XmlFeed<MenuWeekModel>
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MensaFeed" /> class.
/// </summary>
public MensaFeed()
: base(URLList.MensaFeedURL, FileList.MensaXmlFile)
{
}
#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>
/// Method check if the last modification was later as the NewMenuWeekDay
/// </summary>
/// <param name="lastModified">Date of the last modification</param>
/// <returns>true, if is up-to-date, otherwise false</returns>
private bool CheckIsUpToDate(DateTime lastModified)
{
int diff = lastModified.CompareTo(MenuWeekModel.CalcFirstWeekDay());
if (diff < 0)
{
return false;
}
return true;
}
#endregion
#endregion
}
}

View 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.Feed.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;
}
}
}

View File

@@ -1,81 +0,0 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.MainPage"
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"
mc:Ignorable="d"
d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<!-- HINWEIS ZUR LOKALISIERUNG:
Um die angezeigten Zeichenfolgen zu lokalisieren, kopieren Sie die Werte in
die richtig benannten Schlüssel in der Datei der neutralen Ressourcensprache der App (AppResources.resx), und
ersetzen Sie den hartcodierten Textwert zwischen den Anführungszeichen des Attributs
mit der Bindungsklausel, deren Pfad auf diesen Zeichenfolgennamen verweist.
Zum Beispiel:
Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
Diese Bindung verweist auf die Zeichenfolgenressource der Vorlage mit der Bezeichnung "ApplicationTitle".
Werden auf der Registerkarte mit den Projekteigenschaften unterstützte Sprachen hinzugefügt, wird
pro Sprache eine neue resx-Datei erstellt. In dieser können die übersetzten Werte der
Zeichenfolgen der Benutzeroberfläche gespeichert werden. Die Bindung in diesen Beispielen führt dazu, dass der Wert der
Attribute aus der RESX-Datei entnommen wird, die
CurrentUICulture der App zur Laufzeit entspricht.
-->
<!--Pivotsteuerelement-->
<phone:Pivot Title="{Binding Path=LocalizedResources.WelcomeString, Source={StaticResource LocalizedStrings}}">
<!--Pivotelement eins-->
<phone:PivotItem Header="first">
<!--Zweizeilige Liste mit Textumbruch-->
<phone:LongListSelector Margin="0,0,-12,0" ItemsSource="{Binding Items}">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,0,0,17">
<TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
<TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
</phone:PivotItem>
<!--Pivotelement zwei-->
<phone:PivotItem Header="second">
<!--Doppelzeilige Liste ohne Textumbruch-->
<phone:LongListSelector Margin="0,0,-12,0" ItemsSource="{Binding Items}">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,0,0,17">
<TextBlock Text="{Binding LineOne}" TextWrapping="NoWrap" Margin="12,0,0,0" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
<TextBlock Text="{Binding LineThree}" TextWrapping="NoWrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
</phone:PivotItem>
</phone:Pivot>
<!--Auskommentieren, um ein Ausrichtungsraster anzuzeigen und sicherzustellen, dass Ihre Steuerelemente
an den allgemeinen Grenzen ausgerichtet sind. Das Bild hat oben einen Rand von -32 px wegen
der Taskleiste. Legen Sie dies auf 0 fest (oder entfernen Sie den Rand komplett),
wenn die Taskleiste ausgeblendet wird.
Entfernen Sie vor dem Versand dieses XAML und das Bild selbst.-->
<!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" IsHitTestVisible="False" />-->
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -1,53 +0,0 @@
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 CampusAppWP8.Resources;
namespace CampusAppWP8
{
public partial class MainPage : PhoneApplicationPage
{
// Konstruktor
public MainPage()
{
InitializeComponent();
// Datenkontext des Listenfeldsteuerelements auf die Beispieldaten festlegen
DataContext = App.ViewModel;
// Beispielcode zur Lokalisierung der ApplicationBar
//BuildLocalizedApplicationBar();
}
// Daten für die ViewModel-Elemente laden
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!App.ViewModel.IsDataLoaded)
{
App.ViewModel.LoadData();
}
}
// Beispielcode zur Erstellung einer lokalisierten ApplicationBar
//private void BuildLocalizedApplicationBar()
//{
// // ApplicationBar der Seite einer neuen Instanz von ApplicationBar zuweisen
// ApplicationBar = new ApplicationBar();
// // Eine neue Schaltfläche erstellen und als Text die lokalisierte Zeichenfolge aus AppResources zuweisen.
// ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative));
// appBarButton.Text = AppResources.AppBarButtonText;
// ApplicationBar.Buttons.Add(appBarButton);
// // Ein neues Menüelement mit der lokalisierten Zeichenfolge aus AppResources erstellen
// ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
// ApplicationBar.MenuItems.Add(appBarMenuItem);
//}
}
}

View 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");
}
}
}
}
}

View File

@@ -0,0 +1,86 @@
using System;
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
{
public class DepartmentModel : BaseModel
{
[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();
}
public DepartmentModel(string name)
{
this.visible = Visibility.Collapsed;
_name = name;
this.Chairs = new ObservableCollection<ChairModel>();
//this.LoadData();
}
public void LoadData()
{
this.Chairs.Add(new ChairModel("LS 1"));
this.Chairs.Add(new ChairModel("LS 2"));
this.Chairs.Add(new ChairModel("LS 3"));
this.Chairs.Add(new ChairModel("LS 4"));
}
public ObservableCollection<ChairModel> Chairs
{
get
{
return _chairs;
}
set
{
if (value != _chairs)
{
_chairs = value;
NotifyPropertyChanged("department");
}
}
}
public string Name
{
get
{
return _name;
}
set
{
if (value != _name)
{
_name = value;
NotifyPropertyChanged("chair");
}
}
}
public Visibility Visible
{
get { return this.visible; }
set
{
if (value != this.visible)
{
this.visible = value;
}
}
}
}
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace CampusAppWP8.Model.Departments
{
[XmlRoot("root")]
public class DepartmentViewModel : BaseViewModel
{
[XmlArray("professorships")]
[XmlArrayItem("faculty")]
public ObservableCollection<FacultyModel> _faculties { get; set; }
public DepartmentViewModel()
{
this.Faculties = new ObservableCollection<FacultyModel>();
}
public ObservableCollection<FacultyModel> Faculties
{
get
{
return _faculties;
}
set
{
if (value != _faculties)
{
_faculties = value;
NotifyPropertyChanged("foodDays");
}
}
}
}
}

View 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");
}
}
}
}
}

View 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");
}
}
}
}
}

View 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;
}
}
}

View 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");
}
}
}
}
}

View File

@@ -0,0 +1,215 @@
//-----------------------------------------------------------------------
// <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 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 += tmpLecturer.ToString() + "\n";
}
this.LecturerString = result.TrimEnd('\n');
}
/// <summary>
/// Method create a formatted string of the CourseList
/// </summary>
public void CreateCourseString()
{
string result = string.Empty;
foreach (LectureCourse course in this.Course)
{
result += course.Title + "\n";
}
this.CourseString = result.TrimEnd('\n');
}
#endregion
}
}

View 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; }
}
}

View 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; }
}
}

View 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;
}
}
}

View 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
}
}

View 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.UrlLectureModulBaseAddr + this.number.ToString());
}
#endregion
}
}

View File

@@ -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; }
}
}

View File

@@ -0,0 +1,52 @@
<phone:PhoneApplicationPage xmlns:Controls="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
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:Location="clr-namespace:System.Device.Location;assembly=System.Device"
x:Class="CampusAppWP8.Pages.Campusmap.CampusMapPage"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
OrientationChanged="PhoneApplicationPage_OrientationChanged"
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 LocalizedResources.CampusMapApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
</StackPanel>
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" />
<Image Grid.Column="1" Source="/Toolkit.Content/ApplicationBar.Check.png" />
</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>
</Grid>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,24 @@
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;
namespace CampusAppWP8.Pages.Campusmap
{
public partial class CampusMapPage : PhoneApplicationPage
{
public CampusMapPage()
{
InitializeComponent();
}
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
}
}
}

View File

@@ -0,0 +1,62 @@
<phone:PhoneApplicationPage
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"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
OrientationChanged="PhoneApplicationPage_OrientationChanged"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>
<viewModel:DepartmentViewModel x:Key="DepartmentViewModel" x:Name="DepartmentView" />
</phone:PhoneApplicationPage.Resources>
<!-- LayoutRoot -->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.DataContext>
<viewModel:DepartmentViewModel />
</Grid.DataContext>
<!-- 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 Path=Name, Mode=OneWay}" />
</DataTemplate>
</phone:Pivot.HeaderTemplate>
<phone:Pivot.ItemTemplate>
<DataTemplate>
<!-- TEMPORARILY REMOVED, will be abck in soon
<phone:LongListSelector ItemsSource="{Binding Faculties}">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel>
<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>
-->
</DataTemplate>
</phone:Pivot.ItemTemplate>
</phone:Pivot>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,130 @@
using CampusAppWP8.Feed.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();
}
}
}
}
}

View 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>

View File

@@ -0,0 +1,105 @@
using CampusAppWP8.Pages.Events;
using CampusAppWP8.Model.events_news;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
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.Feed.Events;
namespace CampusAppWP8.Pages.Events
{
/// <summary>
/// Overview page of all events.
/// </summary>
public partial class EventIndexPage : PhoneApplicationPage
{
/// <summary>
/// Event Feed object, which contains the rss models and data.
/// </summary>
public static EventFeed eventFeed { get; set; }
/// <summary>
/// Default constructor.
/// </summary>
public EventIndexPage()
{
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);
// Set handler and load the fees informations.
EventIndexPage.eventFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupEventPageList);
EventIndexPage.eventFeed.LoadFeed();
}
/// <summary>
/// Is called after the rss feeds are loaded into the eventFeed model.
/// If there was no feed informations 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 += EventRowAppButton_Click;
tempBtn.Tag = i;
this.ButtonPanel.Items.Add(tempBtn);
}
}
}
/// <summary>
/// Return the eventFeed object.
/// </summary>
static public EventFeed GetEventFeed
{
get { return EventIndexPage.eventFeed; }
set { }
}
/// <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));
}
}
}

View File

@@ -0,0 +1,50 @@
<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>
<TextBlock x:Name="EventHeadline" 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="EventText" Text="{Binding Path=Text, Mode=OneWay}" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="24" />
</ScrollViewer>
<Button Name="EventHome" Content="{Binding Path=LocalizedResources.NewsHomeBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="2" 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="2" VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="EventLink_Click"/>
</Grid>
</DataTemplate>
</phone:Pivot.ItemTemplate>
</phone:Pivot>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,97 @@
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
using System;
using System.Linq;
using System.Windows;
using System.Windows.Navigation;
namespace CampusAppWP8.Pages.Events
{
/// <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>
/// Default constructor.
/// </summary>
public EventPage()
{
InitializeComponent();
}
/// <summary>
/// On navigation to this page.
/// The pivotitem source will be set, if it wasn't befor.
/// Navigating to the submited index of the choosen pivotitem page.
/// </summary>
/// <param name="e"></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 = "";
// 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
WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = new Uri(fe.Tag.ToString(), UriKind.Absolute);
webBrowserTask.Show();
}
}
}

View File

@@ -0,0 +1,171 @@
<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-->
<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>
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
</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 Source="/Toolkit.Content/ApplicationBar.Select.png" Width="100">
</Image>
</Button>
</Border>
</Grid>
</ScrollViewer>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,168 @@
//-----------------------------------------------------------------------
// <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.Navigation;
using CampusAppWP8.Feed.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
{
/// <summary>
/// actual LectureFeed
/// </summary>
private LectureFeed feed;
/// <summary>
/// List for the courses of the BTU
/// </summary>
/// <remarks>
/// need to be extend to full list
/// </remarks>
private List<ListPickerItemModel> courseList = new List<ListPickerItemModel>()
{
new ListPickerItemModel()
{
Text = "Architektur", Value = "013"
},
new ListPickerItemModel()
{
Text = "Bauingenieurwesen", Value = "017"
},
new ListPickerItemModel()
{
Text = "Betriebswirtschaftslehre", Value = "021"
}
};
/// <summary>
/// List of the degrees
/// </summary>
private List<ListPickerItemModel> degreeList = new List<ListPickerItemModel>()
{
new ListPickerItemModel()
{
Text = AppResources.Degree_Bachelor, Value = "82"
},
new ListPickerItemModel()
{
Text = AppResources.Degree_Master, Value = "88"
},
new ListPickerItemModel()
{
Text = AppResources.Degree_Diploma, Value = "11"
}
};
/// <summary>
/// List of the semester
/// </summary>
private List<ListPickerItemModel> semesterList = new List<ListPickerItemModel>()
{
new ListPickerItemModel()
{
Text = "SoSe 13", Value = "20131"
},
new ListPickerItemModel()
{
Text = "WiSe 13/14", Value = "20132"
},
new ListPickerItemModel()
{
Text = "SoSe 14", Value = "20141"
}
};
/// <summary>
/// List for the number of semester
/// </summary>
private List<ListPickerItemModel> numberList = new List<ListPickerItemModel>()
{
new ListPickerItemModel()
{
Text = "1", Value = "1"
},
new ListPickerItemModel()
{
Text = "2", Value = "2"
},
new ListPickerItemModel()
{
Text = "3", Value = "3"
},
new ListPickerItemModel()
{
Text = "4", Value = "4"
}
};
/// <summary>
/// Initializes a new instance of the <see cref="LecturePage" /> class.
/// </summary>
public LecturePage()
{
this.InitializeComponent();
this.SetupListPickers();
}
/// <summary>
/// Method sets the ItemSource of the ListPickers
/// </summary>
private void SetupListPickers()
{
this.Course.ItemsSource = this.courseList;
this.Degree.ItemsSource = this.degreeList;
this.From.ItemsSource = this.numberList;
this.To.ItemsSource = this.numberList;
this.Semester.ItemsSource = this.semesterList;
}
/// <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)
{
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;
Uri request = LectureFeed.CreateFeedUrl(semester.Value, degree.Value, course.Value, from.Value, to.Value);
this.feed = new LectureFeed(request);
this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady);
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
this.feed.LoadFeed();
}
/// <summary>
/// Method will be execute if the feed is ready
/// </summary>
private void FeedIsReady()
{
App.SaveToIsolatedStorage<LectureList>(Constants.IsolatedStorageLectureModel, this.feed.Model);
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
Uri url = new Uri(Constants.PathResultPage, UriKind.Relative);
NavigationService.Navigate(url);
}
}
}

View 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>

View 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.UrlLectureModulBaseAddr" />
/// </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.ParamLectureModulNumber))
{
string number = NavigationContext.QueryString[Constants.ParamLectureModulNumber];
this.WebmailBrowser.Navigate(new Uri(Constants.UrlLectureModulBaseAddr + number, UriKind.Absolute));
}
base.OnNavigatedTo(e);
}
}
}

View File

@@ -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 Modul.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>

View File

@@ -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.ParamLectureActivityId))
{
string activityId = NavigationContext.QueryString[Constants.ParamLectureActivityId];
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.IsolatedStorageLectureModel);
if (list != null)
{
LectureActivity activity = list.GetActivity(activityId);
activity.CreateLectureString();
activity.CreateCourseString();
this.ContentPanel.DataContext = activity;
}
}
}
}

View 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 Modul.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>

View File

@@ -0,0 +1,151 @@
//-----------------------------------------------------------------------
// <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>
/// Reference of the button which was lastClicked
/// </summary>
private Button lastClickedButton;
/// <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.IsolatedStorageLectureModel);
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;
if (this.lastClickedButton != null && !this.lastClickedButton.Equals(button))
{
this.HideOptions(parent);
}
this.lastClickedButton = button;
Button link = (Button)parent.FindName("Link");
Button details = (Button)parent.FindName("Details");
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;
Uri url = new Uri(Constants.PathLectureModulWebPage + "?" + Constants.ParamLectureModulNumber + "=" + 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;
Uri url = new Uri(Constants.PathResultDetailPage + "?" + Constants.ParamLectureActivityId + "=" + btn.Tag, UriKind.Relative);
NavigationService.Navigate(url);
}
}
}

View 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>

View File

@@ -0,0 +1,109 @@
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 CampusAppWP8.Model.events_news;
using CampusAppWP8.Utility;
using CampusAppWP8.Resources;
using System.Collections.ObjectModel;
using CampusAppWP8.Pages.News;
using CampusAppWP8.Feed.News;
namespace CampusAppWP8.Pages.News
{
/// <summary>
/// Overview page of all news.
/// </summary>
public partial class NewsIndexPage : PhoneApplicationPage
{
/// <summary>
/// News Feed object, which contains the rss models and data.
/// </summary>
public static NewsFeed newsFeed { get; set; }
/// <summary>
/// Default constructor.
/// </summary>
public NewsIndexPage()
{
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);
// Set handler and load the fees informations.
NewsIndexPage.newsFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupNewsPageList);
NewsIndexPage.newsFeed.LoadFeed();
}
/// <summary>
/// Is called after the rss feeds are loaded into the newsFeed model.
/// If there was no feed informations 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 += NewsRowAppButton_Click;
tempBtn.Tag = i;
this.ButtonPanel.Items.Add(tempBtn);
}
}
}
/// <summary>
/// Return the newsFeed object.
/// </summary>
static public NewsFeed GetNewsFeed
{
get { return NewsIndexPage.newsFeed; }
set { }
}
/// <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));
}
}
}

View File

@@ -0,0 +1,50 @@
<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="100"/>
<RowDefinition Height="*"/>
<RowDefinition Height="90"/>
</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>
<Button Name="NewsHome" Content="{Binding Path=LocalizedResources.NewsHomeBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="2" 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="2" VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="NewsLink_Click"/>
</Grid>
</DataTemplate>
</phone:Pivot.ItemTemplate>
</phone:Pivot>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,108 @@
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.Xml.Linq;
using System.Xml;
using System.IO;
using Microsoft.Phone.Tasks;
using CampusAppWP8.Model.events_news;
using CampusAppWP8.Utility;
using CampusAppWP8.Resources;
namespace CampusAppWP8.Pages.News
{
/// <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>
/// Default constructor.
/// </summary>
public NewsPage()
{
InitializeComponent();
}
/// <summary>
/// On navigation to this page.
/// The pivotitem source will be set, if it wasn't befor.
/// Navigating to the submited index of the choosen pivotitem page.
/// </summary>
/// <param name="e"></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.ItemsSource = NewsIndexPage.GetNewsFeed.Model.Channel[0].item;
this.isSourceSet = true;
}
}
string pivotIndex = "";
// 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
WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = new Uri(fe.Tag.ToString(), UriKind.Absolute);
webBrowserTask.Show();
}
}
}

View File

@@ -0,0 +1,33 @@
<phone:PhoneApplicationPage
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"
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>
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
<StackPanel Grid.Row="0" Margin="12,17,0,28"/>
<!--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>

View 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.UrlWebMailAddr, UriKind.Absolute));
}
}
}

View File

@@ -13,7 +13,7 @@
<Capability Name="ID_CAP_ISV_CAMERA" />
</Capabilities>
<Tasks>
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
<DefaultTask Name="_default" NavigationPage="pages/Lecture/LecturePage.xaml" />
</Tasks>
<Tokens>
<PrimaryToken TokenID="CampusAppWP8Token" TaskName="_default">

View File

@@ -79,7 +79,7 @@ namespace CampusAppWP8.Resources {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die MEINE ANWENDUNG ähnelt.
/// Sucht eine lokalisierte Zeichenfolge, die BTU CampusApp ähnelt.
/// </summary>
public static string ApplicationTitle {
get {
@@ -87,6 +87,348 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt.
/// </summary>
public static string CampusMapApp_Title {
get {
return ResourceManager.GetString("CampusMapApp_Title", resourceCulture);
}
}
/// <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>
public static string DepartmentApp_Title {
get {
return ResourceManager.GetString("DepartmentApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Events ähnelt.
/// </summary>
public static string EventApp_Title {
get {
return ResourceManager.GetString("EventApp_Title", resourceCulture);
}
}
/// <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 Hausaufgaben ähnelt.
/// </summary>
public static string HomeworkApp_Title {
get {
return ResourceManager.GetString("HomeworkApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt.
/// </summary>
public static string LectureApp_Course {
get {
return ResourceManager.GetString("LectureApp_Course", resourceCulture);
}
}
/// <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>
public static string LectureApp_Degree {
get {
return ResourceManager.GetString("LectureApp_Degree", resourceCulture);
}
}
/// <summary>
/// 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 {
return ResourceManager.GetString("LectureApp_LectureName", resourceCulture);
}
}
/// <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>
public static string LectureApp_Semester {
get {
return ResourceManager.GetString("LectureApp_Semester", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Fachsemester ähnelt.
/// </summary>
public static string LectureApp_Term {
get {
return ResourceManager.GetString("LectureApp_Term", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Vorlesungen ähnelt.
/// </summary>
public static string LectureApp_Title {
get {
return ResourceManager.GetString("LectureApp_Title", resourceCulture);
}
}
/// <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>
public static string LinkApp_Title {
get {
return ResourceManager.GetString("LinkApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Webmail ähnelt.
/// </summary>
public static string MailApp_Title {
get {
return ResourceManager.GetString("MailApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Aktion ähnelt.
/// </summary>
public static string MensaApp_Action {
get {
return ResourceManager.GetString("MensaApp_Action", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Bio ähnelt.
/// </summary>
public static string MensaApp_Bio {
get {
return ResourceManager.GetString("MensaApp_Bio", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 1 ähnelt.
/// </summary>
public static string MensaApp_Dinner1 {
get {
return ResourceManager.GetString("MensaApp_Dinner1", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt.
/// </summary>
public static string MensaApp_Dinner2 {
get {
return ResourceManager.GetString("MensaApp_Dinner2", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt.
/// </summary>
public static string MensaApp_Dinner3 {
get {
return ResourceManager.GetString("MensaApp_Dinner3", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Essen 4 ähnelt.
/// </summary>
public static string MensaApp_Dinner4 {
get {
return ResourceManager.GetString("MensaApp_Dinner4", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die 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>
public static string MensaApp_NotToday {
get {
return ResourceManager.GetString("MensaApp_NotToday", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Mensaplan ähnelt.
/// </summary>
public static string MensaApp_Title {
get {
return ResourceManager.GetString("MensaApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die News ähnelt.
/// </summary>
public static string NewsApp_Title {
get {
return ResourceManager.GetString("NewsApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die zur Übersicht ähnelt.
/// </summary>
public static string NewsHomeBtn {
get {
return ResourceManager.GetString("NewsHomeBtn", resourceCulture);
}
}
/// <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>
public static string OpenHoursApp_Title {
get {
return ResourceManager.GetString("OpenHoursApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Fachschaften ähnelt.
/// </summary>
public static string OSAApp_Title {
get {
return ResourceManager.GetString("OSAApp_Title", resourceCulture);
}
}
/// <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>
@@ -114,6 +456,60 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Freitag ähnelt.
/// </summary>
public static string Time_Day_Friday {
get {
return ResourceManager.GetString("Time_Day_Friday", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Montag ähnelt.
/// </summary>
public static string Time_Day_Monday {
get {
return ResourceManager.GetString("Time_Day_Monday", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Donnerstag ähnelt.
/// </summary>
public static string Time_Day_Thursday {
get {
return ResourceManager.GetString("Time_Day_Thursday", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Dienstag ähnelt.
/// </summary>
public static string Time_Day_Tuesday {
get {
return ResourceManager.GetString("Time_Day_Tuesday", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Mittwoch ähnelt.
/// </summary>
public static string Time_Day_Wednesday {
get {
return ResourceManager.GetString("Time_Day_Wednesday", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Stundenplan ähnelt.
/// </summary>
public static string TimeTableApp_Title {
get {
return ResourceManager.GetString("TimeTableApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Willkommen zur BTU-CampusApp WP8 ähnelt.
/// </summary>

View File

@@ -126,7 +126,7 @@
<comment>Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language.</comment>
</data>
<data name="ApplicationTitle" xml:space="preserve">
<value>MEINE ANWENDUNG</value>
<value>BTU CampusApp</value>
</data>
<data name="SampleProperty" xml:space="preserve">
<value>Beispielwert für die Laufzeiteigenschaft</value>
@@ -140,4 +140,136 @@
<data name="WelcomeString" xml:space="preserve">
<value>Willkommen zur BTU-CampusApp WP8</value>
</data>
<data name="CampusMapApp_Title" xml:space="preserve">
<value>Campusplan</value>
</data>
<data name="DepartmentApp_Title" xml:space="preserve">
<value>Lehrstühle</value>
</data>
<data name="EventApp_Title" xml:space="preserve">
<value>Events</value>
</data>
<data name="HomeworkApp_Title" xml:space="preserve">
<value>Hausaufgaben</value>
</data>
<data name="LectureApp_Title" xml:space="preserve">
<value>Vorlesungen</value>
</data>
<data name="LinkApp_Title" xml:space="preserve">
<value>Links</value>
</data>
<data name="MailApp_Title" xml:space="preserve">
<value>Webmail</value>
</data>
<data name="MensaApp_Title" xml:space="preserve">
<value>Mensaplan</value>
</data>
<data name="NewsApp_Title" xml:space="preserve">
<value>News</value>
</data>
<data name="OpenHoursApp_Title" xml:space="preserve">
<value>Öffnungszeiten</value>
</data>
<data name="OSAApp_Title" xml:space="preserve">
<value>Fachschaften</value>
</data>
<data name="TimeTableApp_Title" xml:space="preserve">
<value>Stundenplan</value>
</data>
<data name="LectureApp_Course" xml:space="preserve">
<value>Studiengang</value>
</data>
<data name="LectureApp_Degree" xml:space="preserve">
<value>Abschluss</value>
</data>
<data name="LectureApp_LectureName" xml:space="preserve">
<value>Veranstaltungsname</value>
</data>
<data name="LectureApp_Semester" xml:space="preserve">
<value>Semester</value>
</data>
<data name="LectureApp_Term" xml:space="preserve">
<value>Fachsemester</value>
</data>
<data name="Time_Day_Friday" xml:space="preserve">
<value>Freitag</value>
</data>
<data name="Time_Day_Monday" xml:space="preserve">
<value>Montag</value>
</data>
<data name="Time_Day_Thursday" xml:space="preserve">
<value>Donnerstag</value>
</data>
<data name="Time_Day_Tuesday" xml:space="preserve">
<value>Dienstag</value>
</data>
<data name="Time_Day_Wednesday" xml:space="preserve">
<value>Mittwoch</value>
</data>
<data name="MensaApp_Action" xml:space="preserve">
<value>Aktion</value>
</data>
<data name="MensaApp_Bio" xml:space="preserve">
<value>Bio</value>
</data>
<data name="MensaApp_Dinner1" xml:space="preserve">
<value>Essen 1</value>
</data>
<data name="MensaApp_Dinner2" xml:space="preserve">
<value>Essen 2</value>
</data>
<data name="MensaApp_Dinner3" xml:space="preserve">
<value>Essen 2</value>
</data>
<data name="MensaApp_Dinner4" xml:space="preserve">
<value>Essen 4</value>
</data>
<data name="MensaApp_NotToday" xml:space="preserve">
<value>Heute nicht im Angbot</value>
</data>
<data name="NewsHomeBtn" xml:space="preserve">
<value>zur Übersicht</value>
</data>
<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>
</root>

View File

@@ -0,0 +1,153 @@
//------------------------------------------------------------------------------
// <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;
/// <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()]
internal class Constants {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Constants() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWP8.Resources.Constants", typeof(Constants).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die LectureModel ähnelt.
/// </summary>
internal static string IsolatedStorageLectureModel {
get {
return ResourceManager.GetString("IsolatedStorageLectureModel", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ActivityId ähnelt.
/// </summary>
internal static string ParamLectureActivityId {
get {
return ResourceManager.GetString("ParamLectureActivityId", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ModulNumber ähnelt.
/// </summary>
internal static string ParamLectureModulNumber {
get {
return ResourceManager.GetString("ParamLectureModulNumber", 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/Lecture/ModulWebPage.xaml ähnelt.
/// </summary>
internal static string PathLectureModulWebPage {
get {
return ResourceManager.GetString("PathLectureModulWebPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/ResultDetailPage.xaml ähnelt.
/// </summary>
internal static string PathResultDetailPage {
get {
return ResourceManager.GetString("PathResultDetailPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/ResultPage.xaml ähnelt.
/// </summary>
internal static string PathResultPage {
get {
return ResourceManager.GetString("PathResultPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die https://www.tu-cottbus.de/modul/ ähnelt.
/// </summary>
internal static string UrlLectureModulBaseAddr {
get {
return ResourceManager.GetString("UrlLectureModulBaseAddr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die https://webmail.tu-cottbus.de ähnelt.
/// </summary>
internal static string UrlWebMailAddr {
get {
return ResourceManager.GetString("UrlWebMailAddr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die root ähnelt.
/// </summary>
internal static string XMLRootElementName {
get {
return ResourceManager.GetString("XMLRootElementName", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,150 @@
<?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="IsolatedStorageLectureModel" xml:space="preserve">
<value>LectureModel</value>
</data>
<data name="ParamLectureActivityId" xml:space="preserve">
<value>ActivityId</value>
</data>
<data name="ParamLectureModulNumber" xml:space="preserve">
<value>ModulNumber</value>
</data>
<data name="ParamUrl" xml:space="preserve">
<value>Url</value>
</data>
<data name="PathLectureModulWebPage" xml:space="preserve">
<value>/Pages/Lecture/ModulWebPage.xaml</value>
</data>
<data name="PathResultDetailPage" xml:space="preserve">
<value>/Pages/Lecture/ResultDetailPage.xaml</value>
</data>
<data name="UrlLectureModulBaseAddr" xml:space="preserve">
<value>https://www.tu-cottbus.de/modul/</value>
</data>
<data name="XMLRootElementName" xml:space="preserve">
<value>root</value>
</data>
<data name="UrlWebMailAddr" xml:space="preserve">
<value>https://webmail.tu-cottbus.de</value>
</data>
<data name="PathResultPage" xml:space="preserve">
<value>/Pages/Lecture/ResultPage.xaml</value>
</data>
</root>

View File

@@ -1,16 +0,0 @@
<vm:MainViewModel
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:CampusAppWP8.ViewModels"
SampleProperty="Beispielwert für die Texteigenschaft">
<vm:MainViewModel.Items>
<vm:ItemViewModel LineOne="Design eins" LineTwo="Maecenas praesent accumsan bibendum" LineThree="Maecenas praesent accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur"/>
<vm:ItemViewModel LineOne="Design zwei" LineTwo="Dictumst eleifend facilisi faucibus" LineThree="Pharetra placerat pulvinar sagittis senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent"/>
<vm:ItemViewModel LineOne="Design drei" LineTwo="Habitant inceptos interdum lobortis" LineThree="Accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur pharetra placerat"/>
<vm:ItemViewModel LineOne="Design vier" LineTwo="Nascetur pharetra placerat pulvinar" LineThree="Pulvinar sagittis senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent accumsan bibendum"/>
<vm:ItemViewModel LineOne="Design fünf" LineTwo="Sagittis senectus sociosqu suscipit" LineThree="Dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur pharetra placerat pulvinar sagittis"/>
<vm:ItemViewModel LineOne="Design sechs" LineTwo="Torquent ultrices vehicula volutpat" LineThree="Senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent accumsan bibendum dictumst eleifend"/>
</vm:MainViewModel.Items>
</vm:MainViewModel>

View File

@@ -0,0 +1,181 @@
//-----------------------------------------------------------------------
// <copyright file="RestApi.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.Net;
/// <summary>
/// Class realize the access of restful RestAPI
/// </summary>
public abstract class RestApi
{
#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="RestApi" /> class.
/// </summary>
public RestApi()
{
this.client = new WebClient();
}
/// <summary>
/// Initializes a new instance of the <see cref="RestApi" /> class.
/// </summary>
/// <param name="apiBaseAddress">the url of the RestAPI base address</param>
public RestApi(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 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-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 HttpHead(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
{
throw new NotSupportedException();
}
/// <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 HttpOptions(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
{
throw new NotSupportedException();
}
/// <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 HttpConnect(Uri url, Action<object, DownloadStringCompletedEventArgs> action)
{
throw new NotSupportedException();
}
/// <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 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 RestAPI</param>
public void HttpPost(Uri url, Action<object, UploadStringCompletedEventArgs> action, string postData)
{
this.UploadData(url, action, "POST", postData);
}
/// <summary>
/// Method realize the http-get-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 RestAPI</param>
public void HttpPut(Uri url, Action<object, UploadStringCompletedEventArgs> action, string putData)
{
this.UploadData(url, action, "PUT", putData);
}
/// <summary>
/// Method realize the http-get-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 RestAPI</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 RestAPI
/// </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 RestAPI</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
}
}

View File

@@ -0,0 +1,40 @@
//-----------------------------------------------------------------------
// <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);
}
#endregion
}
}

View File

@@ -1,88 +0,0 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
namespace CampusAppWP8.ViewModels
{
public class ItemViewModel : INotifyPropertyChanged
{
private string _lineOne;
/// <summary>
/// ViewModel-Beispieleigenschaft. Diese Eigenschaft wird in der Ansicht verwendet, um den Wert unter Verwendung einer Bindung anzuzeigen.
/// </summary>
/// <returns></returns>
public string LineOne
{
get
{
return _lineOne;
}
set
{
if (value != _lineOne)
{
_lineOne = value;
NotifyPropertyChanged("LineOne");
}
}
}
private string _lineTwo;
/// <summary>
/// ViewModel-Beispieleigenschaft. Diese Eigenschaft wird in der Ansicht verwendet, um den Wert unter Verwendung einer Bindung anzuzeigen.
/// </summary>
/// <returns></returns>
public string LineTwo
{
get
{
return _lineTwo;
}
set
{
if (value != _lineTwo)
{
_lineTwo = value;
NotifyPropertyChanged("LineTwo");
}
}
}
private string _lineThree;
/// <summary>
/// ViewModel-Beispieleigenschaft. Diese Eigenschaft wird in der Ansicht verwendet, um den Wert unter Verwendung einer Bindung anzuzeigen.
/// </summary>
/// <returns></returns>
public string LineThree
{
get
{
return _lineThree;
}
set
{
if (value != _lineThree)
{
_lineThree = value;
NotifyPropertyChanged("LineThree");
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (null != handler)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}

View File

@@ -1,94 +0,0 @@
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using CampusAppWP8.Resources;
namespace CampusAppWP8.ViewModels
{
public class MainViewModel : INotifyPropertyChanged
{
public MainViewModel()
{
this.Items = new ObservableCollection<ItemViewModel>();
}
/// <summary>
/// Eine Auflistung für ItemViewModel-Objekte.
/// </summary>
public ObservableCollection<ItemViewModel> Items { get; private set; }
private string _sampleProperty = "Sample Runtime Property Value";
/// <summary>
/// ViewModel-Beispieleigenschaft. Diese Eigenschaft wird in der Ansicht verwendet, um den Wert unter Verwendung einer Bindung anzuzeigen
/// </summary>
/// <returns></returns>
public string SampleProperty
{
get
{
return _sampleProperty;
}
set
{
if (value != _sampleProperty)
{
_sampleProperty = value;
NotifyPropertyChanged("SampleProperty");
}
}
}
/// <summary>
/// Beispieleigenschaft, die eine lokalisierte Zeichenfolge zurückgibt
/// </summary>
public string LocalizedSampleProperty
{
get
{
return AppResources.SampleProperty;
}
}
public bool IsDataLoaded
{
get;
private set;
}
/// <summary>
/// Erstellt und fügt einige ItemViewModel-Objekte zur Items-Auflistung hinzu.
/// </summary>
public void LoadData()
{
// Beispieldaten. Durch echte Daten ersetzen
this.Items.Add(new ItemViewModel() { LineOne = "runtime one", LineTwo = "Maecenas praesent accumsan bibendum", LineThree = "Facilisi faucibus habitant inceptos interdum lobortis nascetur pharetra placerat pulvinar sagittis senectus sociosqu" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime two", LineTwo = "Dictumst eleifend facilisi faucibus", LineThree = "Suscipit torquent ultrices vehicula volutpat maecenas praesent accumsan bibendum dictumst eleifend facilisi faucibus" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime three", LineTwo = "Habitant inceptos interdum lobortis", LineThree = "Habitant inceptos interdum lobortis nascetur pharetra placerat pulvinar sagittis senectus sociosqu suscipit torquent" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime four", LineTwo = "Nascetur pharetra placerat pulvinar", LineThree = "Ultrices vehicula volutpat maecenas praesent accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime five", LineTwo = "Maecenas praesent accumsan bibendum", LineThree = "Maecenas praesent accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime six", LineTwo = "Dictumst eleifend facilisi faucibus", LineThree = "Pharetra placerat pulvinar sagittis senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime seven", LineTwo = "Habitant inceptos interdum lobortis", LineThree = "Accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur pharetra placerat" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime eight", LineTwo = "Nascetur pharetra placerat pulvinar", LineThree = "Pulvinar sagittis senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent accumsan bibendum" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime nine", LineTwo = "Maecenas praesent accumsan bibendum", LineThree = "Facilisi faucibus habitant inceptos interdum lobortis nascetur pharetra placerat pulvinar sagittis senectus sociosqu" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime ten", LineTwo = "Dictumst eleifend facilisi faucibus", LineThree = "Suscipit torquent ultrices vehicula volutpat maecenas praesent accumsan bibendum dictumst eleifend facilisi faucibus" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime eleven", LineTwo = "Habitant inceptos interdum lobortis", LineThree = "Habitant inceptos interdum lobortis nascetur pharetra placerat pulvinar sagittis senectus sociosqu suscipit torquent" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime twelve", LineTwo = "Nascetur pharetra placerat pulvinar", LineThree = "Ultrices vehicula volutpat maecenas praesent accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime thirteen", LineTwo = "Maecenas praesent accumsan bibendum", LineThree = "Maecenas praesent accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime fourteen", LineTwo = "Dictumst eleifend facilisi faucibus", LineThree = "Pharetra placerat pulvinar sagittis senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime fifteen", LineTwo = "Habitant inceptos interdum lobortis", LineThree = "Accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur pharetra placerat" });
this.Items.Add(new ItemViewModel() { LineOne = "runtime sixteen", LineTwo = "Nascetur pharetra placerat pulvinar", LineThree = "Pulvinar sagittis senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent accumsan bibendum" });
this.IsDataLoaded = true;
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (null != handler)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}

View File

@@ -0,0 +1,39 @@
//-----------------------------------------------------------------------
// <copyright file="BaseModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model
{
using System;
using System.ComponentModel;
/// <summary>
/// This Class provide a basic model
/// </summary>
/// <remarks>
/// not necessary, maybe delete => deprecated
/// </remarks>
public class BaseModel : INotifyPropertyChanged
{
/// <summary>
/// The PropertyChangedEvent
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// Method fire PropertyChangedEvents
/// </summary>
/// <param name="propertyName">name of the property</param>
public void NotifyPropertyChanged(string propertyName)
{
PropertyChangedEventHandler handler = this.PropertyChanged;
if (null != handler)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}

View File

@@ -0,0 +1,39 @@
//-----------------------------------------------------------------------
// <copyright file="BaseViewModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model
{
using System;
using System.ComponentModel;
/// <summary>
/// This Class provide a basic ViewModel
/// </summary>
/// <remarks>
/// not necessary, maybe delete => deprecated
/// </remarks>
public class BaseViewModel : INotifyPropertyChanged
{
/// <summary>
/// The PropertyChangedEvent
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// Method fire PropertyChangedEvents
/// </summary>
/// <param name="propertyName">name of the property</param>
public void NotifyPropertyChanged(string propertyName)
{
PropertyChangedEventHandler handler = this.PropertyChanged;
if (null != handler)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}

View File

@@ -0,0 +1,269 @@
//-----------------------------------------------------------------------
// <copyright file="MenuModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Mensa
{
using System;
using System.Xml.Serialization;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// Model for menu
/// </summary>
public class MenuModel
{
#region Member
/// <summary>
/// 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>
private string dinner4 = AppResources.MensaApp_NotToday;
/// <summary>
/// Name for action dinner
/// </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
/// <summary>
/// Initializes a new instance of the <see cref="MenuModel" /> class.
/// </summary>
public MenuModel()
{
this.monday = MenuWeekModel.CalcFirstWeekDay();
}
#endregion
#region Property
/// <summary>
/// Gets or sets the WeekDay
/// </summary>
[XmlElement("Wochentag")]
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
/// </summary>
[XmlElement("Essen1")]
public string Dinner1
{
get
{
return this.dinner1;
}
set
{
this.SetValue(value, ref this.dinner1);
}
}
/// <summary>
/// Gets or sets dinner 2
/// </summary>
[XmlElement("Essen2")]
public string Dinner2
{
get
{
return this.dinner2;
}
set
{
this.SetValue(value, ref this.dinner2);
}
}
/// <summary>
/// Gets or sets dinner 3
/// </summary>
[XmlElement("Essen3")]
public string Dinner3
{
get
{
return this.dinner3;
}
set
{
this.SetValue(value, ref this.dinner3);
}
}
/// <summary>
/// Gets or sets dinner 4
/// </summary>
[XmlElement("Essen4")]
public string Dinner4
{
get
{
return this.dinner4;
}
set
{
this.SetValue(value, ref this.dinner4);
}
}
/// <summary>
/// Gets or sets dinner bio
/// </summary>
[XmlElement("Bio")]
public string Bio
{
get
{
return this.bio;
}
set
{
this.SetValue(value, ref this.bio);
}
}
/// <summary>
/// Gets or sets dinner action
/// </summary>
[XmlElement("Aktionstag")]
public string Action
{
get
{
return this.action;
}
set
{
this.SetValue(value, ref this.action);
}
}
#endregion
#region Method
/// <summary>
/// Methods sets the property
/// </summary>
/// <remarks> maybe move to base class</remarks>
/// <param name="value">new property value</param>
/// <param name="property">name of the property</param>
private void SetValue(string value, ref string property)
{
if (value != null && !string.Empty.Equals(value) && !value.Equals(property))
{
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
}
}

View File

@@ -0,0 +1,81 @@
//-----------------------------------------------------------------------
// <copyright file="MenuWeekModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Mensa
{
using System;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
/// <summary>
/// Model for menus in one week
/// </summary>
[XmlRoot("root")]
public class MenuWeekModel
{
#region Members
/// <summary>
/// Time when the model was created
/// </summary>
private readonly DateTime createTime;
/// <summary>
/// Initializes a new instance of the <see cref="MenuWeekModel" /> class.
/// </summary>
public MenuWeekModel()
{
this.createTime = DateTime.Now;
}
#endregion
#region Constructor
/// <summary>
/// Gets or sets the menus for the week
/// </summary>
[XmlArray("BTU")]
[XmlArrayItem("Tagesmenu")]
public ObservableCollection<MenuModel> Menus { get; set; }
#endregion
#region Proberty
/// <summary>
/// Gets the creation time of the model
/// </summary>
public DateTime CreateTime
{
get
{
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
}
}

View File

@@ -0,0 +1,148 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.StartPage"
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"
OrientationChanged="PhoneApplicationPage_OrientationChanged"
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.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
</StackPanel>
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
<Grid x:Name="ContentPanel" Margin="12,0,0,0" Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkTimetable" Source="/Assets/icons/schedule_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightTimetable" Source="/Assets/icons/schedule_159_light.png" Height="100" Visibility="Visible"/>
<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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkLectures" Source="/Assets/icons/lectures_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightLectures" Source="/Assets/icons/lectures_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkNews" Source="/Assets/icons/news_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightNews" Source="/Assets/icons/news_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkMensa" Source="/Assets/icons/mensa_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightMensa" Source="/Assets/icons/mensa_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkCampus" Source="/Assets/icons/campus_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightCampus" Source="/Assets/icons/campus_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkHomework" Source="/Assets/icons/homework_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightHomework" Source="/Assets/icons/homework_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkDepartments" Source="/Assets/icons/departments_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightDepartments" Source="/Assets/icons/departments_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkEvents" Source="/Assets/icons/news_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightEvents" Source="/Assets/icons/news_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkWebmail" Source="/Assets/icons/webmail_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightWebmail" Source="/Assets/icons/webmail_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkOpenhours" Source="/Assets/icons/openhours_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightOpenhours" Source="/Assets/icons/openhours_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkStudentcouncil" Source="/Assets/icons/student_council_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightStudentcouncil" Source="/Assets/icons/student_council_159_light.png" 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">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkLink" Source="/Assets/icons/link_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightLink" Source="/Assets/icons/link_159_light.png" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
</Grid>
<!-- <Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" /> -->
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,85 @@
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;
namespace CampusAppWP8.Pages
{
public partial class StartPage : PhoneApplicationPage
{
public StartPage()
{
InitializeComponent();
if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible)
this.SetIconThemeToDark();
}
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
// Switch the placement of the buttons based on an orientation change.
if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight)
{
OpenHoursAppButton.SetValue(Grid.RowProperty, 0);
OpenHoursAppButton.SetValue(Grid.ColumnProperty, 3);
OSAAppButton.SetValue(Grid.RowProperty, 1);
OSAAppButton.SetValue(Grid.ColumnProperty, 3);
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
{
OpenHoursAppButton.SetValue(Grid.RowProperty, 3);
OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0);
OSAAppButton.SetValue(Grid.RowProperty, 3);
OSAAppButton.SetValue(Grid.ColumnProperty, 1);
LinkAppButton.SetValue(Grid.RowProperty, 3);
LinkAppButton.SetValue(Grid.ColumnProperty, 2);
ContentPanel.Margin = new Thickness(12, 0, 0, 0);
}
}
private void SetIconThemeToDark()
{
this.ImgLightCampus.Visibility = Visibility.Collapsed;
this.ImgLightDepartments.Visibility = Visibility.Collapsed;
this.ImgLightEvents.Visibility = Visibility.Collapsed;
this.ImgLightHomework.Visibility = Visibility.Collapsed;
this.ImgLightLectures.Visibility = Visibility.Collapsed;
this.ImgLightLink.Visibility = Visibility.Collapsed;
this.ImgLightMensa.Visibility = Visibility.Collapsed;
this.ImgLightNews.Visibility = Visibility.Collapsed;
this.ImgLightOpenhours.Visibility = Visibility.Collapsed;
this.ImgLightStudentcouncil.Visibility = Visibility.Collapsed;
this.ImgLightTimetable.Visibility = Visibility.Collapsed;
this.ImgLightWebmail.Visibility = Visibility.Collapsed;
this.ImgDarkCampus.Visibility = Visibility.Visible;
this.ImgDarkDepartments.Visibility = Visibility.Visible;
this.ImgDarkEvents.Visibility = Visibility.Visible;
this.ImgDarkHomework.Visibility = Visibility.Visible;
this.ImgDarkLectures.Visibility = Visibility.Visible;
this.ImgDarkLink.Visibility = Visibility.Visible;
this.ImgDarkMensa.Visibility = Visibility.Visible;
this.ImgDarkNews.Visibility = Visibility.Visible;
this.ImgDarkOpenhours.Visibility = Visibility.Visible;
this.ImgDarkStudentcouncil.Visibility = Visibility.Visible;
this.ImgDarkTimetable.Visibility = Visibility.Visible;
this.ImgDarkWebmail.Visibility = Visibility.Visible;
}
}
}

View File

@@ -0,0 +1,135 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.Mensa.MensaPage"
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"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<!--Pivotsteuerelement-->
<phone:Pivot Name="MensaPivot" Title="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}">
<phone:Pivot.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Day}" />
</DataTemplate>
</phone:Pivot.HeaderTemplate>
<phone:Pivot.ItemTemplate>
<DataTemplate>
<StackPanel Margin="12,0,12,0">
<TextBlock Text="{Binding Date, StringFormat='{}{0:dd.MM.yyyy}'}"/>
<ScrollViewer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Dinner 1 -->
<Border Grid.Row="0" Background="{x:Null}" BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,0,0,0" Padding="0,12,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding Path=LocalizedResources.MensaApp_DinnerLabelW, Source={StaticResource LocalizedStrings}}" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Dinner1, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" />
<TextBlock Text=" : "/>
</StackPanel>
<TextBlock Grid.Column="2" Text="{Binding Dinner1}" TextWrapping="Wrap"/>
</Grid>
</Border>
<!-- Dinner 2 -->
<Border Grid.Row="1" Background="{x:Null}" BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding Path=LocalizedResources.MensaApp_DinnerLabelW, Source={StaticResource LocalizedStrings}}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Dinner2, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" />
<TextBlock Text=" : "/>
</StackPanel>
<TextBlock Grid.Column="2" Text="{Binding Dinner2}" TextWrapping="Wrap"/>
</Grid>
</Border>
<!-- Dinner 3 -->
<Border Grid.Row="2" Background="{x:Null}" BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding Path=LocalizedResources.MensaApp_DinnerLabelW, Source={StaticResource LocalizedStrings}}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Dinner3, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" />
<TextBlock Text=" : "/>
</StackPanel>
<TextBlock Grid.Column="2" Text="{Binding Dinner3}" TextWrapping="Wrap"/>
</Grid>
</Border>
<!-- Dinner 4 -->
<Border Grid.Row="3" Background="{x:Null}" BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding Path=LocalizedResources.MensaApp_DinnerLabelW, Source={StaticResource LocalizedStrings}}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Dinner4, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" />
<TextBlock Text=" : "/>
</StackPanel>
<TextBlock Grid.Column="2" Text="{Binding Dinner4}" TextWrapping="Wrap"/>
</Grid>
</Border>
<!-- Bio-->
<Border Grid.Row="4" Background="{x:Null}" BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding Path=LocalizedResources.MensaApp_DinnerLabelW, Source={StaticResource LocalizedStrings}}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Bio, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" />
<TextBlock Text=" : "/>
</StackPanel>
<TextBlock Grid.Column="1" Text="{Binding Bio}" TextWrapping="Wrap"/>
</Grid>
</Border>
<Border Grid.Row="5" Background="{x:Null}" BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding Path=LocalizedResources.MensaApp_DinnerLabelW, Source={StaticResource LocalizedStrings}}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Action, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" />
<TextBlock Text=" : "/>
</StackPanel>
<TextBlock Grid.Column="2" Text="{Binding Action}" TextWrapping="Wrap"/>
</Grid>
</Border>
</Grid>
</ScrollViewer>
</StackPanel>
</DataTemplate>
</phone:Pivot.ItemTemplate>
</phone:Pivot>
<!-- <Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" /> -->
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,137 @@
//-----------------------------------------------------------------------
// <copyright file="MensaPage.xaml.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Pages.Mensa
{
using System;
using System.Windows.Navigation;
using CampusAppWP8.Feed.Mensa;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
/// <summary>
/// Class for the MensaPage
/// </summary>
public partial class MensaPage : PhoneApplicationPage
{
#region Members
/// <summary>
/// the feed of the mensa
/// </summary>
private MensaFeed feed;
/// <summary>
/// Index representing the weekday of today
/// 0 - Monday(Default)
/// 1 - Tuesday
/// 2 - Wednesday
/// 3 - Thursday
/// 4 - Friday
/// </summary>
private int selectedIndex;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MensaPage" /> class.
/// </summary>
public MensaPage()
{
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();
}
this.feed.LoadFeed();
}
#region private
/// <summary>
/// Method initialize the Feed
/// </summary>
private void InitializeFeed()
{
this.feed = new MensaFeed();
this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady);
this.CalcSelectedIndex();
}
#endregion
/// <summary>
/// Method will be execute if the feed is ready
/// </summary>
private void FeedIsReady()
{
this.SetupMensaPivot();
}
/// <summary>
/// Method set ItemSource and SelectedIndex for the pivot
/// </summary>
private void SetupMensaPivot()
{
this.MensaPivot.ItemsSource = this.feed.Model.Menus;
this.MensaPivot.SelectedIndex = this.selectedIndex;
}
/// <summary>
/// Method calculate which pivot has to be selected
/// </summary>
private void CalcSelectedIndex()
{
DayOfWeek today = DateTime.Now.DayOfWeek;
int todayIndex;
switch (today)
{
case DayOfWeek.Monday:
todayIndex = 0;
break;
case DayOfWeek.Tuesday:
todayIndex = 1;
break;
case DayOfWeek.Wednesday:
todayIndex = 2;
break;
case DayOfWeek.Thursday:
todayIndex = 3;
break;
case DayOfWeek.Friday:
todayIndex = 4;
break;
default:
todayIndex = 0;
break;
}
this.selectedIndex = todayIndex;
}
#endregion
#endregion
}
}

View File

@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CampusAppWP8.Pages.news
{
class RSSItem
{
private string title;
private string text;
private DateTime timestamp;
public string Title
{
get { return this.title; }
set { this.title = value; }
}
public string Text
{
get { return this.text; }
set { this.text = HTMLUnicodeToString(value); }
}
public string Timestamp
{
get { return this.timestamp.ToString("R"); }
set { this.timestamp = DateTime.Parse(value); }
}
public string Date
{
get { return String.Format("{0:ddd, dd.MM.yyyy}", this.timestamp); }
}
public string Time
{
get { return String.Format("{0:h:mm} Uhr", this.timestamp); }
}
private string HTMLUnicodeToString(string htmluni)
{
StringBuilder retValue = new StringBuilder();
for(int i = 0; i < htmluni.Length; i++)
{
switch (htmluni[i])
{
case '&':
{
int startOff = i + 2;
int endOff = htmluni.IndexOf(';', startOff);
string sub = htmluni.Substring(startOff, endOff - startOff);
int cVal = int.Parse(sub);
switch (cVal)
{
case 128:
retValue.Append('€');
break;
default:
retValue.Append((char)cVal);
break;
}
i = endOff;
}
break;
case '<':
{
i = htmluni.IndexOf('>', i);
}
break;
case '\t':
break;
default:
{
retValue.Append(htmluni[i]);
}
break;
}
}
return retValue.ToString();
}
}
}

View File

@@ -0,0 +1,28 @@
<UserControl
x:Class="CampusAppWP8.Pages.news.RSSNewsTemplate"
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}"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="*"/>
<RowDefinition Height="90"/>
</Grid.RowDefinitions>
<TextBlock x:Name="NewsHeadline" Text="(headline)" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="42"/>
<ScrollViewer Grid.Row="1">
<TextBlock x:Name="NewsText" Text="(text)" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="24" />
</ScrollViewer>
<Button Name="NewsHome" Content="{Binding Path=LocalizedResources.NewsHomeBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="2" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Windows.Foundation;
using Windows.Foundation.Collections;
namespace CampusAppWP8.Pages.news
{
public partial class RSSNewsTemplate : UserControl
{
public RSSNewsTemplate()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,248 @@
//-----------------------------------------------------------------------
// <copyright file="Feed.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
using System.Net;
/// <summary>
/// This a abstract Class for reading, store and deserialization Feeds from the Web.
/// </summary>
/// <typeparam name="T">Type for model of the feed</typeparam>
public abstract class Feed<T>:RestApi
{
#region Member
/// <summary>
/// URL of the feed
/// </summary>
private readonly Uri feedURL;
/// <summary>
/// EventHandler of the feed
/// </summary>
private readonly FeedEventHandler eventHandler;
/// <summary>
/// Filename for the storage-file of the feed
/// </summary>
private readonly string fileName;
/// <summary>
/// The model of the feed
/// </summary>
private T model;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="Feed{T}" /> class.
/// </summary>
public Feed()
{
this.eventHandler = new FeedEventHandler();
}
/// <summary>
/// Initializes a new instance of the <see cref="Feed{T}" /> class.
/// </summary>
/// <param name="feedURL">Url of the Feed</param>
/// <param name="fileName">Name of the file, which the feed will be stored</param>
public Feed(Uri feedURL, string fileName)
{
this.feedURL = feedURL;
this.eventHandler = new FeedEventHandler();
this.fileName = fileName;
}
#endregion
#region Proberty
/// <summary>
/// Gets for the url of the feed
/// </summary>
public Uri FeedURL
{
get { return this.feedURL; }
}
/// <summary>
/// Gets for the event-handler of the feed
/// </summary>
public FeedEventHandler EventHandler
{
get { return this.eventHandler; }
}
/// <summary>
/// Gets or sets for the model of the feed
/// </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 storage-file of the feed
/// </summary>
public string FileName
{
get { return this.fileName; }
}
#endregion
#region Methods
#region public
/// <summary>
/// Method load the feed with content. At first is try to load from model, then from file and at last from the web.
/// </summary>
public void LoadFeed()
{
if (this.IsModelUpToDate())
{
return;
}
if (this.IsFileUpToDate())
{
this.LoadFile();
}
else
{
this.DownloadFeed();
}
}
#endregion
#region protected
/// <summary>
/// The abstract method check if the content of the file is up-to-date, its has to implement by subclasses
/// </summary>
/// <returns>true if its up-to-date, otherwise false</returns>
protected abstract bool CheckIsFileUpToDate();
/// <summary>
/// The abstract method check if the content of the model is up-to-date, its has to implement by subclasses
/// </summary>
/// <returns>true if its up-to-date, otherwise false</returns>
protected abstract bool CheckIsModelUpToDate();
/// <summary>
/// The abstract method convert feed to a model, its has to implement by subclasses
/// </summary>
/// <param name="feedString">content of the feed</param>
protected abstract void Deserialization(string feedString);
#endregion
#region private
/// <summary>
/// Method load content from the file and create the model
/// </summary>
private void LoadFile()
{
string feedString = FileManager.ReadFile(this.FileName);
this.CreateModel(feedString);
}
/// <summary>
/// Method load content from the web
/// </summary>
private void DownloadFeed()
{
this.HttpGet(this.FeedURL, this.DownloadCompleted);
}
/// <summary>
/// Method check if the content of the file is up-to-date
/// </summary>
/// <returns>true if its up-to-date, otherwise false</returns>
private bool IsFileUpToDate()
{
if (!FileManager.ExistsFile(this.FileName))
{
return false;
}
return this.CheckIsFileUpToDate();
}
/// <summary>
/// Method check if the content of the model is up-to-date
/// </summary>
/// <returns>true if its up-to-date, otherwise false</returns>
private bool IsModelUpToDate()
{
if (this.Model != null)
{
return this.CheckIsModelUpToDate();
}
return false;
}
/// <summary>
/// Method will be execute if the download of the feed 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);
FileManager.WriteFile(this.FileName, downloadResult);
}
}
/// <summary>
/// Method create the model of the feed
/// </summary>
/// <param name="feedString">content of the feed</param>
private void CreateModel(string feedString)
{
if (feedString == null || feedString == string.Empty)
{
return;
}
this.Deserialization(feedString);
this.EventHandler.FireFeedReadyevent();
}
#endregion
#endregion
}
}

View File

@@ -0,0 +1,51 @@
//-----------------------------------------------------------------------
// <copyright file="FeedEventHandler.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
/// <summary>
/// This class handle the events of a feed <see cref="Feed{T}"/>
/// </summary>
public class FeedEventHandler
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="FeedEventHandler" /> class.
/// </summary>
public FeedEventHandler()
{
}
#endregion
#region Delegate&Events
/// <summary>
/// Delegate for the ready event
/// </summary>
public delegate void FeedReadyHandler();
/// <summary>
/// The ready event
/// </summary>
public event FeedReadyHandler FeedIsReadyEvent;
#endregion
#region Method
/// <summary>
/// Method fire a ready event
/// </summary>
public void FireFeedReadyevent()
{
this.FeedIsReadyEvent();
}
#endregion
}
}

View File

@@ -0,0 +1,29 @@
//-----------------------------------------------------------------------
// <copyright file="FileList.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/// <summary>
/// Class contain some default names of files
/// </summary>
/// <remarks>
/// This Class may be become to a resource file
/// </remarks>
public static class FileList
{
/// <summary>
/// Name of the file for the feed of the mensa
/// </summary>
public static readonly string MensaXmlFile = "MesaFeed.xml";
}
}

View File

@@ -0,0 +1,114 @@
//-----------------------------------------------------------------------
// <copyright file="FileManager.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
using System.IO;
using System.Text;
using Windows.Storage;
/// <summary>
/// This a static Class, which provide some method for files
/// </summary>
public static class FileManager
{
#region members
/// <summary>
/// Member for the local folder
/// </summary>
private static readonly IStorageFolder LocalFolder = ApplicationData.Current.LocalFolder;
#endregion
#region public
/// <summary>
/// Method write a content to an file
/// </summary>
/// <param name="fileName">name of the file</param>
/// <param name="content">content of the file</param>
public static void WriteFile(string fileName, string content)
{
WriteFileAsync(fileName, content);
}
/// <summary>
/// Method read content from a file
/// </summary>
/// <remarks>
/// Method crash sometimes by OpenStreamForReadAsync() or OpenAccessStream()
/// </remarks>
/// <param name="fileName">name of the file</param>
/// <returns>content of the file, null if file doesn't exist</returns>
public static string ReadFile(string fileName)
{
string content = null;
if (!ExistsFile(fileName))
{
return null;
}
using (Stream fileStream = LocalFolder.OpenStreamForReadAsync(fileName).Result)
{
using (StreamReader streamReader = new StreamReader(fileStream))
{
content = streamReader.ReadToEnd();
}
}
return content;
}
/// <summary>
/// Method return info of a file
/// </summary>
/// <param name="fileName">name of the file</param>
/// <returns>info of the file</returns>
public static FileInfo GetFileInfo(string fileName)
{
FileInfo info = new FileInfo(LocalFolder.Path + "\\" + fileName);
return info;
}
/// <summary>
/// Method check if a file is existing
/// </summary>
/// <param name="fileName">name of the file</param>
/// <returns>true if file exists, otherwise false</returns>
public static bool ExistsFile(string fileName)
{
return GetFileInfo(fileName).Exists;
}
#endregion
#region private
/// <summary>
/// Method write a content to a new file. If the file exists, it will be replaced
/// </summary>
/// <remarks>
/// Method crash sometimes by OpenStreamForWriteAsync() or OpenAccessStream()
/// </remarks>
/// <param name="fileName">name of the file</param>
/// <param name="content">content of the file</param>
private static async void WriteFileAsync(string fileName, string content)
{
IStorageFile storageFile = await LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);
using (Stream stream = await storageFile.OpenStreamForWriteAsync())
{
byte[] contentByte = Encoding.UTF8.GetBytes(content);
await stream.WriteAsync(contentByte, 0, contentByte.Length);
}
}
#endregion
}
}

View File

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

View File

@@ -0,0 +1,30 @@
//-----------------------------------------------------------------------
// <copyright file="URLList.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
/// <summary>
/// Class contain some default url of feeds
/// </summary>
/// <remarks>
/// This Class may be become to a resource file
/// </remarks>
public static class URLList
{
/// <summary>
/// Url for the feed of the mensa
/// </summary>
public static readonly Uri MensaFeedURL = new Uri("http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/", UriKind.Absolute);
public static Uri DepartmentFeedURL = new Uri("http://www.tu-cottbus.de/campusapp-data/professorships.xml", UriKind.Absolute);
public static Uri EventsFeedURL = new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php", UriKind.Absolute);
public static Uri NewsFeedURL = new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php", UriKind.Absolute);
}
}

View File

@@ -0,0 +1,68 @@
//-----------------------------------------------------------------------
// <copyright file="XmlFeed.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
using System.Xml.Linq;
using System.Xml.Serialization;
using CampusAppWP8.Resources;
/// <summary>
/// This abstract Class is for Xml-feeds
/// </summary>
/// <typeparam name="T">Type for model of the feed</typeparam>
public abstract class XmlFeed<T> : Feed<T>
{
protected string validRootName = Constants.XMLRootElementName;
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="XmlFeed{T}" /> class.
/// </summary>
public XmlFeed()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="XmlFeed{T}" /> class.
/// </summary>
/// <param name="feedURL">Url of the Feed</param>
/// <param name="fileName">Name of the file, which the feed will be stored</param>
public XmlFeed(Uri feedURL, string fileName)
: base(feedURL, fileName)
{
}
#endregion
#region Methods
/// <summary>
/// Method implement the deserialization a Xml-feed
/// </summary>
/// <param name="feedString">content of the feed</param>
protected override void Deserialization(string feedString)
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
XDocument document = XDocument.Parse(feedString);
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());
if (model != null)
{
this.Model = model;
}
}
#endregion
}
}