Merge branch 'feature/#55' into develop
This commit is contained in:
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/phone_159.png
Normal file
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/phone_159.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/phone_159.png
Normal file
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/phone_159.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
@@ -96,6 +96,7 @@
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Feed\Openinghours\OpeninghoursFeed.cs" />
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="Model\Campusmap\MapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\MapPinModel.cs" />
|
||||
@@ -114,6 +115,8 @@
|
||||
<Compile Include="Model\Lecture\LecturePageModel.cs" />
|
||||
<Compile Include="Model\Mensa\MenuModel.cs" />
|
||||
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
|
||||
<Compile Include="Model\Openinghours\OpeninghoursInstitutionModel.cs" />
|
||||
<Compile Include="Model\Openinghours\OpeninghoursModel.cs" />
|
||||
<Compile Include="Model\Utility\UrlParamModel.cs" />
|
||||
<Compile Include="Pages\Campusmap\CampusMapPage.xaml.cs">
|
||||
<DependentUpon>CampusMapPage.xaml</DependentUpon>
|
||||
@@ -157,6 +160,9 @@
|
||||
<DependentUpon>NewsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\Events\RSSModel.cs" />
|
||||
<Compile Include="Pages\Openinghours\OpeninghoursPage.xaml.cs">
|
||||
<DependentUpon>OpeninghoursPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="pages\StartPage.xaml.cs">
|
||||
<DependentUpon>StartPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -244,6 +250,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Openinghours\OpeninghoursPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="pages\StartPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -268,6 +278,7 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Icons\DarkTheme\campus_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\phone_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" />
|
||||
@@ -284,6 +295,7 @@
|
||||
<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\phone_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" />
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Openinghours
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using CampusAppWP8.Model.Openinghours;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for MesaFeeds
|
||||
/// </summary>
|
||||
public class OpeninghoursFeed : XmlFeed<OpeninghoursModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursFeed" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursFeed()
|
||||
: base(URLList.OpeninghoursFeedURL, FileList.OpeninghoursXmlFile)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Protected
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </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="Pages"/>.
|
||||
/// </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>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </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)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,581 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursInstitutionModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Openinghours
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
public class OpeninghoursInstitutionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// German version of the institution title.
|
||||
/// </summary>
|
||||
private string titleDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the institution title.
|
||||
/// </summary>
|
||||
private string titleEN = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on monday.
|
||||
/// </summary>
|
||||
private string dayMonday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on tuesday.
|
||||
/// </summary>
|
||||
private string dayTuesday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on wednesday.
|
||||
/// </summary>
|
||||
private string dayWednesday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on thursday.
|
||||
/// </summary>
|
||||
private string dayThursday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on friday.
|
||||
/// </summary>
|
||||
private string dayFriday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on saturday.
|
||||
/// </summary>
|
||||
private string daySaturday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on sunday.
|
||||
/// </summary>
|
||||
private string daySunday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Email address of the institution.
|
||||
/// </summary>
|
||||
private string infoEmail = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Phone number of the institution.
|
||||
/// </summary>
|
||||
private string infoPhone = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Building name where the institution is located.
|
||||
/// </summary>
|
||||
private string infoBuilding = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Room where the institution is located.
|
||||
/// </summary>
|
||||
private string infoRoom = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// German version of the comment.
|
||||
/// </summary>
|
||||
private string commentDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the comment.
|
||||
/// </summary>
|
||||
private string commentEN = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursInstitutionModel" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursInstitutionModel()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german title of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("title_de")]
|
||||
public string Title_DE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.titleDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.titleDE = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english title of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("title_en")]
|
||||
public string Title_EN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.titleEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.titleEN = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on monday.
|
||||
/// </summary>
|
||||
[XmlAttribute("monday")]
|
||||
public string Monday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayMonday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayMonday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on tuesday.
|
||||
/// </summary>
|
||||
[XmlAttribute("tuesday")]
|
||||
public string Tuesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayTuesday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayTuesday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on wednesday.
|
||||
/// </summary>
|
||||
[XmlAttribute("wednesday")]
|
||||
public string Wednesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayWednesday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayWednesday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on thursday.
|
||||
/// </summary>
|
||||
[XmlAttribute("thursday")]
|
||||
public string Thursday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayThursday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayThursday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on friday.
|
||||
/// </summary>
|
||||
[XmlAttribute("friday")]
|
||||
public string Friday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayFriday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayFriday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on saturday.
|
||||
/// </summary>
|
||||
[XmlAttribute("saturday")]
|
||||
public string Saturday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.daySaturday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.daySaturday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on sunday.
|
||||
/// </summary>
|
||||
[XmlAttribute("sunday")]
|
||||
public string Sunday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.daySunday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.daySunday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email address of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("email")]
|
||||
public string EMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoEmail;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoEmail = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the phone number of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("phone")]
|
||||
public string Phone
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoPhone;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoPhone = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the building where the institution is located.
|
||||
/// </summary>
|
||||
[XmlAttribute("location_building")]
|
||||
public string Building
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoBuilding;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoBuilding = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the room where the institution is located.
|
||||
/// </summary>
|
||||
[XmlAttribute("location_room")]
|
||||
public string Room
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoRoom;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoRoom = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german comment.
|
||||
/// </summary>
|
||||
[XmlAttribute("comment_de")]
|
||||
public string Comment_DE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.commentDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.commentDE = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english comment.
|
||||
/// </summary>
|
||||
[XmlAttribute("comment_en")]
|
||||
public string Comment_EN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.commentEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.commentEN = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized title. If the phone is set to german language,
|
||||
/// the german title will be returned otherwise the english title.
|
||||
/// </summary>
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.titleDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.titleEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized comment. if the phone is set to german language,
|
||||
/// the german comment will be returned otherwise the english comment.
|
||||
/// </summary>
|
||||
public string Comment
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.commentDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.commentEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string containing the email address and the institution
|
||||
/// title separated by ':'.
|
||||
/// </summary>
|
||||
public string EMailTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.EMail + ":" + this.Title;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string containing the phone number and the institution
|
||||
/// title separated by ':'.
|
||||
/// </summary>
|
||||
public string PhoneTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Phone + ":" + this.Title;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the monday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleMonday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayMonday == string.Empty) || (this.dayMonday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the tuesday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleTuesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayTuesday == string.Empty) || (this.dayTuesday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the wednesday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleWednesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayWednesday == string.Empty) || (this.dayWednesday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the thursday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleThursday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayThursday == string.Empty) || (this.dayThursday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the friday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleFriday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayFriday == string.Empty) || (this.dayFriday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the saturday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleSaturday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.daySaturday == string.Empty) || (this.daySaturday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the sunday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleSunday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.daySunday == string.Empty) || (this.daySunday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the comment.
|
||||
/// </summary>
|
||||
public Visibility VisibleComment
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.Comment == string.Empty) || (this.Comment.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the email address.
|
||||
/// </summary>
|
||||
public Visibility VisibleEMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoEmail == string.Empty) || (this.infoEmail.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the phone number.
|
||||
/// </summary>
|
||||
public Visibility VisiblePhone
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoPhone == string.Empty) || (this.infoPhone.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the room.
|
||||
/// </summary>
|
||||
public Visibility VisibleRoom
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoRoom == string.Empty) || (this.infoRoom.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the building.
|
||||
/// </summary>
|
||||
public Visibility VisibleBuilding
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoBuilding == string.Empty) || (this.infoBuilding.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Removes unwanted chars in a string.
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>fixed string</returns>
|
||||
private string FixOpeninghoursString(string str)
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
retValue = str.Replace(" | ", "\n");
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Openinghours
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for opening hours.
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class OpeninghoursModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Time when the model was created.
|
||||
/// </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets feed information item list.
|
||||
/// </summary>
|
||||
[XmlArray("data")]
|
||||
[XmlArrayItem("institution")]
|
||||
public ObservableCollection<OpeninghoursInstitutionModel> institutions { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursModel" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursModel()
|
||||
{
|
||||
this.createTime = DateTime.Now;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model.
|
||||
/// </summary>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.createTime;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Institutions.
|
||||
/// </summary>
|
||||
public ObservableCollection<OpeninghoursInstitutionModel> Institutions
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.institutions;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Openinghours.OpeninghoursPage"
|
||||
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>
|
||||
|
||||
<!-- Title and headline -->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.OpenHoursApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="64"/>
|
||||
</StackPanel>
|
||||
<!-- Content -->
|
||||
<ProgressBar Name="ProgressBar" Grid.Row="1" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<ListBox x:Name="InstitutionPanel" Grid.Row="1">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<Button Content="{Binding Title}" Background="Gray" BorderBrush="Gray" Foreground="Black" Margin="-10,-10,-10,-10" Click="InstitutionBtn_Click"/>
|
||||
<StackPanel Visibility="Collapsed">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!--day-->
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<!--time-->
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<!--monday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--tuesday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--wednesday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--thursday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--friday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--saturday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--sunday-->
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--row 0 monday-->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Monday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleMonday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Monday}" Visibility="{Binding VisibleMonday}" HorizontalAlignment="Left"/>
|
||||
<!--row 1 tuesday-->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Tuesday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleTuesday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Tuesday}" Visibility="{Binding VisibleTuesday}" HorizontalAlignment="Left"/>
|
||||
<!--row 2 wednesday-->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Wednesday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleWednesday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Wednesday}" Visibility="{Binding VisibleWednesday}" HorizontalAlignment="Left"/>
|
||||
<!--row 3 thursday-->
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Thursday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleThursday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Thursday}" Visibility="{Binding VisibleThursday}" HorizontalAlignment="Left"/>
|
||||
<!--row 4 friday-->
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Friday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleFriday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding Friday}" Visibility="{Binding VisibleFriday}" HorizontalAlignment="Left"/>
|
||||
<!--row 5 saturday-->
|
||||
<TextBlock Grid.Row="5" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Saturday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleSaturday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding Saturday}" Visibility="{Binding VisibleSaturday}" HorizontalAlignment="Left"/>
|
||||
<!--row 6 sunday-->
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" Text="{Binding Path=LocalizedResources.Time_Day_Sunday, Source={StaticResource LocalizedStrings}}" FontWeight="Bold" Visibility="{Binding VisibleSunday}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding Sunday}" Visibility="{Binding VisibleSunday}" HorizontalAlignment="Left"/>
|
||||
</Grid>
|
||||
<Grid Margin="0,12,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--building-->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Path=LocalizedResources.Building, Source={StaticResource LocalizedStrings}}" Visibility="{Binding VisibleBuilding}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Building}" Visibility="{Binding VisibleBuilding}" HorizontalAlignment="Left" Padding="10,3,10,0"/>
|
||||
<!--room-->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Path=LocalizedResources.Room, Source={StaticResource LocalizedStrings}}" Visibility="{Binding VisibleRoom}" Padding="10,3,10,0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Room}" Visibility="{Binding VisibleRoom}" HorizontalAlignment="Left" Padding="10,3,10,0"/>
|
||||
</Grid>
|
||||
<!--hint text-->
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.Hint, Source={StaticResource LocalizedStrings}}" Visibility="{Binding VisibleComment}" Padding="10,3,10,0" Margin="0,12,0,0" FontStyle="Italic"/>
|
||||
<TextBlock Text="{Binding Comment}" Visibility="{Binding VisibleComment}" TextWrapping="Wrap" Padding="10,3,10,0"/>
|
||||
<Grid Margin="0,6,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--mail button-->
|
||||
<Button Grid.Column="0" Tag="{Binding EMailTitle}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisibleEMail}" Click="EMailBtn_Click" Padding="0" Margin="-10">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.WebMail, Source={StaticResource ThemelizedIcons}}"/>
|
||||
</Button>
|
||||
<!--phone button-->
|
||||
<Button Grid.Column="1" Tag="{Binding PhoneTitle}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisiblePhone}" Click="PhoneBtn_Click" Padding="0" Margin="-10">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Phone, Source={StaticResource ThemelizedIcons}}"/>
|
||||
</Button>
|
||||
<!--location button-->
|
||||
<Button Grid.Column="2" Tag="{Binding Building}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisibleBuilding}" Click="LocationBtn_Click" Padding="0" Margin="-10">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Campus, Source={StaticResource ThemelizedIcons}}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -0,0 +1,196 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Openinghours
|
||||
{
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.Openinghours;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours page.
|
||||
/// </summary>
|
||||
public partial class OpeninghoursPage : PhoneApplicationPage
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours feed object.
|
||||
/// </summary>
|
||||
private OpeninghoursFeed feed = null;
|
||||
|
||||
/// <summary>
|
||||
/// last visible UI element.
|
||||
/// </summary>
|
||||
private UIElement lastOpenUIElem = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursPage" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursPage()
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
if (e.NavigationMode != System.Windows.Navigation.NavigationMode.Back)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
|
||||
this.feed.LoadFeed();
|
||||
}
|
||||
|
||||
// protected
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the opening hours feed.
|
||||
/// </summary>
|
||||
private void InitializeFeed()
|
||||
{
|
||||
this.feed = new OpeninghoursFeed();
|
||||
this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will be execute if the feed is ready.
|
||||
/// </summary>
|
||||
private void FeedIsReady()
|
||||
{
|
||||
this.SetupInstitutionList();
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Setup the institution list.
|
||||
/// </summary>
|
||||
private void SetupInstitutionList()
|
||||
{
|
||||
this.InstitutionPanel.ItemsSource = this.feed.Model.Institutions;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a institution.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void InstitutionBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.lastOpenUIElem != null)
|
||||
{
|
||||
this.lastOpenUIElem.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
FrameworkElement btn = sender as FrameworkElement;
|
||||
StackPanel parent = btn.Parent as StackPanel;
|
||||
|
||||
if (parent.Children.Count() >= 2)
|
||||
{
|
||||
if (this.lastOpenUIElem != parent.Children[1])
|
||||
{
|
||||
this.lastOpenUIElem = parent.Children[1];
|
||||
this.lastOpenUIElem.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lastOpenUIElem = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a mail button.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void EMailBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempUIElem = sender as FrameworkElement;
|
||||
|
||||
string[] info = tempUIElem.Tag.ToString().Split(':');
|
||||
|
||||
if ((info.Count() > 0) && (info[0] != null))
|
||||
{
|
||||
EmailComposeTask emailTask = new EmailComposeTask();
|
||||
emailTask.To = "mailto:" + info[0];
|
||||
emailTask.Show();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a phone button.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void PhoneBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempUIElem = sender as FrameworkElement;
|
||||
PhoneCallTask phoneCallTask = new PhoneCallTask();
|
||||
|
||||
string[] info = tempUIElem.Tag.ToString().Split(':');
|
||||
|
||||
if ((info.Count() > 0) && (info[0] != null))
|
||||
{
|
||||
phoneCallTask.PhoneNumber = info[0];
|
||||
}
|
||||
|
||||
if ((info.Count() > 1) && (info[1] != null))
|
||||
{
|
||||
phoneCallTask.DisplayName = info[1];
|
||||
}
|
||||
|
||||
phoneCallTask.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a location button.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void LocationBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempUIElem = sender as FrameworkElement;
|
||||
|
||||
// TODO: open campusmap
|
||||
}
|
||||
|
||||
// private
|
||||
#endregion
|
||||
// Method
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
<Capability Name="ID_CAP_MAP" />
|
||||
<Capability Name="ID_CAP_LOCATION" />
|
||||
<Capability Name="ID_CAP_ISV_CAMERA" />
|
||||
<Capability Name="ID_CAP_PHONEDIALER" />
|
||||
</Capabilities>
|
||||
<Tasks>
|
||||
<DefaultTask Name="_default" NavigationPage="pages/StartPage.xaml" />
|
||||
|
||||
@@ -87,6 +87,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Gebäude ähnelt.
|
||||
/// </summary>
|
||||
public static string Building {
|
||||
get {
|
||||
return ResourceManager.GetString("Building", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt.
|
||||
/// </summary>
|
||||
@@ -150,6 +159,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Hinweis ähnelt.
|
||||
/// </summary>
|
||||
public static string Hint {
|
||||
get {
|
||||
return ResourceManager.GetString("Hint", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Hausaufgaben ähnelt.
|
||||
/// </summary>
|
||||
@@ -447,6 +465,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Raum ähnelt.
|
||||
/// </summary>
|
||||
public static string Room {
|
||||
get {
|
||||
return ResourceManager.GetString("Room", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Beispielwert für die Laufzeiteigenschaft ähnelt.
|
||||
/// </summary>
|
||||
@@ -474,6 +501,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Samstag ähnelt.
|
||||
/// </summary>
|
||||
public static string Time_Day_Saturday {
|
||||
get {
|
||||
return ResourceManager.GetString("Time_Day_Saturday", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Sonntag ähnelt.
|
||||
/// </summary>
|
||||
public static string Time_Day_Sunday {
|
||||
get {
|
||||
return ResourceManager.GetString("Time_Day_Sunday", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Donnerstag ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -272,4 +272,19 @@
|
||||
<data name="LectureApp_ListPickerHeaderCourse" xml:space="preserve">
|
||||
<value>Studiengangauswahl</value>
|
||||
</data>
|
||||
<data name="Building" xml:space="preserve">
|
||||
<value>Gebäude</value>
|
||||
</data>
|
||||
<data name="Hint" xml:space="preserve">
|
||||
<value>Hinweis</value>
|
||||
</data>
|
||||
<data name="Room" xml:space="preserve">
|
||||
<value>Raum</value>
|
||||
</data>
|
||||
<data name="Time_Day_Saturday" xml:space="preserve">
|
||||
<value>Samstag</value>
|
||||
</data>
|
||||
<data name="Time_Day_Sunday" xml:space="preserve">
|
||||
<value>Sonntag</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -231,6 +231,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Openinghours/OpeninghoursPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
internal static string PathOpeninghours_OpeninghoursPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathOpeninghours_OpeninghoursPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.zv.tu-cottbus.de/LSFveranst/LSF4 ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -186,4 +186,7 @@
|
||||
<data name="PathNews_NewsIndexPage" xml:space="preserve">
|
||||
<value>/Pages/News/NewsIndexPage.xaml</value>
|
||||
</data>
|
||||
<data name="PathOpeninghours_OpeninghoursPage" xml:space="preserve">
|
||||
<value>/Pages/Openinghours/OpeninghoursPage.xaml</value>
|
||||
</data>
|
||||
</root>
|
||||
114
CampusAppWP8/CampusAppWP8/Resources/Icons.Designer.cs
generated
114
CampusAppWP8/CampusAppWP8/Resources/Icons.Designer.cs
generated
@@ -8,7 +8,8 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Resources {
|
||||
namespace CampusAppWP8.Resources
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
@@ -22,24 +23,31 @@ namespace CampusAppWP8.Resources {
|
||||
[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 {
|
||||
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() {
|
||||
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);
|
||||
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;
|
||||
@@ -51,11 +59,14 @@ namespace CampusAppWP8.Resources {
|
||||
/// 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 {
|
||||
public static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
@@ -86,8 +97,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die campus_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus {
|
||||
get {
|
||||
public static string Campus
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Campus");
|
||||
}
|
||||
}
|
||||
@@ -95,8 +108,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die departments_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Departments {
|
||||
get {
|
||||
public static string Departments
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Departments");
|
||||
}
|
||||
}
|
||||
@@ -104,8 +119,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die homework_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Homework {
|
||||
get {
|
||||
public static string Homework
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Homework");
|
||||
}
|
||||
}
|
||||
@@ -113,8 +130,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die lectures_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Lectures {
|
||||
get {
|
||||
public static string Lectures
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Lectures");
|
||||
}
|
||||
}
|
||||
@@ -122,8 +141,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die link_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Link {
|
||||
get {
|
||||
public static string Link
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Link");
|
||||
}
|
||||
}
|
||||
@@ -131,8 +152,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die mensa_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Mensa {
|
||||
get {
|
||||
public static string Mensa
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Mensa");
|
||||
}
|
||||
}
|
||||
@@ -140,8 +163,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die news_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string News {
|
||||
get {
|
||||
public static string News
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("News");
|
||||
}
|
||||
}
|
||||
@@ -149,8 +174,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die openhours_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Openhours {
|
||||
get {
|
||||
public static string Openhours
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Openhours");
|
||||
}
|
||||
}
|
||||
@@ -158,8 +185,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die schedule_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Schedule {
|
||||
get {
|
||||
public static string Schedule
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Schedule");
|
||||
}
|
||||
}
|
||||
@@ -167,8 +196,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die search_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Search {
|
||||
get {
|
||||
public static string Search
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Search");
|
||||
}
|
||||
}
|
||||
@@ -176,8 +207,10 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die student_council_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string StudentCouncil {
|
||||
get {
|
||||
public static string StudentCouncil
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("StudentCouncil");
|
||||
}
|
||||
}
|
||||
@@ -185,10 +218,23 @@ namespace CampusAppWP8.Resources {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die webmail_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string WebMail {
|
||||
get {
|
||||
public static string WebMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("WebMail");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die phone_159.png ähnelt.
|
||||
/// </summary>
|
||||
public static string Phone
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("Phone");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,6 +141,9 @@
|
||||
<data name="Openhours" xml:space="preserve">
|
||||
<value>openhours_159.png</value>
|
||||
</data>
|
||||
<data name="Phone" xml:space="preserve">
|
||||
<value>phone_159.png</value>
|
||||
</data>
|
||||
<data name="Schedule" xml:space="preserve">
|
||||
<value>schedule_159.png</value>
|
||||
</data>
|
||||
|
||||
@@ -1,14 +1,33 @@
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ThemelizedIcons.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Bietet Zugriff auf Zeichenfolgenressourcen.
|
||||
/// Theme icons.
|
||||
/// </summary>
|
||||
public class ThemelizedIcons
|
||||
{
|
||||
/// <summary>
|
||||
/// Resource object.
|
||||
/// </summary>
|
||||
private static Icons themelized = new Icons();
|
||||
|
||||
public Icons ThemelizedIcon { get { return themelized; } }
|
||||
/// <summary>
|
||||
/// Gets the resource object.
|
||||
/// </summary>
|
||||
public Icons ThemelizedIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
return themelized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@
|
||||
</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" IsEnabled="False">
|
||||
<Button Name="OpenHoursAppButton" Grid.Row="3" Grid.Column="0" BorderBrush="{x:Null}" Background="{x:Null}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0" Click="OpenOpeninghoursApp">
|
||||
<StackPanel Height="auto" Margin="-12,-12,-12,-12">
|
||||
<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" />
|
||||
|
||||
@@ -119,5 +119,16 @@ namespace CampusAppWP8.Pages
|
||||
Uri url = new Uri(Constants.PathMail_WebMailPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the opening hours page.
|
||||
/// </summary>
|
||||
/// <param name="sender">opening hours button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void OpenOpeninghoursApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathOpeninghours_OpeninghoursPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,28 +2,27 @@
|
||||
// <copyright file="FileList.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <author>stubbfel, fiedlchr</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
|
||||
/// Class contain some default names of files.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This Class may be become to a resource file
|
||||
/// 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
|
||||
/// Name of the file for the feed of the mensa.
|
||||
/// </summary>
|
||||
public static readonly string MensaXmlFile = "MesaFeed.xml";
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours feed file name.
|
||||
/// </summary>
|
||||
public static readonly string OpeninghoursXmlFile = "OpeninghoursFeed.xml";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// <copyright file="URLList.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <author>stubbfel, fiedlchr</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
@@ -17,14 +17,29 @@ namespace CampusAppWP8.Utility
|
||||
/// </remarks>
|
||||
public static class URLList
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Url for the feed of the mensa
|
||||
/// 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);
|
||||
public static Uri DepartmentFeedURL = new Uri("http://www.tu-cottbus.de/campusapp-data/professorships.xml", UriKind.Absolute);
|
||||
public static Uri EventsFeedURL = new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php", UriKind.Absolute);
|
||||
public static Uri NewsFeedURL = new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php", UriKind.Absolute);
|
||||
|
||||
/// <summary>
|
||||
/// Url of the department feed.
|
||||
/// </summary>
|
||||
public static readonly Uri DepartmentFeedURL = new Uri("http://www.tu-cottbus.de/campusapp-data/professorships.xml", UriKind.Absolute);
|
||||
|
||||
/// <summary>
|
||||
/// Url of the event feed.
|
||||
/// </summary>
|
||||
public static readonly Uri EventsFeedURL = new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php", UriKind.Absolute);
|
||||
|
||||
/// <summary>
|
||||
/// Url of the news feed.
|
||||
/// </summary>
|
||||
public static readonly Uri NewsFeedURL = new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php", UriKind.Absolute);
|
||||
|
||||
/// <summary>
|
||||
/// Url of the opening hours feed.
|
||||
/// </summary>
|
||||
public static readonly Uri OpeninghoursFeedURL = new Uri("http://www.tu-cottbus.de/campusapp-data/getdata.php?db=openinghours&app=2&appversion=1", UriKind.Absolute);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user