@@ -123,7 +123,11 @@
|
||||
<Compile Include="Pages\Setting\UserProfil.xaml.cs">
|
||||
<DependentUpon>UserProfil.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Icons.Designer.cs" />
|
||||
<Compile Include="Resources\Icons.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Icons.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Utility\Lui\Button\EmailButton.cs" />
|
||||
<Compile Include="Feed\Link\CommonLinkFeed.cs" />
|
||||
@@ -353,6 +357,10 @@
|
||||
<None Include="Properties\WMAppManifest.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Resources\Icons.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>Icons.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\AlignmentGrid.png" />
|
||||
@@ -434,9 +442,9 @@
|
||||
<LastGenOutput>Constants.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Icons.resx">
|
||||
<None Include="Resources\Icons.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
|
||||
@@ -447,6 +455,9 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="File\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</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.
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace CampusAppWP8.Model.Lecture
|
||||
result += StringManager.AddNewLine(tmpLecturer.ToString());
|
||||
}
|
||||
|
||||
this.LecturerString = StringManager.RemvoveNewLine(result);
|
||||
this.LecturerString = StringManager.RemoveNewLine(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -213,7 +213,7 @@ namespace CampusAppWP8.Model.Lecture
|
||||
result += StringManager.AddNewLine(course.Title);
|
||||
}
|
||||
|
||||
this.CourseString = StringManager.RemvoveNewLine(result);
|
||||
this.CourseString = StringManager.RemoveNewLine(result);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -264,6 +264,43 @@ namespace CampusAppWP8
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forces a update from file.
|
||||
/// </summary>
|
||||
public void ForceReadFile()
|
||||
{
|
||||
if (this.file != null)
|
||||
{
|
||||
if (this.onLoading != null)
|
||||
{
|
||||
this.onLoading();
|
||||
}
|
||||
|
||||
string data = this.file.ReadFile();
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
if (this.onFailedFile != null)
|
||||
{
|
||||
this.onFailedFile();
|
||||
}
|
||||
else if (this.onFailed != null)
|
||||
{
|
||||
this.onFailed();
|
||||
}
|
||||
}
|
||||
else if (!data.Equals(string.Empty))
|
||||
{
|
||||
this.DeserializeModel(Encoding.UTF8.GetBytes(data));
|
||||
}
|
||||
|
||||
if ((data != null) && (this.onLoaded != null))
|
||||
{
|
||||
this.onLoaded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the data if necessary, from web or from file, regarding if
|
||||
/// the file data is up to date.
|
||||
|
||||
@@ -1,31 +1,20 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="Icons.Designer.cs" company="BTU/IIT">
|
||||
// <copyright file="Icons.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <remarks>This file is generated by the Icons.tt T4 script.</remarks>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>28.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Resources
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
/// <summary>
|
||||
/// Icons uri string.
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
public class Icons
|
||||
{
|
||||
/// <summary>
|
||||
/// Resource manager object.
|
||||
/// </summary>
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
/// <summary>
|
||||
/// Culture information object.
|
||||
/// </summary>
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Icons" /> class.
|
||||
/// </summary>
|
||||
@@ -34,238 +23,302 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the resource manager.
|
||||
/// </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>
|
||||
/// Gets or sets the culture information.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the campus icon.
|
||||
/// </summary>
|
||||
public static string Campus
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Campus");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the departments icon.
|
||||
/// </summary>
|
||||
public static string Departments
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Departments");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the homework icon.
|
||||
/// </summary>
|
||||
public static string Homework
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Homework");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the lectures icon.
|
||||
/// </summary>
|
||||
public static string Lectures
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Lectures");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the link icon.
|
||||
/// </summary>
|
||||
public static string Link
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Link");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the mensa icon.
|
||||
/// </summary>
|
||||
public static string Mensa
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Mensa");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the news icon.
|
||||
/// </summary>
|
||||
public static string News
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("News");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the opening hours icon.
|
||||
/// </summary>
|
||||
public static string Openhours
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Openhours");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the schedule icon.
|
||||
/// </summary>
|
||||
public static string Schedule
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Schedule");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the search icon.
|
||||
/// </summary>
|
||||
public static string Search
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Search");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the student council icon.
|
||||
/// </summary>
|
||||
public static string StudentCouncil
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("StudentCouncil");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the web mail icon.
|
||||
/// </summary>
|
||||
public static string WebMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("WebMail");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the favorite icon.
|
||||
/// </summary>
|
||||
public static string Favorite
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Favorite");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the delete icon.
|
||||
/// </summary>
|
||||
public static string Delete
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Delete");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the info icon.
|
||||
/// </summary>
|
||||
public static string Info
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Info");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the add icon.
|
||||
/// Gets the uri string of the Add icon.
|
||||
/// </summary>
|
||||
public static string Add
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Add");
|
||||
return Themerize("add_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the phone icon.
|
||||
/// Gets the uri string of the Campus icon.
|
||||
/// </summary>
|
||||
public static string Campus
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("campus_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Cow icon.
|
||||
/// </summary>
|
||||
public static string Cow
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the CowPig icon.
|
||||
/// </summary>
|
||||
public static string CowPig
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Delete icon.
|
||||
/// </summary>
|
||||
public static string Delete
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("delete_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Departments icon.
|
||||
/// </summary>
|
||||
public static string Departments
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("departments_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Favorite icon.
|
||||
/// </summary>
|
||||
public static string Favorite
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("favorite_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Fish icon.
|
||||
/// </summary>
|
||||
public static string Fish
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Fowl icon.
|
||||
/// </summary>
|
||||
public static string Fowl
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Free icon.
|
||||
/// </summary>
|
||||
public static string Free
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Homework icon.
|
||||
/// </summary>
|
||||
public static string Homework
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("homework_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Info icon.
|
||||
/// </summary>
|
||||
public static string Info
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Lamb icon.
|
||||
/// </summary>
|
||||
public static string Lamb
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Lectures icon.
|
||||
/// </summary>
|
||||
public static string Lectures
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("lectures_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Link icon.
|
||||
/// </summary>
|
||||
public static string Link
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("link_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Mensa icon.
|
||||
/// </summary>
|
||||
public static string Mensa
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("mensa_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the News icon.
|
||||
/// </summary>
|
||||
public static string News
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("news_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Openhours icon.
|
||||
/// </summary>
|
||||
public static string Openhours
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("openhours_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Phone icon.
|
||||
/// </summary>
|
||||
public static string Phone
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Phone");
|
||||
return Themerize("phone_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the update icon.
|
||||
/// Gets the uri string of the Pig icon.
|
||||
/// </summary>
|
||||
public static string Pig
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Schedule icon.
|
||||
/// </summary>
|
||||
public static string Schedule
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("schedule_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Search icon.
|
||||
/// </summary>
|
||||
public static string Search
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("search_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the StudentCouncil icon.
|
||||
/// </summary>
|
||||
public static string StudentCouncil
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("student_council_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Update icon.
|
||||
/// </summary>
|
||||
public static string Update
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Update");
|
||||
return Themerize("update_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Vegetarian icon.
|
||||
/// </summary>
|
||||
public static string Vegetarian
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the WebMail icon.
|
||||
/// </summary>
|
||||
public static string WebMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("webmail_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Wild icon.
|
||||
/// </summary>
|
||||
public static string Wild
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("info_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the theme depending string of a icon.
|
||||
/// </summary>
|
||||
@@ -284,7 +337,7 @@ namespace CampusAppWP8.Resources
|
||||
retValue = "/Assets/Icons/LightTheme/";
|
||||
}
|
||||
|
||||
retValue += ResourceManager.GetString(key, resourceCulture);
|
||||
retValue += key;
|
||||
|
||||
return retValue;
|
||||
}
|
||||
87
CampusAppWP8/CampusAppWP8/Resources/Icons.tt
Normal file
87
CampusAppWP8/CampusAppWP8/Resources/Icons.tt
Normal file
@@ -0,0 +1,87 @@
|
||||
<#
|
||||
// ----------------------------------------------------------------------------
|
||||
// <copyright file="Icons.tt" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>14.08.2013</sience>
|
||||
// ----------------------------------------------------------------------------
|
||||
#>
|
||||
<#@ template language="C#" hostspecific="True" #>
|
||||
<#@ assembly name="System.Core" #>
|
||||
<#@ assembly name="System.Xml" #>
|
||||
<#@ import namespace="System.Xml" #>
|
||||
<#@ import namespace="System.Collections.Generic" #>
|
||||
<#@ import namespace="System.IO" #>
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="Icons.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <remarks>This file is generated by the Icons.tt T4 script.</remarks>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>28.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Resources
|
||||
{
|
||||
using System.Windows;
|
||||
|
||||
/// <summary>
|
||||
/// Icons uri string.
|
||||
/// </summary>
|
||||
public class Icons
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Icons" /> class.
|
||||
/// </summary>
|
||||
internal Icons()
|
||||
{
|
||||
}
|
||||
|
||||
<#
|
||||
XmlDocument resData = new XmlDocument();
|
||||
string absPath = this.Host.ResolvePath("Icons.resx");
|
||||
resData.Load(absPath);
|
||||
|
||||
System.Xml.XmlNodeList resDataNodeList = resData.SelectNodes("/root/data");
|
||||
|
||||
foreach (System.Xml.XmlNode xnode in resDataNodeList)
|
||||
{
|
||||
#>
|
||||
/// <summary>
|
||||
/// Gets the uri string of the <# Write(xnode.Attributes["name"].InnerText); #> icon.
|
||||
/// </summary>
|
||||
public static string <#= xnode.Attributes["name"].InnerText #>
|
||||
{
|
||||
get
|
||||
{
|
||||
<# WriteLine("return Themerize(\"" + xnode.InnerText.Replace("\n","").Replace("\r", "").Replace("\t","").Replace(" ","") + "\");"); #>
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
}
|
||||
#>
|
||||
/// <summary>
|
||||
/// Return the theme depending string of a icon.
|
||||
/// </summary>
|
||||
/// <param name="key">icon name</param>
|
||||
/// <returns>uri string of the icon</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 += key;
|
||||
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace CampusAppWP8.Utility
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>input string - newline</returns
|
||||
public static string RemvoveNewLine(string str)
|
||||
public static string RemoveNewLine(string str)
|
||||
{
|
||||
return str.TrimEnd('\n');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user