Merge branch 'feature/#44' into develop

Conflicts:
	CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs
This commit is contained in:
Christian Fiedler
2013-06-24 12:44:16 +02:00
31 changed files with 415 additions and 83 deletions

View File

@@ -9,6 +9,7 @@
<!--Anwendungsressourcen-->
<Application.Resources>
<local:LocalizedStrings xmlns:local="clr-namespace:CampusAppWP8" x:Key="LocalizedStrings"/>
<local:ThemelizedIcons xmlns:local="clr-namespace:CampusAppWP8" x:Key="ThemelizedIcons"/>
</Application.Resources>
<Application.ApplicationLifetimeObjects>

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -172,6 +172,13 @@
<DesignTime>True</DesignTime>
<DependentUpon>Constants.resx</DependentUpon>
</Compile>
<Compile Include="Resources\Icons.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Icons.resx</DependentUpon>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Compile>
<Compile Include="ThemelizedIcons.cs" />
<Compile Include="Utility\Api.cs" />
<Compile Include="Utility\ApiEventHandler.cs" />
<Compile Include="Utility\Feed.cs" />
@@ -258,30 +265,30 @@
<Content Include="Assets\ApplicationIcon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\icons\campus_159_dark.png" />
<Content Include="Assets\icons\campus_159_light.png" />
<Content Include="Assets\icons\departments_159_dark.png" />
<Content Include="Assets\icons\departments_159_light.png" />
<Content Include="Assets\icons\homework_159_dark.png" />
<Content Include="Assets\icons\homework_159_light.png" />
<Content Include="Assets\icons\link_159_dark.png" />
<Content Include="Assets\icons\link_159_light.png" />
<Content Include="Assets\icons\lectures_159_dark.png" />
<Content Include="Assets\icons\lectures_159_light.png" />
<Content Include="Assets\icons\mensa_159_dark.png" />
<Content Include="Assets\icons\mensa_159_light.png" />
<Content Include="Assets\icons\news_159_dark.png" />
<Content Include="Assets\icons\news_159_light.png" />
<Content Include="Assets\icons\openhours_159_dark.png" />
<Content Include="Assets\icons\openhours_159_light.png" />
<Content Include="Assets\icons\schedule_159_dark.png" />
<Content Include="Assets\icons\schedule_159_light.png" />
<Content Include="Assets\icons\search_159_dark.png" />
<Content Include="Assets\icons\search_159_light.png" />
<Content Include="Assets\icons\student_council_159_dark.png" />
<Content Include="Assets\icons\student_council_159_light.png" />
<Content Include="Assets\icons\webmail_159_dark.png" />
<Content Include="Assets\icons\webmail_159_light.png" />
<Content Include="Assets\Icons\DarkTheme\campus_159.png" />
<Content Include="Assets\Icons\LightTheme\campus_159.png" />
<Content Include="Assets\Icons\DarkTheme\departments_159.png" />
<Content Include="Assets\Icons\LightTheme\departments_159.png" />
<Content Include="Assets\Icons\DarkTheme\homework_159.png" />
<Content Include="Assets\Icons\LightTheme\homework_159.png" />
<Content Include="Assets\Icons\DarkTheme\link_159.png" />
<Content Include="Assets\Icons\LightTheme\link_159.png" />
<Content Include="Assets\Icons\DarkTheme\lectures_159.png" />
<Content Include="Assets\Icons\LightTheme\lectures_159.png" />
<Content Include="Assets\Icons\DarkTheme\mensa_159.png" />
<Content Include="Assets\Icons\LightTheme\mensa_159.png" />
<Content Include="Assets\Icons\DarkTheme\news_159.png" />
<Content Include="Assets\Icons\LightTheme\news_159.png" />
<Content Include="Assets\Icons\DarkTheme\openhours_159.png" />
<Content Include="Assets\Icons\LightTheme\openhours_159.png" />
<Content Include="Assets\Icons\DarkTheme\schedule_159.png" />
<Content Include="Assets\Icons\LightTheme\schedule_159.png" />
<Content Include="Assets\Icons\DarkTheme\search_159.png" />
<Content Include="Assets\Icons\LightTheme\search_159.png" />
<Content Include="Assets\Icons\DarkTheme\student_council_159.png" />
<Content Include="Assets\Icons\LightTheme\student_council_159.png" />
<Content Include="Assets\Icons\DarkTheme\webmail_159.png" />
<Content Include="Assets\Icons\LightTheme\webmail_159.png" />
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -313,6 +320,11 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Constants.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Icons.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Icons.Designer.cs</LastGenOutput>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />

View File

@@ -0,0 +1,194 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.18046
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CampusAppWP8.Resources {
using System;
using System.Windows;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Icons {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Icons() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWP8.Resources.Icons", typeof(Icons).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Returns the full filename of the icon, depending on the current theme.
/// </summary>
/// <param name="_key">Tagname</param>
/// <returns>Filename</returns>
private static string Themerize(string _key)
{
string retValue = string.Empty;
if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible)
{
retValue = "/Assets/Icons/DarkTheme/";
}
else
{
retValue = "/Assets/Icons/LightTheme/";
}
retValue += ResourceManager.GetString(_key, resourceCulture);
return retValue;
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die campus_159.png ähnelt.
/// </summary>
public static string Campus {
get {
return Themerize("Campus");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die departments_159.png ähnelt.
/// </summary>
public static string Departments {
get {
return Themerize("Departments");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die homework_159.png ähnelt.
/// </summary>
public static string Homework {
get {
return Themerize("Homework");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die lectures_159.png ähnelt.
/// </summary>
public static string Lectures {
get {
return Themerize("Lectures");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die link_159.png ähnelt.
/// </summary>
public static string Link {
get {
return Themerize("Link");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die mensa_159.png ähnelt.
/// </summary>
public static string Mensa {
get {
return Themerize("Mensa");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die news_159.png ähnelt.
/// </summary>
public static string News {
get {
return Themerize("News");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die openhours_159.png ähnelt.
/// </summary>
public static string Openhours {
get {
return Themerize("Openhours");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die schedule_159.png ähnelt.
/// </summary>
public static string Schedule {
get {
return Themerize("Schedule");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die search_159.png ähnelt.
/// </summary>
public static string Search {
get {
return Themerize("Search");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die student_council_159.png ähnelt.
/// </summary>
public static string StudentCouncil {
get {
return Themerize("StudentCouncil");
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die webmail_159.png ähnelt.
/// </summary>
public static string WebMail {
get {
return Themerize("WebMail");
}
}
}
}

View File

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

View File

@@ -0,0 +1,14 @@
using CampusAppWP8.Resources;
namespace CampusAppWP8
{
/// <summary>
/// Bietet Zugriff auf Zeichenfolgenressourcen.
/// </summary>
public class ThemelizedIcons
{
private static Icons themelized = new Icons();
public Icons ThemelizedIcon { get { return themelized; } }
}
}

View File

@@ -44,24 +44,21 @@
<!-- 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" IsEnabled="False">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkTimetable" Source="/Assets/icons/schedule_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightTimetable" Source="/Assets/icons/schedule_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.Schedule, Source={StaticResource ThemelizedIcons}}" Height="100"/>
<TextBlock Text="{Binding Path=LocalizedResources.TimeTableApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="LectureAppButton" Grid.Row="0" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenLectureApp">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkLectures" Source="/Assets/icons/lectures_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightLectures" Source="/Assets/icons/lectures_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.Lectures, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="NewsAppButton" Grid.Row="0" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenNewsApp">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkNews" Source="/Assets/icons/news_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightNews" Source="/Assets/icons/news_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
@@ -69,24 +66,21 @@
<!-- 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" Click="OpenMensaApp">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkMensa" Source="/Assets/icons/mensa_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightMensa" Source="/Assets/icons/mensa_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.Mensa, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="CampusMapAppButton" Grid.Row="1" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkCampus" Source="/Assets/icons/campus_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightCampus" Source="/Assets/icons/campus_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.Campus, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.CampusMapApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="HomeworkAppButton" Grid.Row="1" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkHomework" Source="/Assets/icons/homework_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightHomework" Source="/Assets/icons/homework_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.Mensa, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.HomeworkApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
@@ -94,24 +88,21 @@
<!-- 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" IsEnabled="False">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkDepartments" Source="/Assets/icons/departments_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightDepartments" Source="/Assets/icons/departments_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.Departments, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="EventAppButton" Grid.Row="2" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenEventsApp">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkEvents" Source="/Assets/icons/news_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightEvents" Source="/Assets/icons/news_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="MailAppButton" Grid.Row="2" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenWebMailApp">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkWebmail" Source="/Assets/icons/webmail_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightWebmail" Source="/Assets/icons/webmail_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.WebMail, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.MailApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
@@ -119,24 +110,21 @@
<!-- 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" IsEnabled="False">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkOpenhours" Source="/Assets/icons/openhours_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightOpenhours" Source="/Assets/icons/openhours_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.Openhours, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.OpenHoursApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="OSAAppButton" Grid.Row="3" Grid.Column="1" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkStudentcouncil" Source="/Assets/icons/student_council_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightStudentcouncil" Source="/Assets/icons/student_council_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.StudentCouncil, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.OSAApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>
<Button Name="LinkAppButton" Grid.Row="3" Grid.Column="2" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" IsEnabled="False">
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
<Image x:Name="ImgDarkLink" Source="/Assets/icons/link_159_dark.png" Height="100" Visibility="Collapsed"/>
<Image x:Name="ImgLightLink" Source="/Assets/icons/link_159_light.png" Height="100" Visibility="Visible"/>
<Image Source="{Binding Path=ThemelizedIcon.Link, Source={StaticResource ThemelizedIcons}}" Height="100" Visibility="Visible"/>
<TextBlock Text="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Button>

View File

@@ -26,9 +26,8 @@ namespace CampusAppWP8.Pages
{
this.InitializeComponent();
if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible)
{
this.SetIconThemeToDark();
//if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible)
// this.SetIconThemeToDark();
}
}
@@ -67,38 +66,6 @@ namespace CampusAppWP8.Pages
}
}
/// <summary>
/// Method set all icons for the DarkTheme
/// </summary>
private void SetIconThemeToDark()
{
this.ImgLightCampus.Visibility = Visibility.Collapsed;
this.ImgLightDepartments.Visibility = Visibility.Collapsed;
this.ImgLightEvents.Visibility = Visibility.Collapsed;
this.ImgLightHomework.Visibility = Visibility.Collapsed;
this.ImgLightLectures.Visibility = Visibility.Collapsed;
this.ImgLightLink.Visibility = Visibility.Collapsed;
this.ImgLightMensa.Visibility = Visibility.Collapsed;
this.ImgLightNews.Visibility = Visibility.Collapsed;
this.ImgLightOpenhours.Visibility = Visibility.Collapsed;
this.ImgLightStudentcouncil.Visibility = Visibility.Collapsed;
this.ImgLightTimetable.Visibility = Visibility.Collapsed;
this.ImgLightWebmail.Visibility = Visibility.Collapsed;
this.ImgDarkCampus.Visibility = Visibility.Visible;
this.ImgDarkDepartments.Visibility = Visibility.Visible;
this.ImgDarkEvents.Visibility = Visibility.Visible;
this.ImgDarkHomework.Visibility = Visibility.Visible;
this.ImgDarkLectures.Visibility = Visibility.Visible;
this.ImgDarkLink.Visibility = Visibility.Visible;
this.ImgDarkMensa.Visibility = Visibility.Visible;
this.ImgDarkNews.Visibility = Visibility.Visible;
this.ImgDarkOpenhours.Visibility = Visibility.Visible;
this.ImgDarkStudentcouncil.Visibility = Visibility.Visible;
this.ImgDarkTimetable.Visibility = Visibility.Visible;
this.ImgDarkWebmail.Visibility = Visibility.Visible;
}
/// <summary>
/// start the LectureApp
/// </summary>