add to startpage

This commit is contained in:
stubbfel
2013-09-02 12:38:19 +02:00
parent 18e9373a37
commit 6276542c6c
15 changed files with 214 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -119,6 +119,9 @@
<Compile Include="Model\Utility\DegreeListPickerItemListModel.cs" />
<Compile Include="Model\Utility\CleanUrlParamModel.cs" />
<Compile Include="Model\Utility\CampusListPickerItemListModel.cs" />
<Compile Include="Pages\Exams\Exams.xaml.cs">
<DependentUpon>Exams.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
<Compile Include="Utility\NDEF\NDEFShortRecord.cs" />
@@ -295,6 +298,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Exams\Exams.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Lecture\LecturePage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -396,6 +403,7 @@
<Content Include="Assets\Icons\DarkTheme\campus_159.png" />
<Content Include="Assets\Icons\DarkTheme\current_position_159.png" />
<Content Include="Assets\Icons\DarkTheme\delete_159.png" />
<Content Include="Assets\Icons\DarkTheme\exams_159.png" />
<Content Include="Assets\Icons\DarkTheme\favorite_159.png" />
<Content Include="Assets\Icons\DarkTheme\info_159.png" />
<Content Include="Assets\Icons\DarkTheme\phone_159.png" />
@@ -409,6 +417,7 @@
<Content Include="Assets\Icons\LightTheme\delete_159.png" />
<Content Include="Assets\Icons\LightTheme\departments_159.png" />
<Content Include="Assets\Icons\DarkTheme\homework_159.png" />
<Content Include="Assets\Icons\LightTheme\exams_159.png" />
<Content Include="Assets\Icons\LightTheme\favorite_159.png" />
<Content Include="Assets\Icons\LightTheme\homework_159.png" />
<Content Include="Assets\Icons\DarkTheme\link_159.png" />

View File

@@ -0,0 +1,35 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.Exams.Exams"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="MEINE ANWENDUNG" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="Seitenname" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
</Grid>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,20 @@
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.Exams
{
public partial class Exams : PhoneApplicationPage
{
public Exams()
{
InitializeComponent();
}
}
}

View File

@@ -158,6 +158,24 @@
</lui:NavigateButton>
</Grid>
<!-- Row 4 -->
<Grid Name="Row4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<lui:NavigateButton Name="examinationAppButton" Url="{Binding Path=Constants.PathExams_ExamsPage, Source={StaticResource Const}}" Grid.Column="0" Style="{StaticResource StartPageButton}">
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
<Image Source="{Binding Path=ThemelizedIcon.Exams, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
<TextBlock Name="examinationAppButtonText" Text="{Binding Path=LocalizedResources.ExaminationApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
</StackPanel>
</lui:NavigateButton>
</Grid>
</StackPanel>
</ScrollViewer>

View File

@@ -222,6 +222,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Prüfungs- ordnungen ähnelt.
/// </summary>
public static string ExaminationApp_Title {
get {
return ResourceManager.GetString("ExaminationApp_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Fakultät ähnelt.
/// </summary>

View File

@@ -419,4 +419,7 @@
<data name="Setting_AppOnlyWifi" xml:space="preserve">
<value>Nur mit Wlan laden</value>
</data>
<data name="ExaminationApp_Title" xml:space="preserve">
<value>Prüfungs- ordnungen</value>
</data>
</root>

View File

@@ -609,6 +609,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Exams/Exams.xaml ähnelt.
/// </summary>
public static string PathExams_ExamsPage {
get {
return ResourceManager.GetString("PathExams_ExamsPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/LecturePage.xaml ähnelt.
/// </summary>

View File

@@ -435,4 +435,7 @@
<data name="ParamModelMap_SearchTermAlias" xml:space="preserve">
<value>SearchAlias</value>
</data>
<data name="PathExams_ExamsPage" xml:space="preserve">
<value>/Pages/Exams/Exams.xaml</value>
</data>
</root>

View File

@@ -99,6 +99,17 @@ namespace CampusAppWP8.Resources
}
}
/// <summary>
/// Gets the uri string of the Exams icon.
/// </summary>
public static string Exams
{
get
{
return Themerize("exams_159.png");
}
}
/// <summary>
/// Gets the uri string of the Favorite icon.
/// </summary>

View File

@@ -138,6 +138,9 @@
<data name="Departments" xml:space="preserve">
<value>departments_159.png</value>
</data>
<data name="Exams" xml:space="preserve">
<value>exams_159.png</value>
</data>
<data name="Favorite" xml:space="preserve">
<value>favorite_159.png</value>
</data>

View File

@@ -0,0 +1,50 @@
import cairo
import rsvg
import xml.etree.ElementTree as ET
def convertSVGToPNG(src, dst, dstWidth, dstHeight, srcWidth, srcHeight, style,layerID):
ET.register_namespace("","http://www.w3.org/2000/svg")
tree = ET.parse(src)
root = tree.getroot()
for layer in root.findall('./{http://www.w3.org/2000/svg}g'):
name = layer.get('{http://www.inkscape.org/namespaces/inkscape}label')
if name in layerID :
for path in layer.findall('./{http://www.w3.org/2000/svg}path'):
path.set("style",style)
else :
root.remove(layer)
img = cairo.ImageSurface(cairo.FORMAT_ARGB32, dstWidth, dstHeight)
ctx = cairo.Context(img)
width_ratio = float(dstWidth) / float(srcWidth)
height_ratio = float(dstHeight) / float(srcHeight)
ctx.scale(width_ratio, height_ratio)
handler= rsvg.Handle(None,str(ET.tostring(root, encoding='utf8', method='xml')))
handler.render_cairo(ctx)
img.write_to_png(dst)
def convertSVGToPNG2(src, dst, dstWidth, dstHeight, srcWidth, srcHeight, style,layerID):
ET.register_namespace("","http://www.w3.org/2000/svg")
tree = ET.parse(src)
root = tree.getroot()
for path in root.findall('./{http://www.w3.org/2000/svg}path'):
path.set("style",style)
img = cairo.ImageSurface(cairo.FORMAT_ARGB32, dstWidth, dstHeight)
ctx = cairo.Context(img)
width_ratio = float(dstWidth) / float(srcWidth)
height_ratio = float(dstHeight) / float(srcHeight)
ctx.scale(width_ratio, height_ratio)
handler= rsvg.Handle(None,str(ET.tostring(root, encoding='utf8', method='xml')))
handler.render_cairo(ctx)
img.write_to_png(dst)

Binary file not shown.

View File

@@ -0,0 +1,44 @@
import IconCreator
import os
os.chdir("srcImages/functions")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/LightTheme/functions/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/DarkTheme/functions/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")
os.chdir("srcImages/emotions")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/LightTheme/emotions/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Emotion Speechbubble")
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/DarkTheme/emotions/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Emotion Speechbubble")
os.chdir("../../")
os.chdir("srcImages/listicons")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/listicons/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/DarkTheme/listicons/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")
os.chdir("srcImages/optionbuttons")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/optionbuttons/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/DarkTheme/optionbuttons/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")
os.chdir("srcImages/others")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/others/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/DarkTheme/others/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")