diff --git a/CampusAppWP8/CampusAppWP8/App.xaml b/CampusAppWP8/CampusAppWP8/App.xaml
index ada05b6a..57460a46 100644
--- a/CampusAppWP8/CampusAppWP8/App.xaml
+++ b/CampusAppWP8/CampusAppWP8/App.xaml
@@ -8,9 +8,16 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
index 0c4c9e11..755f5d02 100644
--- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
+++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
@@ -290,6 +290,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
@@ -350,6 +354,7 @@
PreserveNewest
+
diff --git a/CampusAppWP8/CampusAppWP8/Model/Events/RSSChannelModel.cs b/CampusAppWP8/CampusAppWP8/Model/Events/RSSChannelModel.cs
index 2e8bc8aa..dc24d2e9 100644
--- a/CampusAppWP8/CampusAppWP8/Model/Events/RSSChannelModel.cs
+++ b/CampusAppWP8/CampusAppWP8/Model/Events/RSSChannelModel.cs
@@ -37,6 +37,11 @@ namespace CampusAppWP8.Model.events_news
if (value != this.item)
{
this.item = value;
+ int i = 0;
+ foreach (RSSModel rssItem in this.item)
+ {
+ rssItem.Index = i++;
+ }
NotifyPropertyChanged("item");
}
}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Events/RSSModel.cs b/CampusAppWP8/CampusAppWP8/Model/Events/RSSModel.cs
index 19d53cb9..20833cfd 100644
--- a/CampusAppWP8/CampusAppWP8/Model/Events/RSSModel.cs
+++ b/CampusAppWP8/CampusAppWP8/Model/Events/RSSModel.cs
@@ -108,6 +108,11 @@ namespace CampusAppWP8.Model.events_news
get { return String.Format("{0:h:mm} Uhr", this.timestamp); }
}
+ ///
+ /// Gets or sets the ListIndex
+ ///
+ public int Index { get; set; }
+
///
/// Set/Get the link/url of the feed.
///
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml
index 1c4b30c8..349a04cc 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml
@@ -6,6 +6,7 @@
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"
+ xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -26,7 +27,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs
index 78774169..086eda84 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs
@@ -7,18 +7,12 @@
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Pages.Events
{
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
using System.Linq;
- using System.Windows;
- using System.Windows.Controls;
using System.Windows.Navigation;
using CampusAppWP8.Api.Events;
- using CampusAppWP8.Model.events_news;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
-
+
///
/// Overview page of all events.
///
@@ -59,37 +53,13 @@ namespace CampusAppWP8.Pages.Events
}
///
- /// Is called after the RSS feeds are loaded into the eventFeed model.
+ /// Is called after the RSS feeds are loaded into the newsFeed model.
/// If there was no feed information set to the UI, the feed list
/// will be sorted by timestamp and the buttons will be created.
///
private void SetupEventPageList()
{
- if ((EventIndexPage.eventFeed.Model != null)
- && (EventIndexPage.eventFeed.Model.Channel != null)
- && (EventIndexPage.eventFeed.Model.Channel.Count() >= 1)
- && (this.ButtonPanel.Items.Count() == 0))
- {
- // Sort the list of rssfeeds.
- IEnumerable tempList = EventIndexPage.eventFeed.Model.Channel[0].item.OrderByDescending(e => e.DTTimestamp);
- EventIndexPage.eventFeed.Model.Channel[0].item = new ObservableCollection(tempList);
-
- // Create the buttons for the fees selection and add it to the buttonpanel.
- for (int i = 0; i < EventIndexPage.eventFeed.Model.Channel[0].item.Count(); i++)
- {
- Button tempBtn = new Button();
- tempBtn.Name = "EventRowAppButton";
- tempBtn.Content = EventIndexPage.eventFeed.Model.Channel[0].item[i].Title;
- tempBtn.VerticalContentAlignment = VerticalAlignment.Stretch;
- tempBtn.HorizontalContentAlignment = HorizontalAlignment.Stretch;
- tempBtn.BorderThickness = new Thickness(0.0);
- tempBtn.Padding = new Thickness(0.0);
- tempBtn.Click += this.EventRowAppButton_Click;
- tempBtn.Tag = i;
-
- this.ButtonPanel.Items.Add(tempBtn);
- }
- }
+ this.EventList.ItemsSource = EventIndexPage.eventFeed.Model.Channel[0].Item;
}
///
@@ -99,19 +69,5 @@ namespace CampusAppWP8.Pages.Events
{
get { return EventIndexPage.eventFeed; }
}
-
- ///
- /// Is called on clicking on a feed button.
- /// Navigates to the event pivot page with the information of the
- /// selected feed index.
- ///
- /// pressed button object
- /// event args
- private void EventRowAppButton_Click(object sender, RoutedEventArgs e)
- {
- FrameworkElement tempElem = sender as FrameworkElement;
-
- NavigationService.Navigate(new Uri("/pages/events/EventPage.xaml?pivotindex=" + tempElem.Tag, UriKind.Relative));
- }
}
}
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml
index 496745b9..c480700a 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml
@@ -36,7 +36,7 @@
-
-
+
+
-
+
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs
index 6f490146..07e9eea7 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs
@@ -21,12 +21,6 @@ namespace CampusAppWP8.Pages.Lecture
///
public partial class ResultPage : PhoneApplicationPage
{
-
- ///
- /// last visible UI element.
- ///
- private UIElement lastOpenUIElem = null;
-
///
/// Initializes a new instance of the class.
///
@@ -52,34 +46,5 @@ namespace CampusAppWP8.Pages.Lecture
this.ResultList.ItemsSource = list.Activities;
base.OnNavigatedTo(e);
}
-
- ///
- /// Method toggle the Visibility of the Link- and Details-Buttons
- ///
- /// Caller of the function
- /// some EventArgs
- private void ToggleOptions(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 (!parent.Children[1].Equals(this.lastOpenUIElem))
- {
- this.lastOpenUIElem = parent.Children[1];
- this.lastOpenUIElem.Visibility = Visibility.Visible;
- }
- else
- {
- this.lastOpenUIElem = null;
- }
- }
- }
}
}
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml
index b1d94fc3..f0378ecc 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml
@@ -31,7 +31,7 @@
-
+
@@ -50,7 +50,7 @@
-
+
@@ -58,5 +58,5 @@
-
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml
index 9457d700..9d7ab689 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml
@@ -6,6 +6,7 @@
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"
+ xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -26,7 +27,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs
index 7702f189..a00668fc 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs
@@ -7,15 +7,9 @@
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Pages.News
{
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
using System.Linq;
- using System.Windows;
- using System.Windows.Controls;
using System.Windows.Navigation;
using CampusAppWP8.Api.News;
- using CampusAppWP8.Model.events_news;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
@@ -65,31 +59,7 @@ namespace CampusAppWP8.Pages.News
///
private void SetupNewsPageList()
{
- if ((NewsIndexPage.newsFeed.Model != null)
- && (NewsIndexPage.newsFeed.Model.Channel != null)
- && (NewsIndexPage.newsFeed.Model.Channel.Count() >= 1)
- && (this.ButtonPanel.Items.Count() == 0))
- {
- // Sort the list of rssfeeds.
- IEnumerable tempList = NewsIndexPage.newsFeed.Model.Channel[0].item.OrderByDescending(e => e.DTTimestamp);
- NewsIndexPage.newsFeed.Model.Channel[0].item = new ObservableCollection(tempList);
-
- // Create the buttons for the fees selection and add it to the buttonpanel.
- for (int i = 0; i < NewsIndexPage.newsFeed.Model.Channel[0].item.Count(); i++)
- {
- Button tempBtn = new Button();
- tempBtn.Name = "NewsRowAppButton";
- tempBtn.Content = NewsIndexPage.newsFeed.Model.Channel[0].item[i].Title;
- tempBtn.VerticalContentAlignment = VerticalAlignment.Stretch;
- tempBtn.HorizontalContentAlignment = HorizontalAlignment.Stretch;
- tempBtn.BorderThickness = new Thickness(0.0);
- tempBtn.Padding = new Thickness(0.0);
- tempBtn.Click += this.NewsRowAppButton_Click;
- tempBtn.Tag = i;
-
- this.ButtonPanel.Items.Add(tempBtn);
- }
- }
+ this.NewsList.ItemsSource = NewsIndexPage.newsFeed.Model.Channel[0].Item;
}
///
@@ -99,19 +69,5 @@ namespace CampusAppWP8.Pages.News
{
get { return NewsIndexPage.newsFeed; }
}
-
- ///
- /// Is called on clicking on a feed button.
- /// Navigates to the news pivot page with the information of the
- /// selected feed index.
- ///
- /// pressed button object
- /// event args
- private void NewsRowAppButton_Click(object sender, RoutedEventArgs e)
- {
- FrameworkElement tempElem = sender as FrameworkElement;
-
- NavigationService.Navigate(new Uri("/pages/news/NewsPage.xaml?pivotindex=" + tempElem.Tag, UriKind.Relative));
- }
}
}
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml
index 398984cc..40dce836 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml
@@ -38,8 +38,8 @@
-
-
+
+
@@ -95,7 +95,7 @@
-
+
@@ -112,7 +112,7 @@
-
+
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs
index 33e1f076..eb452409 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs
@@ -28,11 +28,6 @@ namespace CampusAppWP8.Pages.Openinghours
///
private OpeninghoursFeed feed = null;
- ///
- /// last visible UI element.
- ///
- private UIElement lastOpenUIElem = null;
-
#endregion
#region Constructor
@@ -103,35 +98,6 @@ namespace CampusAppWP8.Pages.Openinghours
this.InstitutionPanel.ItemsSource = this.feed.Model.Institutions;
}
- ///
- /// Called on clicking on a institution.
- ///
- /// button object
- /// event args
- 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;
- parent.Children.Count();
- 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;
- }
- }
- }
-
// private
#endregion
// Method
diff --git a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml
index d495d996..6be59cd1 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml
@@ -39,7 +39,7 @@
-
+
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs
index 0ce45221..68429a31 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs
@@ -177,6 +177,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die pivotindex ähnelt.
+ ///
+ public static string ParamPivotIndex {
+ get {
+ return ResourceManager.GetString("ParamPivotIndex", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die Url ähnelt.
///
@@ -186,6 +195,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die /Pages/Events/EventPage.xaml ähnelt.
+ ///
+ public static string PathEvent_EventPage {
+ get {
+ return ResourceManager.GetString("PathEvent_EventPage", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Events/EventIndexPage.xaml ähnelt.
///
@@ -267,6 +285,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die /pages/news/NewsPage.xaml ähnelt.
+ ///
+ public static string PathNews_NewsPage {
+ get {
+ return ResourceManager.GetString("PathNews_NewsPage", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Openinghours/OpeninghoursPage.xaml ähnelt.
///
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
index 3920cc5c..8609e1be 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
@@ -216,4 +216,13 @@
ToggleContent
+
+ pivotindex
+
+
+ /pages/news/NewsPage.xaml
+
+
+ /Pages/Events/EventPage.xaml
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Icon1.ico b/CampusAppWP8/CampusAppWP8/Resources/Icon1.ico
new file mode 100644
index 00000000..e0e8a722
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Resources/Icon1.ico differ
diff --git a/CampusAppWP8/CampusAppWP8/Styles/ListButton.xaml b/CampusAppWP8/CampusAppWP8/Styles/ListButton.xaml
new file mode 100644
index 00000000..b356d6a7
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Styles/ListButton.xaml
@@ -0,0 +1,12 @@
+
+
+
\ No newline at end of file