diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index b4ed6a7b..8a52dd95 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -108,13 +108,13 @@ - + CampusMapPage.xaml - + DepartmentPage.xaml @@ -135,7 +135,7 @@ ModulWebPage.xaml - + ResultDetailPage.xaml diff --git a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs index 27402138..20177aad 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Departments/DepartmentFeed.cs @@ -17,7 +17,7 @@ namespace CampusAppWP8.Feed.Departments public System.Collections.ObjectModel.ObservableCollection _faculties { get; set; } /// - /// Method implement CheckIsModelUpToDate()-Method + /// Method implement CheckIsModelUpToDate()-Method /// /// true, if model is up-to-date, otherwise false protected override bool CheckIsModelUpToDate() @@ -26,7 +26,7 @@ namespace CampusAppWP8.Feed.Departments } /// - /// Method implement CheckIsFileUpToDate()-Method + /// Method implement CheckIsFileUpToDate()-Method /// /// true, if file is up-to-date, otherwise false protected override bool CheckIsFileUpToDate() diff --git a/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs index 29cd3f77..d8da616c 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Events/EventFeed.cs @@ -21,7 +21,7 @@ namespace CampusAppWP8.Feed.Events { } /// - /// Method implement CheckIsModelUpToDate()-Method + /// Method implement CheckIsModelUpToDate()-Method /// /// true, if model is up-to-date, otherwise false protected override bool CheckIsModelUpToDate() @@ -30,7 +30,7 @@ namespace CampusAppWP8.Feed.Events } /// - /// Method implement CheckIsFileUpToDate()-Method + /// Method implement CheckIsFileUpToDate()-Method /// /// true, if file is up-to-date, otherwise false protected override bool CheckIsFileUpToDate() diff --git a/CampusAppWP8/CampusAppWP8/Feed/Lecture/LectureFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Lecture/LectureFeed.cs new file mode 100644 index 00000000..b635d51b --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Feed/Lecture/LectureFeed.cs @@ -0,0 +1,67 @@ +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 13.06.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Feed.Lecture +{ + using System; + using CampusAppWP8.Model.Lecture; + using CampusAppWP8.Utility; + + /// + /// Class for the feed of the Lecture + /// + /// + /// need the XmlAPI + /// + public class LectureFeed : XmlFeed + { + /// + /// Initializes a new instance of the class. + /// + /// the RequestUrl + public LectureFeed(Uri url) + : base(url, "Lecture.xml") + { + this.validRootName = "lsf_auszug"; + } + + /// + /// Method create the RequestUrl + /// + /// + /// have to refactors + /// + /// value of the semester + /// value of the degree + /// value of the course + /// value of the from + /// value of the to + /// return the requestUrl + public static Uri CreateFeedUrl(string semester, string degree, string course, string from, string to) + { + return new Uri("http://www.zv.tu-cottbus.de/LSFveranst/LSF4?Semester=" + semester + "&Abschluss=" + degree + "&Studiengang=" + course + "&Von=" + from + "&Bis=" + to); + } + + /// + /// 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/Mensa/MensaFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs index 565266b7..a025ba3a 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs @@ -5,7 +5,7 @@ // stubbfel // 03.05.2013 //---------------------------------------------------------------------- -namespace CampusAppWP8.Pages.Mensa +namespace CampusAppWP8.Feed.Mensa { using System; using System.Collections.ObjectModel; @@ -34,7 +34,7 @@ namespace CampusAppWP8.Pages.Mensa #region Protected /// - /// Method implement CheckIsModelUpToDate()-Method + /// Method implement CheckIsModelUpToDate()-Method /// /// true, if model is up-to-date, otherwise false protected override bool CheckIsModelUpToDate() @@ -44,7 +44,7 @@ namespace CampusAppWP8.Pages.Mensa } /// - /// Method implement CheckIsFileUpToDate()-Method + /// Method implement CheckIsFileUpToDate()-Method /// /// true, if file is up-to-date, otherwise false protected override bool CheckIsFileUpToDate() diff --git a/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs index f74e989c..a702ebc0 100644 --- a/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs +++ b/CampusAppWP8/CampusAppWP8/Feed/News/NewsFeed.cs @@ -22,7 +22,7 @@ namespace CampusAppWP8.Feed.News } /// - /// Method implement CheckIsModelUpToDate()-Method + /// Method implement CheckIsModelUpToDate()-Method /// /// true, if model is up-to-date, otherwise false protected override bool CheckIsModelUpToDate() @@ -31,7 +31,7 @@ namespace CampusAppWP8.Feed.News } /// - /// Method implement CheckIsFileUpToDate()-Method + /// Method implement CheckIsFileUpToDate()-Method /// /// true, if file is up-to-date, otherwise false protected override bool CheckIsFileUpToDate() diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs index 3c178b2d..d41946f4 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureActivity.cs @@ -1,26 +1,48 @@ -using CampusAppWP8.Utility; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Serialization; - +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 13.06.2013 +//---------------------------------------------------------------------- namespace CampusAppWP8.Model.Lecture { + using System.Collections.ObjectModel; + using System.Xml.Serialization; + using CampusAppWP8.Utility; + + /// + /// Model for a Activity + /// public class LectureActivity { - #region + #region Members + + /// + /// List of lecturer + /// private ObservableCollection lecturer; + + /// + /// a formatted string for the names of the lecturers + /// private string lecturerString; + + /// + /// a formatted string for the names of the courses + /// private string courseString; + + /// + /// a formatted string for the topic of the lecture + /// private string topic; + #endregion #region Constructor /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public LectureActivity() { @@ -30,41 +52,66 @@ namespace CampusAppWP8.Model.Lecture #region Proberty + /// + /// Gets or sets the type of the activity + /// [XmlElement("art")] public string Type { get; set; } + /// + /// Gets or sets the id of the activity + /// [XmlAttribute("id")] public int Id { get; set; } + /// + /// Gets or sets semester of the activity + /// [XmlElement("semester")] public int Semester { get; set; } + /// + /// Gets or sets the contact hour + /// [XmlElement("sws")] public string SWS { get; set; } + /// + /// Gets or sets LectureModule + /// [XmlElement("modul")] - public LectureModul Modul { get; set; } + public LectureModule Modul { get; set; } + /// + /// Gets or sets the lecturers + /// [XmlElement("lehrperson")] - public ObservableCollection Lecturer { + public ObservableCollection Lecturer + { get { - return lecturer; + return this.lecturer; } + set { - if (value != lecturer) + if (value != this.lecturer) { - lecturer = value; + this.lecturer = value; } } } - public string LecturerString { + /// + /// Gets or sets the formatted string of the lecturers + /// + public string LecturerString + { get { return this.lecturerString; } + set { if (value != this.lecturerString) @@ -74,12 +121,16 @@ namespace CampusAppWP8.Model.Lecture } } + /// + /// Gets or sets formatted string of the courses + /// public string CourseString { get { return this.courseString; } + set { if (value != this.courseString) @@ -88,53 +139,77 @@ namespace CampusAppWP8.Model.Lecture } } } - + /// + /// Gets or sets the courses + /// [XmlElement("studiengang")] public ObservableCollection Course { get; set; } + /// + /// Gets or sets the dates of the activity + /// [XmlElement("termin")] public ObservableCollection Dates { get; set; } + /// + /// Gets or sets the Department + /// [XmlElement("zugeordnete_einrichtung")] public string Department { get; set; } + /// + /// Gets or sets the topic of the Lecture + /// [XmlElement("lehrinhalt")] public string Topic { get { - return topic; + return this.topic; } + set { - if (value != topic) + if (value != this.topic) { - topic = StringManager.StripHTML(value); + this.topic = StringManager.StripHTML(value); } } } #endregion - public void createLectureString() + #region Methods + + /// + /// Method create a formatted string of the LecturerList + /// + public void CreateLectureString() { string result = string.Empty; - foreach (LectureLecturer tmpLecturer in Lecturer) + foreach (LectureLecturer tmpLecturer in this.Lecturer) { result += tmpLecturer.ToString() + "\n"; } + this.LecturerString = result.TrimEnd('\n'); } - public void createCourseString() + /// + /// Method create a formatted string of the CourseList + /// + public void CreateCourseString() { string result = string.Empty; - foreach (LectureCourse course in Course) + foreach (LectureCourse course in this.Course) { result += course.Title + "\n"; } + this.CourseString = result.TrimEnd('\n'); } + + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs index 30018c7e..03d40bf4 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureCourse.cs @@ -1,17 +1,29 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml.Serialization; - +// +// Company copyright tag. +// +// stubbfel +// 10.06.2013 +//---------------------------------------------------------------------- namespace CampusAppWP8.Model.Lecture { - public class LectureCourse + using System.Xml.Serialization; + + /// + /// Model for a course + /// + public class LectureCourse { - public LectureCourse() - { - } - [XmlElement("bezeichnung")] - public string Title {get;set;} + /// + /// Initializes a new instance of the class. + /// + public LectureCourse() + { + } + + /// + /// Gets or sets the title of the course + /// + [XmlElement("bezeichnung")] + public string Title { get; set; } } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs index 9e802558..b84ef789 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureDate.cs @@ -1,29 +1,65 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml.Serialization; - +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 10.06.2013 +//---------------------------------------------------------------------- namespace CampusAppWP8.Model.Lecture { + using System.Xml.Serialization; + + /// + /// Model for the date of an activity + /// public class LectureDate { + /// + /// Initializes a new instance of the class. + /// public LectureDate() { } + /// + /// Gets or sets WeekDay + /// [XmlElement("wochentag")] public string WeekDay { get; set; } + + /// + /// Gets or sets From + /// [XmlElement("von")] public string From { get; set; } + + /// + /// Gets or sets To + /// [XmlElement("bis")] public string To { get; set; } + + /// + /// Gets or sets Interval + /// [XmlElement("rhythmus")] public string Interval { get; set; } + + /// + /// Gets or sets Room + /// [XmlElement("raum")] public string Room { get; set; } + + /// + /// Gets or sets StartDate + /// [XmlElement("anfangsdatum")] - public string StarDate { get; set; } + public string StartDate { get; set; } + + /// + /// Gets or sets EndDate + /// [XmlElement("enddatum")] public string EndDate { get; set; } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs index c0cc8b42..1e2d92e5 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureLecturer.cs @@ -1,45 +1,71 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml.Serialization; - +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 10.06.2013 +//---------------------------------------------------------------------- namespace CampusAppWP8.Model.Lecture { + using System.Xml.Serialization; + + /// + /// Model for a lecturer + /// public class LectureLecturer { + /// + /// Initializes a new instance of the class. + /// public LectureLecturer() { } + /// + /// Gets or sets the FirstName of a lecturer + /// [XmlElement("vorname")] public string FirstName { get; set; } + /// + /// Gets or sets the LastName of a lecturer + /// [XmlElement("name")] public string LastName { get; set; } + /// + /// Gets or sets the title of a lecturer + /// [XmlElement("titel")] public string Title { get; set; } + /// + /// Gets or sets the Responsibility of a lecturer + /// [XmlAttribute("zustaendigkeit")] public string Responsibility { get; set; } + /// + /// Method overrides the base ToString() and create an formatted string of the lecturer + /// + /// returns a string like: [Title] FirstName LastName [(Responsibility)] public override string ToString() { string result = string.Empty; - - if (!Title.Equals(string.Empty)) + + if (!this.Title.Equals(string.Empty)) { - result += Title + " "; + result += this.Title + " "; } - result += FirstName + " "; - result += LastName + " "; + result += this.FirstName + " "; + result += this.LastName + " "; - if (!Responsibility.Equals(string.Empty)) + if (!this.Responsibility.Equals(string.Empty)) { - result += "(" + Responsibility + ") "; + result += "(" + this.Responsibility + ") "; } + return result; } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs index 6dff6569..39ede37a 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs @@ -7,15 +7,16 @@ //---------------------------------------------------------------------- namespace CampusAppWP8.Model.Lecture { - using System.Collections.Generic; using System.Collections.ObjectModel; - using System.Xml.Serialization; using System.Linq; + using System.Xml.Serialization; + /// + /// Model for a List of LectureActivity + /// [XmlRoot("lsf_auszug")] public class LectureList { - #region Constructor /// @@ -29,6 +30,9 @@ namespace CampusAppWP8.Model.Lecture #region Proberty + /// + /// Gets or sets List of the activities + /// [XmlArray("veranstaltungsliste")] [XmlArrayItem("veranstaltung")] public ObservableCollection Activities { get; set; } @@ -37,12 +41,17 @@ namespace CampusAppWP8.Model.Lecture #region Methods + /// + /// Method return a certain activity + /// + /// id of the activity + /// the activity (FirstOrDefault) public LectureActivity GetActivity(int id) { - LectureActivity activity = Activities.Where(p => p.Id == id).First(); + LectureActivity activity = this.Activities.Where(p => p.Id == id).FirstOrDefault(); return activity; } - #endregion + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModul.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModul.cs deleted file mode 100644 index 883f763f..00000000 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModul.cs +++ /dev/null @@ -1,70 +0,0 @@ -//----------------------------------------------------------------------- -// -// Company copyright tag. -// -// stubbfel -// 10.06.2013 -//---------------------------------------------------------------------- -namespace CampusAppWP8.Model.Lecture -{ - using CampusAppWP8.Resources; - using System; - using System.Xml.Serialization; - public class LectureModul - { - #region Members - - private int number; - - private Uri url; - - #endregion - - #region Constructor - - public LectureModul() - { - } - - #endregion - - #region Property - - [XmlElement("titel")] - public string Title {get; set;} - - [XmlElement("nummer")] - public int Number{ - get - { - return this.number; - } - set - { - if (value != this.number) - { - this.number = value; - this.createUrl(); - } - } - } - - public Uri Url{ - get - { - return url; - } - } - - #endregion - - #region Methods - - private void createUrl() - { - this.url = new Uri(Constants.UrlLectureModulBaseAddr + number.ToString()); - } - - #endregion - } -} diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModule.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModule.cs new file mode 100644 index 00000000..076407b5 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModule.cs @@ -0,0 +1,98 @@ +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 10.06.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Model.Lecture +{ + using System; + using System.Xml.Serialization; + using CampusAppWP8.Resources; + + /// + /// Model for the module of an lecture + /// + public class LectureModule + { + #region Members + + /// + /// Number of the module (like an id) + /// + private int number; + + /// + /// Url to the website of the module + /// + private Uri url; + + #endregion + + #region Constructor + + /// + /// Initializes a new instance of the class. + /// + public LectureModule() + { + } + + #endregion + + #region Property + + /// + /// Gets or sets the title of the module + /// + [XmlElement("titel")] + public string Title { get; set; } + + /// + /// Gets or sets the number of the module and create the URL + /// + [XmlElement("nummer")] + public int Number + { + get + { + return this.number; + } + + set + { + if (value != this.number) + { + this.number = value; + this.CreateUrl(); + } + } + } + + /// + /// Gets the URL of the module + /// + public Uri Url + { + get + { + return this.url; + } + } + + #endregion + + #region Methods + + /// + /// Method create the url of the module + /// + private void CreateUrl() + { + this.url = new Uri(Constants.UrlLectureModulBaseAddr + this.number.ToString()); + } + + #endregion + } +} diff --git a/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs new file mode 100644 index 00000000..f5e6cba8 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Model/Utility/ListPickerItemModel.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 13.06.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Model.Utility +{ + /// + /// Model for the ListPickerItems + /// + public class ListPickerItemModel + { + /// + /// Gets or sets the Value of an Item + /// + public string Value { get; set; } + + /// + /// Gets or sets the Text (caption) of an Item + /// + public string Text { get; set; } + } +} diff --git a/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs index 2d71e3cd..ed8de0cf 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Departments/DepartmentPage.xaml.cs @@ -1,5 +1,4 @@ using CampusAppWP8.Feed.Departments; -using CampusAppWP8.Pages.Departments; using CampusAppWP8.Utility; using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs index 4d3538e3..3da6312e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs @@ -1,4 +1,4 @@ -using CampusAppWP8.Feed.Events; +using CampusAppWP8.Pages.Events; using CampusAppWP8.Model.events_news; using CampusAppWP8.Utility; using Microsoft.Phone.Controls; @@ -9,6 +9,7 @@ using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation; +using CampusAppWP8.Feed.Events; namespace CampusAppWP8.Pages.Events { diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LectureFeed.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LectureFeed.cs deleted file mode 100644 index 272966c9..00000000 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LectureFeed.cs +++ /dev/null @@ -1,42 +0,0 @@ -using CampusAppWP8.Model.Lecture; -using CampusAppWP8.Utility; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CampusAppWP8.Pages.Lecture -{ - public class LectureFeed : XmlFeed - { - public LectureFeed(Uri url) - : base(url, "Lecture.xml") - { - this.validRootName = "lsf_auszug"; - } - - /// - /// 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; - } - - public static Uri createFeedUrl(string semester, string degree, string course, string from, string to) - { - return new Uri("http://www.zv.tu-cottbus.de/LSFveranst/LSF4?Semester="+semester+"&Abschluss="+degree+"&Studiengang="+course+"&Von="+from+"&Bis="+to); - } - } -} diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs index 1f2cc3af..f88b2de0 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs @@ -11,8 +11,9 @@ namespace CampusAppWP8.Pages.Lecture using System.Collections.Generic; using System.Windows; using System.Windows.Navigation; + using CampusAppWP8.Feed.Lecture; using CampusAppWP8.Model.Lecture; - using CampusAppWP8.Pages.Lecture; + using CampusAppWP8.Model.Utility; using CampusAppWP8.Resources; using CampusAppWP8.Utility; using Microsoft.Phone.Controls; @@ -33,17 +34,17 @@ namespace CampusAppWP8.Pages.Lecture /// /// need to be extend to full list /// - private List courseList = new List() + private List courseList = new List() { - new OptionModel() + new ListPickerItemModel() { Text = "Architektur", Value = "013" }, - new OptionModel() + new ListPickerItemModel() { Text = "Bauingenieurwesen", Value = "017" }, - new OptionModel() + new ListPickerItemModel() { Text = "Betriebswirtschaftslehre", Value = "021" } @@ -52,17 +53,17 @@ namespace CampusAppWP8.Pages.Lecture /// /// List of the degrees /// - private List degreeList = new List() + private List degreeList = new List() { - new OptionModel() + new ListPickerItemModel() { Text = AppResources.Degree_Bachelor, Value = "82" }, - new OptionModel() + new ListPickerItemModel() { Text = AppResources.Degree_Master, Value = "88" }, - new OptionModel() + new ListPickerItemModel() { Text = AppResources.Degree_Diploma, Value = "11" } @@ -71,17 +72,17 @@ namespace CampusAppWP8.Pages.Lecture /// /// List of the semester /// - private List semesterList = new List() + private List semesterList = new List() { - new OptionModel() + new ListPickerItemModel() { Text = "SoSe 13", Value = "20131" }, - new OptionModel() + new ListPickerItemModel() { Text = "WiSe 13/14", Value = "20132" }, - new OptionModel() + new ListPickerItemModel() { Text = "SoSe 14", Value = "20141" } @@ -90,21 +91,21 @@ namespace CampusAppWP8.Pages.Lecture /// /// List for the number of semester /// - private List numberList = new List() + private List numberList = new List() { - new OptionModel() + new ListPickerItemModel() { Text = "1", Value = "1" }, - new OptionModel() + new ListPickerItemModel() { Text = "2", Value = "2" }, - new OptionModel() + new ListPickerItemModel() { Text = "3", Value = "3" }, - new OptionModel() + new ListPickerItemModel() { Text = "4", Value = "4" } @@ -141,12 +142,12 @@ namespace CampusAppWP8.Pages.Lecture /// events arguments private void SendRequest(object sender, RoutedEventArgs e) { - OptionModel semester = (OptionModel)this.Semester.SelectedItem; - OptionModel degree = (OptionModel)this.Degree.SelectedItem; - OptionModel course = (OptionModel)this.Course.SelectedItem; - OptionModel from = (OptionModel)this.From.SelectedItem; - OptionModel to = (OptionModel)this.To.SelectedItem; - Uri request = LectureFeed.createFeedUrl(semester.Value, degree.Value, course.Value, from.Value, to.Value); + ListPickerItemModel semester = (ListPickerItemModel)this.Semester.SelectedItem; + ListPickerItemModel degree = (ListPickerItemModel)this.Degree.SelectedItem; + ListPickerItemModel course = (ListPickerItemModel)this.Course.SelectedItem; + ListPickerItemModel from = (ListPickerItemModel)this.From.SelectedItem; + ListPickerItemModel to = (ListPickerItemModel)this.To.SelectedItem; + Uri request = LectureFeed.CreateFeedUrl(semester.Value, degree.Value, course.Value, from.Value, to.Value); this.feed = new LectureFeed(request); this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady); this.ProgressBar.Visibility = System.Windows.Visibility.Visible; diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/OptionModel.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/OptionModel.cs deleted file mode 100644 index 1baad1f7..00000000 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/OptionModel.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CampusAppWP8.Pages.Lecture -{ - class OptionModel - { - - public string Value { get; set; } - public string Text { get; set; } - } -} diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs index 6a404776..ad54ee75 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml.cs @@ -50,8 +50,8 @@ namespace CampusAppWP8.Pages.Lecture if (list != null) { LectureActivity activity = list.GetActivity(activityId); - activity.createLectureString(); - activity.createCourseString(); + activity.CreateLectureString(); + activity.CreateCourseString(); this.ContentPanel.DataContext = activity; } } diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs index fa1b8840..69215c09 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs @@ -12,6 +12,7 @@ using CampusAppWP8.Model.events_news; using CampusAppWP8.Utility; using CampusAppWP8.Resources; using System.Collections.ObjectModel; +using CampusAppWP8.Pages.News; using CampusAppWP8.Feed.News; namespace CampusAppWP8.Pages.News diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs index 5723b4b0..5aad45a1 100644 --- a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs @@ -9,8 +9,9 @@ namespace CampusAppWP8.Pages.Mensa { using System; using System.Windows.Navigation; + using CampusAppWP8.Feed.Mensa; using CampusAppWP8.Utility; - using Microsoft.Phone.Controls; + using Microsoft.Phone.Controls; /// /// Class for the MensaPage