28 Commits

Author SHA1 Message Date
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
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
67 changed files with 2899 additions and 370 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,13 @@ using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWP8.Resources;
using CampusAppWP8.ViewModels;
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.
@@ -85,11 +69,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)

View File

@@ -25,6 +25,7 @@
<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>
@@ -36,6 +37,8 @@
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -94,8 +97,39 @@
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="LocalizedStrings.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
<Compile Include="Model\departments\ChairModel.cs" />
<Compile Include="Model\departments\DepartmentModel.cs" />
<Compile Include="Model\departments\DepartmentViewModel.cs" />
<Compile Include="Model\departments\FacultyModel.cs" />
<Compile Include="Model\Mensa\MenuModel.cs" />
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
<Compile Include="Pages\campusmap\CampusMapPage.xaml.cs">
<DependentUpon>CampusMapPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\departments\DepartmentPage.xaml.cs">
<DependentUpon>DepartmentPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\lecture\LecturePage.xaml.cs">
<DependentUpon>LecturePage.xaml</DependentUpon>
</Compile>
<Compile Include="Model\BaseModel.cs" />
<Compile Include="Model\BaseViewModel.cs" />
<Compile Include="Feed\Mensa\MensaFeed.cs" />
<Compile Include="Pages\Mensa\MensaPage.xaml.cs">
<DependentUpon>MensaPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\news\NewsPage.xaml.cs">
<DependentUpon>NewsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\news\RSSItem.cs" />
<Compile Include="Pages\news\RSSNewsTemplate.xaml.cs">
<DependentUpon>RSSNewsTemplate.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StartPage.xaml.cs">
<DependentUpon>StartPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\webmail\WebmailPage.xaml.cs">
<DependentUpon>WebmailPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\AppResources.Designer.cs">
@@ -103,24 +137,60 @@
<DesignTime>True</DesignTime>
<DependentUpon>AppResources.resx</DependentUpon>
</Compile>
<Compile Include="ViewModels\ItemViewModel.cs" />
<Compile Include="ViewModels\MainViewModel.cs" />
<Compile Include="Resources\Constants.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Constants.resx</DependentUpon>
</Compile>
<Compile Include="Utility\Feed.cs" />
<Compile Include="Utility\FeedEventHandler.cs" />
<Compile Include="Utility\FileList.cs" />
<Compile Include="Utility\FileManager.cs" />
<Compile Include="Utility\Logger.cs" />
<Compile Include="Utility\URLList.cs" />
<Compile Include="Utility\XmlFeed.cs" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Page Include="Pages\campusmap\CampusMapPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<DesignData Include="SampleData\MainViewModelSampleData.xaml">
<Page Include="Pages\departments\DepartmentPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\lecture\LecturePage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Mensa\MensaPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</DesignData>
</Page>
<Page Include="Pages\news\NewsPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\news\RSSNewsTemplate.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StartPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\webmail\WebmailPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Assets\psd\holo_optionsbuttons.psd" />
<None Include="Assets\psd\iconbutton_effects2.psd" />
<None Include="packages.config" />
<None Include="Properties\AppManifest.xml" />
<None Include="Properties\WMAppManifest.xml">
@@ -158,12 +228,18 @@
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Constants.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Constants.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Phone.Controls.Toolkit">
<HintPath>..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -0,0 +1,106 @@
//-----------------------------------------------------------------------
// <copyright file="MensaFeed.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Pages.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 Proberty
/// <summary>
/// Gets or sets i List of MenuModel
/// </summary>
public ObservableCollection<MenuModel> Menus { get; set; }
#endregion
#region Method
#region Protected
/// <summary>
/// Method implement CheckIsModelUpToDate()-Method <see cref="Feed"/>
/// </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="Feed"/>
/// </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 calculate this day of the week, which its gets new menus
/// </summary>
/// <returns>Date of NewMenuWeekDay</returns>
private DateTime CalcNewMenuWeekDay()
{
DateTime now = DateTime.Now;
while (now.DayOfWeek != DayOfWeek.Monday)
{
now = now.Subtract(new TimeSpan(1, 0, 0, 0));
}
DateTime monday = new DateTime(now.Year, now.Month, now.Day);
return monday;
}
/// <summary>
/// Method check if the last modification was later as the NewMenuWeekDay
/// </summary>
/// <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(this.CalcNewMenuWeekDay());
if (diff < 0)
{
return false;
}
return true;
}
#endregion
#endregion
}
}

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

@@ -13,7 +13,7 @@
<Capability Name="ID_CAP_ISV_CAMERA" />
</Capabilities>
<Tasks>
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
<DefaultTask Name="_default" NavigationPage="pages/mensa/MensaPage.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,222 @@ 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 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 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 Abschluss ähnelt.
/// </summary>
public static string LectureApp_Degree {
get {
return ResourceManager.GetString("LectureApp_Degree", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Vorlesungsname ähnelt.
/// </summary>
public static string LectureApp_LectureName {
get {
return ResourceManager.GetString("LectureApp_LectureName", 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 Vorlesung ähnelt.
/// </summary>
public static string LectureApp_Title {
get {
return ResourceManager.GetString("LectureApp_Title", 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 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 Ö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 LeftToRight ähnelt.
/// </summary>
@@ -114,6 +330,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,94 @@
<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>Vorlesung</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>Vorlesungsname</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>
</root>

View File

@@ -0,0 +1,72 @@
//------------------------------------------------------------------------------
// <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 root ähnelt.
/// </summary>
internal static string XMLRootElementName {
get {
return ResourceManager.GetString("XMLRootElementName", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,123 @@
<?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="XMLRootElementName" xml:space="preserve">
<value>root</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

@@ -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,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CampusAppWP8.Model.departments
{
public class ChairModel : BaseModel
{
private string _name;
public ChairModel()
{
_name = String.Empty;
}
public ChairModel(string name)
{
_name = name;
}
public string Name
{
get
{
return _name;
}
set
{
if (value != _name)
{
_name = value;
NotifyPropertyChanged("chair");
}
}
}
}
}

View File

@@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
namespace CampusAppWP8.Model.departments
{
public class DepartmentModel : BaseModel
{
private ObservableCollection<ChairModel> _chairs = null;
private string _name;
public DepartmentModel()
{
this.Chairs = new ObservableCollection<ChairModel>();
this.LoadData();
}
public DepartmentModel(string name)
{
_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");
}
}
}
}
}

View File

@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CampusAppWP8.Model.departments
{
public class DepartmentViewModel : BaseViewModel
{
private ObservableCollection<FacultyModel> _faculties = null;
public DepartmentViewModel()
{
this.Faculties = new ObservableCollection<FacultyModel>();
this.LoadData();
}
public void LoadData()
{
this.Faculties.Add(new FacultyModel("Fakultät 1"));
this.Faculties.Add(new FacultyModel("Fakultät 2"));
this.Faculties.Add(new FacultyModel("Fakultät 3"));
this.Faculties.Add(new FacultyModel("Fakultät 4"));
this.Faculties.Add(new FacultyModel("Favoriten"));
}
public ObservableCollection<FacultyModel> Faculties
{
get
{
return _faculties;
}
set
{
if (value != _faculties)
{
_faculties = value;
NotifyPropertyChanged("foodDays");
}
}
}
}
}

View File

@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
namespace CampusAppWP8.Model.departments
{
public class FacultyModel : BaseModel
{
private ObservableCollection<DepartmentModel> _faculties = null;
private string _name;
public FacultyModel()
{
this.Faculties = new ObservableCollection<DepartmentModel>();
this.LoadData();
}
public FacultyModel(string name)
{
_name = name;
this.Faculties = new ObservableCollection<DepartmentModel>();
this.LoadData();
}
public void LoadData()
{
this.Faculties.Add(new DepartmentModel("Institut 1"));
this.Faculties.Add(new DepartmentModel("Institut 2"));
this.Faculties.Add(new DepartmentModel("Institut 3"));
this.Faculties.Add(new DepartmentModel("Institut 4"));
}
public ObservableCollection<DepartmentModel> Faculties
{
get
{
return _faculties;
}
set
{
if (value != _faculties)
{
_faculties = value;
NotifyPropertyChanged("faculty");
}
}
}
public string Name
{
get
{
return _name;
}
set
{
if (value != _name)
{
_name = value;
NotifyPropertyChanged("chair");
}
}
}
}
}

View File

@@ -0,0 +1,193 @@
//-----------------------------------------------------------------------
// <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;
/// <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;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MenuModel" /> class.
/// </summary>
public MenuModel()
{
}
#endregion
#region Property
/// <summary>
/// Gets or sets the WeekDay
/// </summary>
[XmlElement("Wochentag")]
public string Day { get; set; }
/// <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 = value;
}
}
#endregion
}
}

View File

@@ -0,0 +1,51 @@
//-----------------------------------------------------------------------
// <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
{
/// <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;
}
/// <summary>
/// Gets or sets the menus for the week
/// </summary>
[XmlArray("BTU")]
[XmlArrayItem("Tagesmenu")]
public ObservableCollection<MenuModel> Menus { get; set; }
/// <summary>
/// Gets the creation time of the model
/// </summary>
public DateTime CreateTime
{
get
{
return this.createTime;
}
}
}
}

View File

@@ -0,0 +1,136 @@
<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 Source="/Assets/ApplicationIcon.png" Height="100" />
<TextBlock Text="{Binding Path=LocalizedResources.TimeTableApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="LectureAppButton" Grid.Row="0" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image Source="/Assets/ApplicationIcon.png" Height="100" />
<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 Source="/Assets/ApplicationIcon.png" Height="100"/>
<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 Source="/Assets/ApplicationIcon.png" Height="100" />
<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 Source="/Assets/ApplicationIcon.png" Height="100" />
<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 Source="/Assets/ApplicationIcon.png" Height="100" />
<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 Source="/Assets/ApplicationIcon.png" Height="100" />
<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 Source="/Assets/ApplicationIcon.png" Height="100" />
<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 Source="/Assets/ApplicationIcon.png" Height="100"/>
<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 Source="/Assets/ApplicationIcon.png" Height="100"/>
<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 Source="/Assets/ApplicationIcon.png" Height="100" />
<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 Source="/Assets/ApplicationIcon.png" Height="100" />
<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,53 @@
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();
}
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);
}
}
}
}

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,58 @@
<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" />
</phone:PhoneApplicationPage.Resources>
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.DataContext>
<viewModel:DepartmentViewModel/>
</Grid.DataContext>
<!--Pivotsteuerelement-->
<phone:Pivot Title="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" ItemsSource="{Binding Faculties}">
<phone:Pivot.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</phone:Pivot.HeaderTemplate>
<phone:Pivot.ItemTemplate>
<DataTemplate>
<ScrollViewer>
<phone:LongListSelector ItemsSource="{Binding Faculties}">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}" Style="{StaticResource PhoneTextTitle2Style}" />
<phone:LongListSelector ItemsSource="{Binding Chairs}">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
</ScrollViewer>
</DataTemplate>
</phone:Pivot.ItemTemplate>
</phone:Pivot>
</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.departments
{
public partial class DepartmentPage : PhoneApplicationPage
{
public DepartmentPage()
{
InitializeComponent();
}
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
}
}
}

View File

@@ -0,0 +1,113 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.lecture.Lecture"
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"
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">
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,0,0,2" >
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}"/>
</Border>
</StackPanel>
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
<ScrollViewer Grid.Row="1" Margin="12,0,12,0">
<Grid x:Name="ContentPanel">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" >
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureName, Source={StaticResource LocalizedStrings}}"/>
<TextBox />
</StackPanel>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="1">
<StackPanel >
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Course, Source={StaticResource LocalizedStrings}}"/>
<toolkit:ListPicker>
<toolkit:ListPickerItem Content="aaa" />
<toolkit:ListPickerItem Content="bbb" />
<toolkit:ListPickerItem Content="ccc" />
</toolkit:ListPicker>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="2">
<StackPanel >
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Degree, Source={StaticResource LocalizedStrings}}"/>
<toolkit:ListPicker>
<toolkit:ListPickerItem Content="Bachelor" />
<toolkit:ListPickerItem Content="Master" />
<toolkit:ListPickerItem Content="Diplom" />
</toolkit:ListPicker>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="3">
<StackPanel >
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Term, Source={StaticResource LocalizedStrings}}"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<toolkit:ListPicker Width="60">
<toolkit:ListPickerItem Content="1" />
<toolkit:ListPickerItem Content="2" />
<toolkit:ListPickerItem Content="3" />
</toolkit:ListPicker>
<TextBlock Text="bis" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<toolkit:ListPicker Width="60">
<toolkit:ListPickerItem Content="1" />
<toolkit:ListPickerItem Content="2" />
<toolkit:ListPickerItem Content="3" />
</toolkit:ListPicker>
</StackPanel>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="4">
<StackPanel>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Semester, Source={StaticResource LocalizedStrings}}"/>
<toolkit:ListPicker>
<toolkit:ListPickerItem Content="SoSe 13" />
<toolkit:ListPickerItem Content="WiSe 13/14" />
<toolkit:ListPickerItem Content="SoSe 14" />
</toolkit:ListPicker>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="5">
<Button>
<Image Source="/Toolkit.Content/ApplicationBar.Select.png" Width="100">
</Image>
</Button>
</Border>
</Grid>
</ScrollViewer>
</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.lecture
{
public partial class Lecture : PhoneApplicationPage
{
public Lecture()
{
InitializeComponent();
}
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
}
}
}

View File

@@ -0,0 +1,70 @@
<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>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Path=LocalizedResources.MensaApp_Dinner1, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" />
<TextBlock Grid.Row="0" Grid.Column="1" Text=" : "/>
<TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding Dinner1}" TextWrapping="Wrap"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Path=LocalizedResources.MensaApp_Dinner2, Source={StaticResource LocalizedStrings}}" FontWeight="Bold"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text=" : "/>
<TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding Dinner2}" TextWrapping="Wrap"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding Path=LocalizedResources.MensaApp_Dinner3, Source={StaticResource LocalizedStrings}}" FontWeight="Bold"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text=" : "/>
<TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding Dinner3}" TextWrapping="Wrap"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding Path=LocalizedResources.MensaApp_Dinner4, Source={StaticResource LocalizedStrings}}" FontWeight="Bold"/>
<TextBlock Grid.Row="3" Grid.Column="1" Text=" : "/>
<TextBlock Grid.Row="3" Grid.Column="2" Text="{Binding Dinner4}" TextWrapping="Wrap"/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="{Binding Path=LocalizedResources.MensaApp_Bio, Source={StaticResource LocalizedStrings}}" FontWeight="Bold"/>
<TextBlock Grid.Row="4" Grid.Column="1" Text=" : "/>
<TextBlock Grid.Row="4" Grid.Column="2" Text="{Binding Bio}" TextWrapping="Wrap"/>
<TextBlock Grid.Row="5" Grid.Column="0" Text="{Binding Path=LocalizedResources.MensaApp_Action, Source={StaticResource LocalizedStrings}}" FontWeight="Bold"/>
<TextBlock Grid.Row="5" Grid.Column="1" Text=" : "/>
<TextBlock Grid.Row="5" Grid.Column="2" Text="{Binding Action}" TextWrapping="Wrap"/>
</Grid>
</DataTemplate>
</phone:Pivot.ItemTemplate>
</phone:Pivot>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,135 @@
//-----------------------------------------------------------------------
// <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.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,47 @@
<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"
mc:Ignorable="d"
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">
<!--Pivotsteuerelement-->
<phone:Pivot x:Name="NewsPivot" Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}">
<!--Pivotelement eins-->
<phone:PivotItem Name="NewsPivotHome" Header="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}">
<ListBox x:Name="ButtonPanel" Grid.Row="1">
<!-- rows
<Button Name="NewsRow01AppButton" Content="Test News Title 01" Click="NewsRow01AppButton_Click" Grid.Row="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0">
</Button>
-->
</ListBox>
</phone:PivotItem>
<!--Pivotelement news template
<phone:PivotItem Name="NewsPivot01" Header="(timestamp)">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="*"/>
<RowDefinition Height="90"/>
</Grid.RowDefinitions>
<TextBlock x:Name="NewsHeadline01" Text="(headline)" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="42"/>
<TextBlock x:Name="NewsText01" Text="(text)" Grid.Row="1" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="24" />
<Button Name="NewsHome" Content="zur News Übersicht" Click="NewsHome_Click" Grid.Row="2" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
</Grid>
</phone:PivotItem>
-->
</phone:Pivot>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,106 @@
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;
namespace CampusAppWP8.Pages.news
{
public partial class NewsPage : PhoneApplicationPage
{
List<RSSItem> itemList;
public NewsPage()
{
InitializeComponent();
}
//
protected override void OnNavigatedTo(NavigationEventArgs e)
{
this.itemList = new List<RSSItem>();
this.itemList.Clear();
WebClient wc = new WebClient();
wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(WC_DownloadStringCompleted);
wc.DownloadStringAsync(new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php"));
}
private void WC_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error != null)
return;
int i = 0;
XElement xmlitems = XElement.Parse(e.Result);
List<XElement> elements = xmlitems.Descendants("item").ToList();
foreach (XElement rssItem in elements)
{
if(i < 12)
{
RSSItem rss = new RSSItem();
rss.Title = rssItem.Element("title").Value;
rss.Text = rssItem.Element("description").Value;
rss.Timestamp = rssItem.Element("pubDate").Value;
this.itemList.Add(rss);
Button btn = new Button();
btn.Name = "NewsRowAppButton" + i;
btn.Content = rss.Title;
btn.BorderBrush = null;
btn.Background = null;
btn.VerticalContentAlignment = VerticalAlignment.Stretch;
btn.HorizontalContentAlignment = HorizontalAlignment.Stretch;
btn.BorderThickness = new Thickness(0);
btn.Padding = new Thickness(0);
btn.Click += NewsRowAppButton_Click;
btn.Tag = i;
PivotItem newPivItem = new PivotItem();
newPivItem.Name = "NewsPivot" + i;
newPivItem.Header = rss.Date;
RSSNewsTemplate pvContent = new RSSNewsTemplate();
pvContent.NewsHeadline.Text = rss.Title;
pvContent.NewsText.Text = rss.Text;
pvContent.NewsHome.Click += NewsHome_Click;
newPivItem.Content = pvContent;
NewsPivot.Items.Add(newPivItem);
ButtonPanel.Items.Add(btn);
i++;
}
}
}
// Button Functions
private void NewsRowAppButton_Click(object sender, RoutedEventArgs e)
{
Button btn = (Button)sender;
NewsPivot.SelectedIndex = (int)btn.Tag + 1;
}
private void NewsHome_Click(object sender, RoutedEventArgs e)
{
NewsPivot.SelectedIndex = 0;
}
}
}

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,33 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.webmail.Webmail"
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,27 @@
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.Threading.Tasks;
namespace CampusAppWP8.Pages.webmail
{
public partial class Webmail : PhoneApplicationPage
{
public Webmail()
{
InitializeComponent();
loadWebmailPage();
}
private void loadWebmailPage()
{
this.WebmailBrowser.Navigate(new Uri("https://webmail.tu-cottbus.de", UriKind.Absolute));
}
}
}

View File

@@ -0,0 +1,250 @@
//-----------------------------------------------------------------------
// <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>
{
#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()
{
WebClient client = new WebClient();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(this.DownloadCompleted);
client.DownloadStringAsync(this.FeedURL);
}
/// <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,25 @@
//-----------------------------------------------------------------------
// <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);
}
}

View File

@@ -0,0 +1,67 @@
//-----------------------------------------------------------------------
// <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>
{
#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);
string validRootName = Constants.XMLRootElementName;
if (!document.Root.Name.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
}
}