diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
index 880f1859..19f0fb80 100644
--- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
+++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
@@ -97,10 +97,12 @@
App.xaml
-
-
-
-
+
+
+
+
+
+
@@ -109,14 +111,22 @@
-
+
CampusMapPage.xaml
-
+
+
+
DepartmentPage.xaml
-
-
+
+
+ EventIndexPage.xaml
+
+
+ EventPage.xaml
+
+
LecturePage.xaml
@@ -134,17 +144,18 @@
MensaPage.xaml
-
+
+
+ NewsIndexPage.xaml
+
+
NewsPage.xaml
-
-
- RSSNewsTemplate.xaml
-
-
+
+
StartPage.xaml
-
+
WebmailPage.xaml
@@ -173,11 +184,11 @@
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
@@ -197,23 +208,31 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
MSBuild:Compile
Designer
@@ -279,6 +298,7 @@
PublicResXFileCodeGenerator
AppResources.Designer.cs
+ Designer
ResXFileCodeGenerator
diff --git a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs
new file mode 100644
index 00000000..27402138
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs
@@ -0,0 +1,37 @@
+using CampusAppWP8.Model.Departments;
+using CampusAppWP8.Utility;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CampusAppWP8.Feed.Departments
+{
+ class DepartmentFeed : XmlFeed
+ {
+ public DepartmentFeed() : base(URLList.DepartmentFeedURL, "DepartmentFeed.xml")
+ {
+
+ }
+ public System.Collections.ObjectModel.ObservableCollection _faculties { get; set; }
+
+ ///
+ /// Method implement CheckIsModelUpToDate()-Method
+ ///
+ /// true, if model is up-to-date, otherwise false
+ protected override bool CheckIsModelUpToDate()
+ {
+ return false;
+ }
+
+ ///
+ /// Method implement CheckIsFileUpToDate()-Method
+ ///
+ /// true, if file is up-to-date, otherwise false
+ protected override bool CheckIsFileUpToDate()
+ {
+ return false;
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs
new file mode 100644
index 00000000..29cd3f77
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using CampusAppWP8.Model.events_news;
+using CampusAppWP8.Utility;
+
+namespace CampusAppWP8.Feed.Events
+{
+ ///
+ /// Event Feed.
+ ///
+ public class EventFeed : XmlFeed
+ {
+ ///
+ /// Default constructor.
+ ///
+ public EventFeed() : base(URLList.EventsFeedURL, "EventFeed.xml")
+ {
+ }
+ ///
+ /// Method implement CheckIsModelUpToDate()-Method
+ ///
+ /// true, if model is up-to-date, otherwise false
+ protected override bool CheckIsModelUpToDate()
+ {
+ return false;
+ }
+
+ ///
+ /// Method implement CheckIsFileUpToDate()-Method
+ ///
+ /// true, if file is up-to-date, otherwise false
+ protected override bool CheckIsFileUpToDate()
+ {
+ return true;
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs
new file mode 100644
index 00000000..f74e989c
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using CampusAppWP8.Model.events_news;
+using CampusAppWP8.Utility;
+
+namespace CampusAppWP8.Feed.News
+{
+ ///
+ /// News Feed.
+ ///
+ public class NewsFeed : XmlFeed
+ {
+ ///
+ /// Default constructor.
+ ///
+ public NewsFeed() : base(URLList.NewsFeedURL, "NewsFeed.xml")
+ {
+ }
+
+ ///
+ /// Method implement CheckIsModelUpToDate()-Method
+ ///
+ /// true, if model is up-to-date, otherwise false
+ protected override bool CheckIsModelUpToDate()
+ {
+ return false;
+ }
+
+ ///
+ /// Method implement CheckIsFileUpToDate()-Method
+ ///
+ /// true, if file is up-to-date, otherwise false
+ protected override bool CheckIsFileUpToDate()
+ {
+ return true;
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Departments/ChairModel.cs b/CampusAppWP8/CampusAppWP8/Model/Departments/ChairModel.cs
new file mode 100644
index 00000000..c98aadc2
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Departments/ChairModel.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace CampusAppWP8.Model.Departments
+{
+ ///
+ /// Class to hold information about a professorship chair.
+ ///
+ public class ChairModel : BaseModel
+ {
+ private string name_de; // german name of the chair
+ private string url; // link-url to the chair homepage
+ private string name_en; // english name of the chair
+
+ ///
+ /// Default Constructor. Set every class variable to default value.
+ ///
+ public ChairModel()
+ {
+ this.name_de = String.Empty;
+ this.name_en = String.Empty;
+ this.url = String.Empty;
+ }
+
+ ///
+ /// Constructor. Set the german and english name.
+ ///
+ /// Name of the professorship chair.
+ public ChairModel(string name)
+ {
+ this.name_de = name;
+ this.name_en = name;
+ this.url = String.Empty;
+ }
+
+ ///
+ /// Set or return the german name of the chair.
+ ///
+ [XmlAttribute("name_de")]
+ public string Name_DE
+ {
+ get { return this.name_de; }
+ set
+ {
+ if (value != this.name_de)
+ {
+ this.name_de = value;
+ NotifyPropertyChanged("chair");
+ }
+ }
+ }
+
+ ///
+ /// Set or return the english name of the chair.
+ ///
+ [XmlAttribute("name_en")]
+ public string Name_EN
+ {
+ get { return this.name_en; }
+ set
+ {
+ if (value != this.name_en)
+ {
+ this.name_en = value;
+ NotifyPropertyChanged("chair");
+ }
+ }
+ }
+
+ ///
+ /// Set or return the url of the chair homepage.
+ ///
+ [XmlAttribute("url")]
+ public string Url
+ {
+ get { return this.url; }
+ set
+ {
+ if (value != this.url)
+ {
+ this.url = value;
+ NotifyPropertyChanged("chair");
+ }
+ }
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs b/CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentModel.cs
similarity index 66%
rename from CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs
rename to CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentModel.cs
index 0caa7504..ab547308 100644
--- a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs
+++ b/CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentModel.cs
@@ -3,26 +3,32 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
+using System.Windows;
+using System.Xml.Serialization;
-namespace CampusAppWP8.Model.departments
+namespace CampusAppWP8.Model.Departments
{
public class DepartmentModel : BaseModel
{
- private ObservableCollection _chairs = null;
- private string _name;
-
+ [XmlElement("chair")]
+ public ObservableCollection _chairs { get; set; }
+
+ private string _name = "d_mod";
+ private Visibility visible;
public DepartmentModel()
{
+ this.visible = Visibility.Collapsed;
this.Chairs = new ObservableCollection();
- this.LoadData();
+ //this.LoadData();
}
public DepartmentModel(string name)
{
+ this.visible = Visibility.Collapsed;
_name = name;
this.Chairs = new ObservableCollection();
- this.LoadData();
+ //this.LoadData();
}
public void LoadData()
@@ -64,5 +70,17 @@ namespace CampusAppWP8.Model.departments
}
}
}
+
+ public Visibility Visible
+ {
+ get { return this.visible; }
+ set
+ {
+ if (value != this.visible)
+ {
+ this.visible = value;
+ }
+ }
+ }
}
}
diff --git a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs b/CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentViewModel.cs
similarity index 55%
rename from CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs
rename to CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentViewModel.cs
index daf6dee8..5b57d3c6 100644
--- a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs
+++ b/CampusAppWP8/CampusAppWP8/Model/Departments/DepartmentViewModel.cs
@@ -4,26 +4,20 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Xml.Serialization;
-namespace CampusAppWP8.Model.departments
+namespace CampusAppWP8.Model.Departments
{
+ [XmlRoot("root")]
public class DepartmentViewModel : BaseViewModel
{
- private ObservableCollection _faculties = null;
+ [XmlArray("professorships")]
+ [XmlArrayItem("faculty")]
+ public ObservableCollection _faculties { get; set; }
- public DepartmentViewModel()
+ public DepartmentViewModel()
{
this.Faculties = new ObservableCollection();
- this.LoadData();
- }
-
- public void LoadData()
- {
- this.Faculties.Add(new FacultyModel("Fakultät 1"));
- this.Faculties.Add(new FacultyModel("Fakultät 2"));
- this.Faculties.Add(new FacultyModel("Fakultät 3"));
- this.Faculties.Add(new FacultyModel("Fakultät 4"));
- this.Faculties.Add(new FacultyModel("Favoriten"));
}
public ObservableCollection Faculties
diff --git a/CampusAppWP8/CampusAppWP8/Model/Departments/FacultyModel.cs b/CampusAppWP8/CampusAppWP8/Model/Departments/FacultyModel.cs
new file mode 100644
index 00000000..3ceea2a8
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Departments/FacultyModel.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+using CampusAppWP8.Resources;
+
+namespace CampusAppWP8.Model.Departments
+{
+ public class FacultyModel : BaseModel
+ {
+ [XmlElement("chair")]
+ public ObservableCollection chairs { get; set; }
+ //public ObservableCollection _faculties { get; set; }
+
+ private string name = "t_fak";
+
+ public FacultyModel()
+ {
+ //this.Faculties = new ObservableCollection();
+ this.chairs = new ObservableCollection();
+ }
+
+ public FacultyModel(string name)
+ {
+ this.name = name;
+ //this.Faculties = new ObservableCollection();
+ this.chairs = new ObservableCollection();
+ }
+
+ public ObservableCollection Chairs
+ {
+ get { return this.chairs; }
+ set
+ {
+ if (value != this.chairs)
+ {
+ this.chairs = value;
+ NotifyPropertyChanged("faculty");
+ }
+ }
+ }
+
+ [XmlAttribute("id")]
+ public string Name
+ {
+ get
+ {
+ return AppResources.Faculty + " " + this.name;
+ }
+ set
+ {
+ if (value != this.name)
+ {
+ this.name = value;
+ NotifyPropertyChanged("faculty");
+ }
+ }
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Events/RSSChannelModel.cs b/CampusAppWP8/CampusAppWP8/Model/Events/RSSChannelModel.cs
new file mode 100644
index 00000000..2e8bc8aa
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Events/RSSChannelModel.cs
@@ -0,0 +1,45 @@
+using CampusAppWP8.Model;
+using System.Collections.ObjectModel;
+using System.Xml.Serialization;
+
+namespace CampusAppWP8.Model.events_news
+{
+ ///
+ /// Channel Model, which contains the rss feed item list.
+ ///
+ public class RSSChannelModel : BaseModel
+ {
+ ///
+ /// RssFeed information item list.
+ ///
+ [XmlElement("item")]
+ public ObservableCollection item { get; set; }
+
+ ///
+ /// Default constructor.
+ ///
+ public RSSChannelModel()
+ {
+ this.item = new ObservableCollection();
+ }
+
+ ///
+ /// Set/Get the rss feed item list.
+ ///
+ public ObservableCollection Item
+ {
+ get
+ {
+ return this.item;
+ }
+ set
+ {
+ if (value != this.item)
+ {
+ this.item = value;
+ NotifyPropertyChanged("item");
+ }
+ }
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Events/RSSModel.cs b/CampusAppWP8/CampusAppWP8/Model/Events/RSSModel.cs
new file mode 100644
index 00000000..19d53cb9
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Events/RSSModel.cs
@@ -0,0 +1,204 @@
+using CampusAppWP8.Model;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Serialization;
+
+namespace CampusAppWP8.Model.events_news
+{
+ ///
+ /// Contains the rss feed informations.
+ ///
+ public class RSSModel : BaseModel
+ {
+ ///
+ /// Title of the fees
+ ///
+ private string title;
+ ///
+ /// Description text of the feed.
+ ///
+ private string text;
+ ///
+ /// Timestamp (publication date) of the event or news.
+ ///
+ private DateTime timestamp;
+ ///
+ /// Url of the feed.
+ ///
+ private string link;
+
+ ///
+ /// Set/Get the title of the feed.
+ ///
+ [XmlElement("title")]
+ public string Title
+ {
+ get { return this.title; }
+ set
+ {
+ if (this.title != value)
+ {
+ this.title = value;
+ NotifyPropertyChanged("rss");
+ }
+ }
+ }
+
+ ///
+ /// Set/Get the text of the feed.
+ ///
+ [XmlElement("description")]
+ public string Text
+ {
+ get { return this.text; }
+ set
+ {
+ if (this.text != HTMLUnicodeToString(value))
+ {
+ this.text = HTMLUnicodeToString(value);
+ NotifyPropertyChanged("rss");
+ }
+ }
+ }
+
+ ///
+ /// Set/Get the timestamp of the feed as string.
+ ///
+ [XmlElement("pubDate")]
+ public string Timestamp
+ {
+ get { return this.timestamp.ToString("R"); }
+ set
+ {
+ if (this.timestamp != DateTime.Parse(value))
+ {
+ this.timestamp = DateTime.Parse(value);
+ NotifyPropertyChanged("rss");
+ }
+ }
+ }
+
+ ///
+ /// Set/Get the timestamp of the feed as DateTime object.
+ ///
+ public DateTime DTTimestamp
+ {
+ get { return this.timestamp; }
+ set { this.timestamp = value; }
+ }
+
+ ///
+ /// Return the date of the timestamp as string.
+ /// example: Mon, 25.06.2013.
+ ///
+ public string Date
+ {
+ get { return String.Format("{0:ddd, dd.MM.yyyy}", this.timestamp); }
+ }
+
+ ///
+ /// Return the time of the timestamp as string.
+ /// example: 12:56 Uhr.
+ ///
+ public string Time
+ {
+ get { return String.Format("{0:h:mm} Uhr", this.timestamp); }
+ }
+
+ ///
+ /// Set/Get the link/url of the feed.
+ ///
+ [XmlElement("link")]
+ public string Link
+ {
+ get { return this.link; }
+ set
+ {
+ if (this.link != value)
+ {
+ this.link = value;
+ NotifyPropertyChanged("rss");
+ }
+ }
+ }
+
+ ///
+ /// Remove or transform html-unicode specific tags into ascii.
+ ///
+ /// html string
+ /// ascii string
+ private string HTMLUnicodeToString(string htmluni)
+ {
+ StringBuilder retValue = new StringBuilder();
+
+ for(int i = 0; i < htmluni.Length; i++)
+ {
+ switch (htmluni[i])
+ {
+ // beginning tag of the unicode
+ case '&':
+ {
+ int startOff = i + 2;
+ // sear closing tag of the unicode
+ int endOff = htmluni.IndexOf(';', startOff);
+ // get and parse value inbetween
+ string sub = htmluni.Substring(startOff, endOff - startOff);
+ int cVal = int.Parse(sub);
+
+ switch (cVal)
+ {
+ // if the unicode value is 128 (€)
+ case 128:
+ retValue.Append('€');
+ break;
+
+ default:
+ retValue.Append((char)cVal);
+ break;
+ }
+
+ // set the current index to the end of the unicode tag
+ i = endOff;
+ }
+ break;
+ case '<':
+ {
+ // ignoring <..> html tags
+ i = htmluni.IndexOf('>', i);
+ }
+ break;
+ case '\t':
+ // removing tabs
+ break;
+
+ default:
+ {
+ // adding other characters to the return string
+ retValue.Append(htmluni[i]);
+ }
+ break;
+ }
+ }
+
+ return retValue.ToString();
+ }
+
+ ///
+ /// Comparing function for Datetime-Timestamps.
+ /// (currently unused)
+ ///
+ /// first item
+ /// secound item
+ ///
+ public static int CompareTimeStamp(RSSModel item1, RSSModel item2)
+ {
+ if (item1.DTTimestamp > item2.DTTimestamp)
+ return -1;
+ else
+ return 0;
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Model/Events/RSSViewModel.cs b/CampusAppWP8/CampusAppWP8/Model/Events/RSSViewModel.cs
new file mode 100644
index 00000000..a9625df9
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Model/Events/RSSViewModel.cs
@@ -0,0 +1,47 @@
+using CampusAppWP8.Model;
+using System.Collections.ObjectModel;
+using System.Xml.Serialization;
+
+namespace CampusAppWP8.Model.events_news
+{
+ ///
+ /// ViewModel of the rss feed, containing the feed/channel object.
+ ///
+ [XmlRoot("root")]
+ public class RSSViewModel : BaseViewModel
+ {
+ ///
+ /// channel list for the rss feeds.
+ ///
+ [XmlArray("rss")]
+ [XmlArrayItem("channel")]
+ public ObservableCollection channel { get; set; }
+
+ ///
+ /// Default constructor.
+ ///
+ public RSSViewModel()
+ {
+ this.channel = new ObservableCollection();
+ }
+
+ ///
+ /// Set/Get the channel list.
+ ///
+ public ObservableCollection Channel
+ {
+ get
+ {
+ return this.channel;
+ }
+ set
+ {
+ if (value != this.channel)
+ {
+ this.channel = value;
+ NotifyPropertyChanged("channel");
+ }
+ }
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml
similarity index 97%
rename from CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml
rename to CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml
index ef15c95a..7919009f 100644
--- a/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml
@@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Location="clr-namespace:System.Device.Location;assembly=System.Device"
- x:Class="CampusAppWP8.Pages.campusmap.CampusMapPage"
+ x:Class="CampusAppWP8.Pages.Campusmap.CampusMapPage"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
diff --git a/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs
similarity index 93%
rename from CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml.cs
rename to CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs
index 5f3fbb66..9e4cd703 100644
--- a/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs
@@ -8,7 +8,7 @@ using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
-namespace CampusAppWP8.Pages.campusmap
+namespace CampusAppWP8.Pages.Campusmap
{
public partial class CampusMapPage : PhoneApplicationPage
{
diff --git a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml
similarity index 54%
rename from CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml
rename to CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml
index d09797e6..3049f3c9 100644
--- a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml
@@ -1,12 +1,12 @@
-
+
-
+
-
+
-
-
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs
new file mode 100644
index 00000000..2d71e3cd
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs
@@ -0,0 +1,131 @@
+using CampusAppWP8.Feed.Departments;
+using CampusAppWP8.Pages.Departments;
+using CampusAppWP8.Utility;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Tasks;
+using System;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+
+
+namespace CampusAppWP8.Pages.Departments
+{
+ ///
+ /// Pivot page with list of the chairs of the facultis.
+ ///
+ public partial class DepartmentPage : PhoneApplicationPage
+ {
+ ///
+ /// Stores the last visible department panel.
+ ///
+ private UIElement lastVisibleUIElem = null;
+ ///
+ /// department/chair feed object, storing the model and data.
+ ///
+ private DepartmentFeed feed { get; set; }
+
+ ///
+ /// Default constructor.
+ ///
+ public DepartmentPage()
+ {
+ InitializeComponent();
+ // init feed object
+ this.feed = new DepartmentFeed();
+ }
+
+ ///
+ /// On naviagtion to this page.
+ /// Init the feed loading.
+ ///
+ /// event args
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+
+ this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupDepartmentPivot);
+ this.feed.LoadFeed();
+ }
+
+ ///
+ /// Called after the feeds are loaded.
+ /// Set the pivotitem source of this page.
+ ///
+ private void SetupDepartmentPivot()
+ {
+ DepartmentPivot.ItemsSource = feed.Model._faculties;
+ }
+
+ ///
+ /// On orientation changed.
+ ///
+ /// unused
+ /// unused
+ private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
+ {
+ }
+
+ ///
+ /// Called at clicking on the department headline buttons.
+ /// Collapses all visible department panels and open (set to visible)
+ /// the clicked department list.
+ ///
+ /// clicked department button
+ /// unused
+ private void DepartmentBtn_Click(object sender, RoutedEventArgs e)
+ {
+ // if the sender was a button
+ if(sender is Button)
+ {
+ Button btn = sender as Button;
+
+ // if the parent is a stackpanel
+ if(btn.Parent is StackPanel)
+ {
+ StackPanel pan = (StackPanel)btn.Parent;
+
+ // if there is a child after the clicked button in the parent panel
+ if ((pan.Children.Count() > 1) && (pan.Children[1] != null))
+ {
+ // if the clicked department wasn't the one clicked before
+ if (pan.Children[1] != this.lastVisibleUIElem)
+ {
+ // collapse the last visible chair list
+ if (this.lastVisibleUIElem != null)
+ this.lastVisibleUIElem.Visibility = Visibility.Collapsed;
+
+ // open the choosen chair list
+ pan.Children[1].Visibility = Visibility.Visible;
+ this.lastVisibleUIElem = pan.Children[1];
+ }
+ }
+ }
+ }
+ }
+
+ ///
+ /// On clicking a chair textbolock.
+ /// Open the browser with the url of the chair.
+ ///
+ /// clicked chair textblock
+ ///
+ private void ChairTB_Click(object sender, RoutedEventArgs e)
+ {
+ if (sender is FrameworkElement)
+ {
+ FrameworkElement btn = sender as FrameworkElement;
+
+ // if the chair has a url in the tag element
+ if ((btn.Tag != null) && ((btn.Tag as string).Length > 0))
+ {
+ // open browser with the url
+ WebBrowserTask task = new WebBrowserTask();
+ task.Uri = new Uri(btn.Tag.ToString(), UriKind.Absolute);
+ task.Show();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml
new file mode 100644
index 00000000..1c4b30c8
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs
new file mode 100644
index 00000000..3db3df1f
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs
@@ -0,0 +1,108 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+
+using CampusAppWP8.Model.events_news;
+using CampusAppWP8.Utility;
+using CampusAppWP8.Resources;
+using System.Collections.ObjectModel;
+using CampusAppWP8.Feed.Events;
+
+namespace CampusAppWP8.Pages.Events
+{
+ ///
+ /// Overview page of all events.
+ ///
+ public partial class EventIndexPage : PhoneApplicationPage
+ {
+ ///
+ /// Event Feed object, which contains the rss models and data.
+ ///
+ public static EventFeed eventFeed { get; set; }
+
+ ///
+ /// Default constructor.
+ ///
+ public EventIndexPage()
+ {
+ InitializeComponent();
+ EventIndexPage.eventFeed = new EventFeed();
+ }
+
+ ///
+ /// On navigation to this page, creates a FeedEventHandler and load the rss feed data.
+ ///
+ /// event args
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+
+ // Set handler and load the fees informations.
+ EventIndexPage.eventFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupEventPageList);
+ EventIndexPage.eventFeed.LoadFeed();
+ }
+
+ ///
+ /// Is called after the rss feeds are loaded into the eventFeed model.
+ /// If there was no feed informations 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 += EventRowAppButton_Click;
+ tempBtn.Tag = i;
+
+ this.ButtonPanel.Items.Add(tempBtn);
+ }
+ }
+ }
+
+ ///
+ /// Return the eventFeed object.
+ ///
+ static public EventFeed GetEventFeed
+ {
+ get { return EventIndexPage.eventFeed; }
+ set { }
+ }
+
+ ///
+ /// 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/Events/EventPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml
new file mode 100644
index 00000000..e5782082
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs
new file mode 100644
index 00000000..4069459b
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+using System.Xml.Linq;
+using System.Xml;
+using System.IO;
+using Microsoft.Phone.Tasks;
+
+using CampusAppWP8.Model.events_news;
+using CampusAppWP8.Utility;
+using CampusAppWP8.Resources;
+
+
+namespace CampusAppWP8.Pages.Events
+{
+ ///
+ /// EventPage, where every event fees has his own pivotitem.
+ ///
+ public partial class EventPage : PhoneApplicationPage
+ {
+ ///
+ /// for checking if the feed source is already set or not.
+ ///
+ private bool isSourceSet = false;
+
+ ///
+ /// Default constructor.
+ ///
+ public EventPage()
+ {
+ InitializeComponent();
+ }
+
+ ///
+ /// On navigation to this page.
+ /// The pivotitem source will be set, if it wasn't befor.
+ /// Navigating to the submited index of the choosen pivotitem page.
+ ///
+ ///
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+
+ // Set pivotitem Source
+ if (this.isSourceSet == false)
+ {
+ if ((EventIndexPage.GetEventFeed.Model != null)
+ && (EventIndexPage.GetEventFeed.Model.Channel != null)
+ && (EventIndexPage.GetEventFeed.Model.Channel.Count() >= 1))
+ {
+ this.EventPivot.ItemsSource = EventIndexPage.GetEventFeed.Model.Channel[0].item;
+ this.isSourceSet = true;
+ }
+ }
+
+ string pivotIndex = "";
+
+ // Navigate to the selected pivotitem
+ if (NavigationContext.QueryString.TryGetValue("pivotindex", out pivotIndex))
+ {
+ int pivotIndexInt = int.Parse(pivotIndex);
+
+ // if the index is in the range of the array
+ if((pivotIndexInt >= 0) && (pivotIndexInt < EventIndexPage.GetEventFeed.Model.Channel[0].item.Count()))
+ EventPivot.SelectedIndex = pivotIndexInt;
+ else
+ MessageBox.Show("ERROR: pivotIndex out of range!!!");
+ }
+
+ }
+
+ ///
+ /// On clicking the home button (lower left).
+ /// Navigate back to the event index page.
+ ///
+ /// clicked button
+ /// event args
+ private void EventHome_Click(object sender, RoutedEventArgs e)
+ {
+ // Navigate back to the event index page
+ NavigationService.GoBack();
+ }
+
+ ///
+ /// On clicking the link button if a link exists in the feed
+ /// (lower right).
+ /// Open the webbrowser with the url set in the feed.
+ ///
+ /// clicked button
+ /// event args
+ private void EventLink_Click(object sender, RoutedEventArgs e)
+ {
+ FrameworkElement fe = sender as FrameworkElement;
+
+ // Open the webbrowser
+ WebBrowserTask webBrowserTask = new WebBrowserTask();
+ webBrowserTask.Uri = new Uri(fe.Tag.ToString(), UriKind.Absolute);
+ webBrowserTask.Show();
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml
new file mode 100644
index 00000000..9457d700
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs
new file mode 100644
index 00000000..fa1b8840
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs
@@ -0,0 +1,108 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+
+using CampusAppWP8.Model.events_news;
+using CampusAppWP8.Utility;
+using CampusAppWP8.Resources;
+using System.Collections.ObjectModel;
+using CampusAppWP8.Feed.News;
+
+namespace CampusAppWP8.Pages.News
+{
+ ///
+ /// Overview page of all news.
+ ///
+ public partial class NewsIndexPage : PhoneApplicationPage
+ {
+ ///
+ /// News Feed object, which contains the rss models and data.
+ ///
+ public static NewsFeed newsFeed { get; set; }
+
+ ///
+ /// Default constructor.
+ ///
+ public NewsIndexPage()
+ {
+ InitializeComponent();
+ NewsIndexPage.newsFeed = new NewsFeed();
+ }
+
+ ///
+ /// On navigation to this page, creates a FeedEventHandler and load the rss feed data.
+ ///
+ /// event args
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+
+ // Set handler and load the fees informations.
+ NewsIndexPage.newsFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupNewsPageList);
+ NewsIndexPage.newsFeed.LoadFeed();
+ }
+
+ ///
+ /// Is called after the rss feeds are loaded into the newsFeed model.
+ /// If there was no feed informations set to the ui, the feed list
+ /// will be sorted by timestamp and the buttons will be created.
+ ///
+ 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 += NewsRowAppButton_Click;
+ tempBtn.Tag = i;
+
+ this.ButtonPanel.Items.Add(tempBtn);
+ }
+ }
+ }
+
+ ///
+ /// Return the newsFeed object.
+ ///
+ static public NewsFeed GetNewsFeed
+ {
+ get { return NewsIndexPage.newsFeed; }
+ set { }
+ }
+
+ ///
+ /// 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/News/NewsPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml
new file mode 100644
index 00000000..dd9cb0a4
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs
new file mode 100644
index 00000000..cd7a1dfa
--- /dev/null
+++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs
@@ -0,0 +1,108 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+using System.Xml.Linq;
+using System.Xml;
+using System.IO;
+using Microsoft.Phone.Tasks;
+
+using CampusAppWP8.Model.events_news;
+using CampusAppWP8.Utility;
+using CampusAppWP8.Resources;
+
+
+
+namespace CampusAppWP8.Pages.News
+{
+ ///
+ /// EventPage, where every news fees has his own pivotitem.
+ ///
+ public partial class NewsPage : PhoneApplicationPage
+ {
+ ///
+ /// for checking if the feed source is already set or not.
+ ///
+ private bool isSourceSet = false;
+
+ ///
+ /// Default constructor.
+ ///
+ public NewsPage()
+ {
+ InitializeComponent();
+ }
+
+ ///
+ /// On navigation to this page.
+ /// The pivotitem source will be set, if it wasn't befor.
+ /// Navigating to the submited index of the choosen pivotitem page.
+ ///
+ ///
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+
+ // Set pivotitem Source
+ if (this.isSourceSet == false)
+ {
+ if ((NewsIndexPage.GetNewsFeed.Model != null)
+ && (NewsIndexPage.GetNewsFeed.Model.Channel != null)
+ && (NewsIndexPage.GetNewsFeed.Model.Channel.Count() >= 1))
+ {
+ this.NewsPivot.ItemsSource = NewsIndexPage.GetNewsFeed.Model.Channel[0].item;
+ this.isSourceSet = true;
+ }
+ }
+
+ string pivotIndex = "";
+
+ // Navigate to the selected pivotitem
+ if (NavigationContext.QueryString.TryGetValue("pivotindex", out pivotIndex))
+ {
+ int pivotIndexInt = int.Parse(pivotIndex);
+
+ // if the index is in the range of the array
+ if ((pivotIndexInt >= 0) && (pivotIndexInt < NewsIndexPage.GetNewsFeed.Model.Channel[0].item.Count()))
+ NewsPivot.SelectedIndex = pivotIndexInt;
+ else
+ MessageBox.Show("ERROR: pivotIndex out of range!!!");
+ }
+
+ }
+
+ ///
+ /// On clicking the home button (lower left).
+ /// Navigate back to the news index page.
+ ///
+ /// clicked button
+ /// event args
+ private void NewsHome_Click(object sender, RoutedEventArgs e)
+ {
+ // Navigate back to the news index page
+ NavigationService.GoBack();
+ }
+
+ ///
+ /// On clicking the link button if a link exists in the feed
+ /// (lower right).
+ /// Open the webbrowser with the url set in the feed.
+ ///
+ /// clicked button
+ /// event args
+ private void NewsLink_Click(object sender, RoutedEventArgs e)
+ {
+ FrameworkElement fe = sender as FrameworkElement;
+
+ // Open the webbrowser
+ WebBrowserTask webBrowserTask = new WebBrowserTask();
+ webBrowserTask.Uri = new Uri(fe.Tag.ToString(), UriKind.Absolute);
+ webBrowserTask.Show();
+ }
+ }
+}
diff --git a/CampusAppWP8/CampusAppWP8/Pages/webmail/WebmailPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml
similarity index 96%
rename from CampusAppWP8/CampusAppWP8/Pages/webmail/WebmailPage.xaml
rename to CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml
index 0911be64..ba9e152a 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/webmail/WebmailPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Webmail/WebmailPage.xaml
@@ -1,5 +1,5 @@
-
-
diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
index b1011be6..6d31c647 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
@@ -114,6 +114,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Fakultät ähnelt.
+ ///
+ public static string Faculty {
+ get {
+ return ResourceManager.GetString("Faculty", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die Hausaufgaben ähnelt.
///
@@ -348,6 +357,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Link ähnelt.
+ ///
+ public static string NewsLinkBtn {
+ get {
+ return ResourceManager.GetString("NewsLinkBtn", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die Öffnungszeiten ähnelt.
///
@@ -366,6 +384,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt.
+ ///
+ public static string Professorship_chairs {
+ get {
+ return ResourceManager.GetString("Professorship_chairs", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt.
///
diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
index 630168ac..09832ae4 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
@@ -230,6 +230,7 @@
zur Übersicht
+
84
@@ -250,5 +251,14 @@
Veranstaltungsart
+
+
+ Fakultät
+
+
+ Lehrstühle
+
+
+ Link
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs
deleted file mode 100644
index 67b02d11..00000000
--- a/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace CampusAppWP8.Model.departments
-{
- public class ChairModel : BaseModel
- {
- private string _name;
-
- public ChairModel()
- {
- _name = String.Empty;
- }
- public ChairModel(string name)
- {
- _name = name;
- }
-
- public string Name
- {
- get
- {
- return _name;
- }
- set
- {
- if (value != _name)
- {
- _name = value;
- NotifyPropertyChanged("chair");
- }
- }
- }
- }
-}
diff --git a/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs
deleted file mode 100644
index 0ba619e8..00000000
--- a/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Text;
-
-namespace CampusAppWP8.Model.departments
-{
- public class FacultyModel : BaseModel
- {
- private ObservableCollection _faculties = null;
- private string _name;
- public FacultyModel()
- {
- this.Faculties = new ObservableCollection();
- this.LoadData();
- }
-
- public FacultyModel(string name)
- {
- _name = name;
- this.Faculties = new ObservableCollection();
- this.LoadData();
- }
-
- public void LoadData()
- {
- this.Faculties.Add(new DepartmentModel("Institut 1"));
- this.Faculties.Add(new DepartmentModel("Institut 2"));
- this.Faculties.Add(new DepartmentModel("Institut 3"));
- this.Faculties.Add(new DepartmentModel("Institut 4"));
- }
-
- public ObservableCollection Faculties
- {
- get
- {
- return _faculties;
- }
- set
- {
- if (value != _faculties)
- {
- _faculties = value;
- NotifyPropertyChanged("faculty");
- }
- }
- }
-
- public string Name
- {
- get
- {
- return _name;
- }
- set
- {
- if (value != _name)
- {
- _name = value;
- NotifyPropertyChanged("chair");
- }
- }
- }
- }
-}
diff --git a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs
deleted file mode 100644
index 6d3cc29e..00000000
--- a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Navigation;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-
-namespace CampusAppWP8.Pages.departments
-{
- public partial class DepartmentPage : PhoneApplicationPage
- {
- public DepartmentPage()
- {
- InitializeComponent();
- }
-
- private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
- {
- }
- }
-}
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml
deleted file mode 100644
index fde956e1..00000000
--- a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs
deleted file mode 100644
index 08a385d1..00000000
--- a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Navigation;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-using System.Xml.Linq;
-using System.Xml;
-using System.IO;
-
-namespace CampusAppWP8.Pages.news
-{
- public partial class NewsPage : PhoneApplicationPage
- {
- List itemList;
-
- public NewsPage()
- {
- InitializeComponent();
- }
-
- //
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- this.itemList = new List();
- this.itemList.Clear();
-
- WebClient wc = new WebClient();
- wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(WC_DownloadStringCompleted);
-
- wc.DownloadStringAsync(new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php"));
- }
-
- private void WC_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
- {
- if (e.Error != null)
- return;
-
- int i = 0;
-
- XElement xmlitems = XElement.Parse(e.Result);
-
- List elements = xmlitems.Descendants("item").ToList();
-
-
-
- foreach (XElement rssItem in elements)
- {
- if(i < 12)
- {
- RSSItem rss = new RSSItem();
-
- rss.Title = rssItem.Element("title").Value;
- rss.Text = rssItem.Element("description").Value;
- rss.Timestamp = rssItem.Element("pubDate").Value;
-
- this.itemList.Add(rss);
-
-
- Button btn = new Button();
- btn.Name = "NewsRowAppButton" + i;
- btn.Content = rss.Title;
- btn.BorderBrush = null;
- btn.Background = null;
- btn.VerticalContentAlignment = VerticalAlignment.Stretch;
- btn.HorizontalContentAlignment = HorizontalAlignment.Stretch;
- btn.BorderThickness = new Thickness(0);
- btn.Padding = new Thickness(0);
- btn.Click += NewsRowAppButton_Click;
- btn.Tag = i;
-
- PivotItem newPivItem = new PivotItem();
- newPivItem.Name = "NewsPivot" + i;
- newPivItem.Header = rss.Date;
-
- RSSNewsTemplate pvContent = new RSSNewsTemplate();
- pvContent.NewsHeadline.Text = rss.Title;
- pvContent.NewsText.Text = rss.Text;
- pvContent.NewsHome.Click += NewsHome_Click;
-
- newPivItem.Content = pvContent;
- NewsPivot.Items.Add(newPivItem);
-
- ButtonPanel.Items.Add(btn);
-
- i++;
- }
- }
- }
-
- // Button Functions
- private void NewsRowAppButton_Click(object sender, RoutedEventArgs e)
- {
- Button btn = (Button)sender;
- NewsPivot.SelectedIndex = (int)btn.Tag + 1;
- }
-
- private void NewsHome_Click(object sender, RoutedEventArgs e)
- {
- NewsPivot.SelectedIndex = 0;
- }
- }
-}
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/utility/URLList.cs b/CampusAppWP8/CampusAppWP8/utility/URLList.cs
index 7f95380e..61acb03a 100644
--- a/CampusAppWP8/CampusAppWP8/utility/URLList.cs
+++ b/CampusAppWP8/CampusAppWP8/utility/URLList.cs
@@ -17,9 +17,14 @@ namespace CampusAppWP8.Utility
///
public static class URLList
{
+
///
/// Url for the feed of the mensa
///
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);
+
}
}