add icons

This commit is contained in:
stubbfel
2013-09-30 15:21:37 +02:00
parent 93c9bbe5d1
commit ffa91ee8fd
70 changed files with 122 additions and 40 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -443,35 +443,48 @@
<Content Include="Assets\Icons\DarkTheme\add_contact_159.png" />
<Content Include="Assets\Icons\DarkTheme\btulogo_159.png" />
<Content Include="Assets\Icons\DarkTheme\campus_159.png" />
<Content Include="Assets\Icons\DarkTheme\carotte_159.png" />
<Content Include="Assets\Icons\DarkTheme\chicken_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\fish_159.png" />
<Content Include="Assets\Icons\DarkTheme\frei_159.png" />
<Content Include="Assets\Icons\DarkTheme\info_159.png" />
<Content Include="Assets\Icons\DarkTheme\lab_159.png" />
<Content Include="Assets\Icons\DarkTheme\lamb_159.png" />
<Content Include="Assets\Icons\DarkTheme\lecture_159.png" />
<Content Include="Assets\Icons\DarkTheme\person_159.png" />
<Content Include="Assets\Icons\DarkTheme\phone_159.png" />
<Content Include="Assets\Icons\DarkTheme\placeinfo_159.png" />
<Content Include="Assets\Icons\DarkTheme\pork_159.png" />
<Content Include="Assets\Icons\DarkTheme\practise_159.png" />
<Content Include="Assets\Icons\DarkTheme\search_place_159.png" />
<Content Include="Assets\Icons\DarkTheme\seminar_159.png" />
<Content Include="Assets\Icons\DarkTheme\steak_159.png" />
<Content Include="Assets\Icons\DarkTheme\update_159.png" />
<Content Include="Assets\Icons\DarkTheme\wild dish_159.png" />
<Content Include="Assets\Icons\LightTheme\add_159.png" />
<Content Include="Assets\Icons\LightTheme\add_contact_159.png" />
<Content Include="Assets\Icons\LightTheme\btulogo_159.png" />
<Content Include="Assets\Icons\LightTheme\campus_159.png" />
<Content Include="Assets\Icons\DarkTheme\departments_159.png" />
<Content Include="Assets\Icons\LightTheme\carotte_159.png" />
<Content Include="Assets\Icons\LightTheme\chicken_159.png" />
<Content Include="Assets\Icons\LightTheme\current_position_159.png" />
<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\fish_159.png" />
<Content Include="Assets\Icons\LightTheme\frei_159.png" />
<Content Include="Assets\Icons\LightTheme\homework_159.png" />
<Content Include="Assets\Icons\DarkTheme\link_159.png" />
<Content Include="Assets\Icons\LightTheme\info_159.png" />
<Content Include="Assets\Icons\LightTheme\lab_159.png" />
<Content Include="Assets\Icons\LightTheme\lamb_159.png" />
<Content Include="Assets\Icons\LightTheme\lecture_159.png" />
<Content Include="Assets\Icons\LightTheme\link_159.png" />
<Content Include="Assets\Icons\DarkTheme\lectures_159.png" />
@@ -486,6 +499,7 @@
<Content Include="Assets\Icons\LightTheme\person_159.png" />
<Content Include="Assets\Icons\LightTheme\phone_159.png" />
<Content Include="Assets\Icons\LightTheme\placeinfo_159.png" />
<Content Include="Assets\Icons\LightTheme\pork_159.png" />
<Content Include="Assets\Icons\LightTheme\practise_159.png" />
<Content Include="Assets\Icons\LightTheme\schedule_159.png" />
<Content Include="Assets\Icons\DarkTheme\search_159.png" />
@@ -493,10 +507,12 @@
<Content Include="Assets\Icons\DarkTheme\student_council_159.png" />
<Content Include="Assets\Icons\LightTheme\search_place_159.png" />
<Content Include="Assets\Icons\LightTheme\seminar_159.png" />
<Content Include="Assets\Icons\LightTheme\steak_159.png" />
<Content Include="Assets\Icons\LightTheme\student_council_159.png" />
<Content Include="Assets\Icons\DarkTheme\webmail_159.png" />
<Content Include="Assets\Icons\LightTheme\update_159.png" />
<Content Include="Assets\Icons\LightTheme\webmail_159.png" />
<Content Include="Assets\Icons\LightTheme\wild dish_159.png" />
<Content Include="Assets\Lens.Screen-720p.png" />
<Content Include="Assets\Lens.Screen-WVGA.png" />
<Content Include="Assets\Lens.Screen-WXGA.png" />

View File

@@ -16,9 +16,9 @@ namespace CampusAppWP8.Pages.Mensa
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWP8.Utility.Lui.MessageBoxes;
using CampusAppWPortalLib8.Model.Mensa;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWPortalLib8.Model.Mensa;
/// <summary>
/// Class for the MensaPage
@@ -231,10 +231,57 @@ namespace CampusAppWP8.Pages.Mensa
private void SetupMensaPivot()
{
this.MensaPivot.Title = AppResources.MensaApp_Title + " (" + this.feed.Title + ")";
this.CreatesMealIcons();
this.MensaPivot.ItemsSource = this.feed.Model.Menus;
this.MensaPivot.SelectedIndex = this.selectedIndex;
}
/// <summary>
/// Method create the IconsUrl for the meals
/// </summary>
private void CreatesMealIcons()
{
foreach (MenuModel menus in this.feed.Model.Menus)
{
foreach (MealModel meal in menus.Meals)
{
switch (meal.IconName)
{
case MealModel.MealIconNameCow:
meal.IconUrl = Icons.Cow;
break;
case MealModel.MealIconNameCowPig:
meal.IconUrl = Icons.CowPig;
break;
case MealModel.MealIconNameFish:
meal.IconUrl = Icons.Fish;
break;
case MealModel.MealIconNameFowl:
meal.IconUrl = Icons.Fowl;
break;
case MealModel.MealIconNameFree:
meal.IconUrl = Icons.Free;
break;
case MealModel.MealIconNameLamb:
meal.IconUrl = Icons.Lamb;
break;
case MealModel.MealIconNamePig:
meal.IconUrl = Icons.Pig;
break;
case MealModel.MealIconNameVegetarian:
meal.IconUrl = Icons.Vegetarian;
break;
case MealModel.MealIconNameWild:
meal.IconUrl = Icons.Wild;
break;
default:
meal.IconUrl = string.Empty;
break;
}
}
}
}
/// <summary>
/// Method calculate which pivot has to be selected
/// </summary>

View File

@@ -62,7 +62,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("steak_159.png");
}
}
@@ -73,7 +73,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("pork_159.png");
}
}
@@ -139,7 +139,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("fish_159.png");
}
}
@@ -150,7 +150,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("chicken_159.png");
}
}
@@ -161,7 +161,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("frei_159.png");
}
}
@@ -205,7 +205,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("lamb_159.png");
}
}
@@ -304,7 +304,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("pork_159.png");
}
}
@@ -414,7 +414,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("carotte_159.png");
}
}
@@ -436,7 +436,7 @@ namespace CampusAppWP8.Resources
{
get
{
return Themerize("info_159.png");
return Themerize("wilddish_159.png");
}
}

View File

@@ -127,10 +127,10 @@
<value>campus_159.png</value>
</data>
<data name="Cow" xml:space="preserve">
<value>info_159.png</value>
<value>steak_159.png</value>
</data>
<data name="CowPig" xml:space="preserve">
<value>info_159.png</value>
<value>pork_159.png</value>
</data>
<data name="CurrentPosition" xml:space="preserve">
<value>current_position_159.png</value>
@@ -148,13 +148,13 @@
<value>favorite_159.png</value>
</data>
<data name="Fish" xml:space="preserve">
<value>info_159.png</value>
<value>fish_159.png</value>
</data>
<data name="Fowl" xml:space="preserve">
<value>info_159.png</value>
<value>chicken_159.png</value>
</data>
<data name="Free" xml:space="preserve">
<value>info_159.png</value>
<value>frei_159.png</value>
</data>
<data name="Homework" xml:space="preserve">
<value>homework_159.png</value>
@@ -166,7 +166,7 @@
<value>lab_159.png</value>
</data>
<data name="Lamb" xml:space="preserve">
<value>info_159.png</value>
<value>lamb_159.png</value>
</data>
<data name="Lecture" xml:space="preserve">
<value>lecture_159.png</value>
@@ -193,7 +193,7 @@
<value>phone_159.png</value>
</data>
<data name="Pig" xml:space="preserve">
<value>info_159.png</value>
<value>pork_159.png</value>
</data>
<data name="PlaceInfo" xml:space="preserve">
<value>placeinfo_159.png</value>
@@ -223,12 +223,12 @@
<value>update_159.png</value>
</data>
<data name="Vegetarian" xml:space="preserve">
<value>info_159.png</value>
<value>carotte_159.png</value>
</data>
<data name="WebMail" xml:space="preserve">
<value>webmail_159.png</value>
</data>
<data name="Wild" xml:space="preserve">
<value>info_159.png</value>
<value>wild dish_159.png</value>
</data>
</root>

View File

@@ -9,8 +9,8 @@ namespace CampusAppWPortalLib8.Model.Mensa
{
using System.Xml.Serialization;
using CampusAppWPortalLib8.Resources;
using CampusAppWPortalLib8.Utility;
using CampusAppWPortalLib8.Utility;
/// <summary>
/// Model for a meal
/// </summary>
@@ -21,47 +21,47 @@ namespace CampusAppWPortalLib8.Model.Mensa
/// <summary>
/// Constant for the vegetarian icon
/// </summary>
private const string MealIconNameVegetarian = "CARROTTE";
public const string MealIconNameVegetarian = "CARROTTE";
/// <summary>
/// Constant for the free icon
/// </summary>
private const string MealIconNameFree = "FREI";
public const string MealIconNameFree = "FREI";
/// <summary>
/// Constant for the pig icon
/// </summary>
private const string MealIconNamePig = "SCHWEIN";
public const string MealIconNamePig = "SCHWEIN";
/// <summary>
/// Constant for the cow icon
/// </summary>
private const string MealIconNameCow = "RIND";
public const string MealIconNameCow = "RIND";
/// <summary>
/// Constant for the fowl icon
/// </summary>
private const string MealIconNameFowl = "GEFL";
public const string MealIconNameFowl = "GEFL";
/// <summary>
/// Constant for the cow-pig icon
/// </summary>
private const string MealIconNameCowPig = "RINDSCHWEIN";
public const string MealIconNameCowPig = "RINDSCHWEIN";
/// <summary>
/// Constant for the fish icon
/// </summary>
private const string MealIconNameFish = "FISCH";
public const string MealIconNameFish = "FISCH";
/// <summary>
/// Constant for the wild icon
/// </summary>
private const string MealIconNameWild = "WILD";
public const string MealIconNameWild = "WILD";
/// <summary>
/// Constant for the lamb icon
/// </summary>
private const string MealIconNameLamb = "LAMM";
public const string MealIconNameLamb = "LAMM";
/// <summary>
/// Variable for the id of the meal
@@ -140,6 +140,17 @@ namespace CampusAppWPortalLib8.Model.Mensa
}
}
/// <summary>
/// Gets or sets the icon url
/// </summary>
public string IconUrl { get; set; }
/// <summary>
/// Gets or sets the icon name
/// </summary>
[XmlAttribute("icon")]
public string IconName { get; set; }
#endregion
#region Methods

View File

@@ -5,40 +5,48 @@ 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")
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/LightTheme/functions/"+fileName+"_159.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+"_159.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")
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/LightTheme/emotions/"+fileName+"_159.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+"_159.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")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/listicons/"+fileName+"_159.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+"_159.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")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/optionbuttons/"+fileName+"_159.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+"_159.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")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/others/"+fileName+"_159.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+"_159.png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")
os.chdir("srcImages/food")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/food/"+fileName+"_159.png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/DarkTheme/food/"+fileName+"_159.png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")