add documention to the models
This commit is contained in:
@@ -108,13 +108,13 @@
|
||||
<Compile Include="Model\Lecture\LectureDate.cs" />
|
||||
<Compile Include="Model\Lecture\LectureLecturer.cs" />
|
||||
<Compile Include="Model\Lecture\LectureList.cs" />
|
||||
<Compile Include="Model\Lecture\LectureModul.cs" />
|
||||
<Compile Include="Model\Lecture\LectureModule.cs" />
|
||||
<Compile Include="Model\Mensa\MenuModel.cs" />
|
||||
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
|
||||
<Compile Include="Pages\Campusmap\CampusMapPage.xaml.cs">
|
||||
<DependentUpon>CampusMapPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Lecture\LectureFeed.cs" />
|
||||
<Compile Include="Feed\Lecture\LectureFeed.cs" />
|
||||
<Compile Include="Feed\Departments\DepartmentFeed.cs" />
|
||||
<Compile Include="Pages\Departments\DepartmentPage.xaml.cs">
|
||||
<DependentUpon>DepartmentPage.xaml</DependentUpon>
|
||||
@@ -135,7 +135,7 @@
|
||||
<Compile Include="Pages\Lecture\ModulWebPage.xaml.cs">
|
||||
<DependentUpon>ModulWebPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Lecture\OptionModel.cs" />
|
||||
<Compile Include="Model\Utility\ListPickerItemModel.cs" />
|
||||
<Compile Include="Pages\Lecture\ResultDetailPage.xaml.cs">
|
||||
<DependentUpon>ResultDetailPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CampusAppWP8.Feed.Departments
|
||||
public System.Collections.ObjectModel.ObservableCollection<FacultyModel> _faculties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
@@ -26,7 +26,7 @@ namespace CampusAppWP8.Feed.Departments
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CampusAppWP8.Feed.Events
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
@@ -30,7 +30,7 @@ namespace CampusAppWP8.Feed.Events
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
|
||||
67
CampusAppWP8/CampusAppWP8/Feed/Lecture/LectureFeed.cs
Normal file
67
CampusAppWP8/CampusAppWP8/Feed/Lecture/LectureFeed.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Lecture
|
||||
{
|
||||
using System;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the feed of the Lecture
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// need the XmlAPI
|
||||
/// </remarks>
|
||||
public class LectureFeed : XmlFeed<LectureList>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="url">the RequestUrl</param>
|
||||
public LectureFeed(Uri url)
|
||||
: base(url, "Lecture.xml")
|
||||
{
|
||||
this.validRootName = "lsf_auszug";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create the RequestUrl
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// have to refactors
|
||||
/// </remarks>
|
||||
/// <param name="semester">value of the semester</param>
|
||||
/// <param name="degree">value of the degree</param>
|
||||
/// <param name="course">value of the course</param>
|
||||
/// <param name="from">value of the from</param>
|
||||
/// <param name="to">value of the to</param>
|
||||
/// <returns>return the requestUrl</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Mensa
|
||||
namespace CampusAppWP8.Feed.Mensa
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -34,7 +34,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
#region Protected
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
@@ -44,7 +44,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CampusAppWP8.Feed.News
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
@@ -31,7 +31,7 @@ namespace CampusAppWP8.Feed.News
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Feed"/>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsFileUpToDate()
|
||||
|
||||
@@ -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;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureActivity.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a Activity
|
||||
/// </summary>
|
||||
public class LectureActivity
|
||||
{
|
||||
#region
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// List of lecturer
|
||||
/// </summary>
|
||||
private ObservableCollection<LectureLecturer> lecturer;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the names of the lecturers
|
||||
/// </summary>
|
||||
private string lecturerString;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the names of the courses
|
||||
/// </summary>
|
||||
private string courseString;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the topic of the lecture
|
||||
/// </summary>
|
||||
private string topic;
|
||||
|
||||
#endregion
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureList" /> class.
|
||||
/// Initializes a new instance of the <see cref="LectureActivity" /> class.
|
||||
/// </summary>
|
||||
public LectureActivity()
|
||||
{
|
||||
@@ -30,41 +52,66 @@ namespace CampusAppWP8.Model.Lecture
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the activity
|
||||
/// </summary>
|
||||
[XmlElement("art")]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the activity
|
||||
/// </summary>
|
||||
[XmlAttribute("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets semester of the activity
|
||||
/// </summary>
|
||||
[XmlElement("semester")]
|
||||
public int Semester { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the contact hour
|
||||
/// </summary>
|
||||
[XmlElement("sws")]
|
||||
public string SWS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets LectureModule
|
||||
/// </summary>
|
||||
[XmlElement("modul")]
|
||||
public LectureModul Modul { get; set; }
|
||||
public LectureModule Modul { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the lecturers
|
||||
/// </summary>
|
||||
[XmlElement("lehrperson")]
|
||||
public ObservableCollection<LectureLecturer> Lecturer {
|
||||
public ObservableCollection<LectureLecturer> Lecturer
|
||||
{
|
||||
get
|
||||
{
|
||||
return lecturer;
|
||||
return this.lecturer;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != lecturer)
|
||||
if (value != this.lecturer)
|
||||
{
|
||||
lecturer = value;
|
||||
this.lecturer = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string LecturerString {
|
||||
/// <summary>
|
||||
/// Gets or sets the formatted string of the lecturers
|
||||
/// </summary>
|
||||
public string LecturerString
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.lecturerString;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.lecturerString)
|
||||
@@ -74,12 +121,16 @@ namespace CampusAppWP8.Model.Lecture
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets formatted string of the courses
|
||||
/// </summary>
|
||||
public string CourseString
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.courseString;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.courseString)
|
||||
@@ -88,53 +139,77 @@ namespace CampusAppWP8.Model.Lecture
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the courses
|
||||
/// </summary>
|
||||
[XmlElement("studiengang")]
|
||||
public ObservableCollection<LectureCourse> Course { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the dates of the activity
|
||||
/// </summary>
|
||||
[XmlElement("termin")]
|
||||
public ObservableCollection<LectureDate> Dates { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Department
|
||||
/// </summary>
|
||||
[XmlElement("zugeordnete_einrichtung")]
|
||||
public string Department { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the topic of the Lecture
|
||||
/// </summary>
|
||||
[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
|
||||
|
||||
/// <summary>
|
||||
/// Method create a formatted string of the LecturerList
|
||||
/// </summary>
|
||||
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()
|
||||
/// <summary>
|
||||
/// Method create a formatted string of the CourseList
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
// <copyright file="LectureCourse.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
public class LectureCourse
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a course
|
||||
/// </summary>
|
||||
public class LectureCourse
|
||||
{
|
||||
public LectureCourse()
|
||||
{
|
||||
}
|
||||
[XmlElement("bezeichnung")]
|
||||
public string Title {get;set;}
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureCourse" /> class.
|
||||
/// </summary>
|
||||
public LectureCourse()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the course
|
||||
/// </summary>
|
||||
[XmlElement("bezeichnung")]
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureDate.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the date of an activity
|
||||
/// </summary>
|
||||
public class LectureDate
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureDate" /> class.
|
||||
/// </summary>
|
||||
public LectureDate()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets WeekDay
|
||||
/// </summary>
|
||||
[XmlElement("wochentag")]
|
||||
public string WeekDay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets From
|
||||
/// </summary>
|
||||
[XmlElement("von")]
|
||||
public string From { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets To
|
||||
/// </summary>
|
||||
[XmlElement("bis")]
|
||||
public string To { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Interval
|
||||
/// </summary>
|
||||
[XmlElement("rhythmus")]
|
||||
public string Interval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Room
|
||||
/// </summary>
|
||||
[XmlElement("raum")]
|
||||
public string Room { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets StartDate
|
||||
/// </summary>
|
||||
[XmlElement("anfangsdatum")]
|
||||
public string StarDate { get; set; }
|
||||
public string StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets EndDate
|
||||
/// </summary>
|
||||
[XmlElement("enddatum")]
|
||||
public string EndDate { get; set; }
|
||||
|
||||
|
||||
@@ -1,45 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureLecturer.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a lecturer
|
||||
/// </summary>
|
||||
public class LectureLecturer
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureLecturer" /> class.
|
||||
/// </summary>
|
||||
public LectureLecturer()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the FirstName of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("vorname")]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the LastName of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("name")]
|
||||
public string LastName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Responsibility of a lecturer
|
||||
/// </summary>
|
||||
[XmlAttribute("zustaendigkeit")]
|
||||
public string Responsibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Method overrides the base ToString() and create an formatted string of the lecturer
|
||||
/// </summary>
|
||||
/// <returns>returns a string like: [Title] FirstName LastName [(Responsibility)]</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a List of LectureActivity
|
||||
/// </summary>
|
||||
[XmlRoot("lsf_auszug")]
|
||||
public class LectureList
|
||||
{
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
@@ -29,6 +30,9 @@ namespace CampusAppWP8.Model.Lecture
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets List of the activities
|
||||
/// </summary>
|
||||
[XmlArray("veranstaltungsliste")]
|
||||
[XmlArrayItem("veranstaltung")]
|
||||
public ObservableCollection<LectureActivity> Activities { get; set; }
|
||||
@@ -37,12 +41,17 @@ namespace CampusAppWP8.Model.Lecture
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method return a certain activity
|
||||
/// </summary>
|
||||
/// <param name="id"> id of the activity</param>
|
||||
/// <returns> the activity (FirstOrDefault)</returns>
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureModul.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
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
|
||||
}
|
||||
}
|
||||
98
CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModule.cs
Normal file
98
CampusAppWP8/CampusAppWP8/Model/Lecture/LectureModule.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureModule.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the module of an lecture
|
||||
/// </summary>
|
||||
public class LectureModule
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Number of the module (like an id)
|
||||
/// </summary>
|
||||
private int number;
|
||||
|
||||
/// <summary>
|
||||
/// Url to the website of the module
|
||||
/// </summary>
|
||||
private Uri url;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureModule" /> class.
|
||||
/// </summary>
|
||||
public LectureModule()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the module
|
||||
/// </summary>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of the module and create the URL
|
||||
/// </summary>
|
||||
[XmlElement("nummer")]
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.number;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.number)
|
||||
{
|
||||
this.number = value;
|
||||
this.CreateUrl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URL of the module
|
||||
/// </summary>
|
||||
public Uri Url
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.url;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method create the url of the module
|
||||
/// </summary>
|
||||
private void CreateUrl()
|
||||
{
|
||||
this.url = new Uri(Constants.UrlLectureModulBaseAddr + this.number.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ListPickerItemModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for the ListPickerItems
|
||||
/// </summary>
|
||||
public class ListPickerItemModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Value of an Item
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Text (caption) of an Item
|
||||
/// </summary>
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using CampusAppWP8.Feed.Departments;
|
||||
using CampusAppWP8.Pages.Departments;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Tasks;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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<LectureList>
|
||||
{
|
||||
public LectureFeed(Uri url)
|
||||
: base(url, "Lecture.xml")
|
||||
{
|
||||
this.validRootName = "lsf_auszug";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Feed"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
protected override bool CheckIsModelUpToDate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Feed"/>
|
||||
/// </summary>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
/// <remarks>
|
||||
/// need to be extend to full list
|
||||
/// </remarks>
|
||||
private List<OptionModel> courseList = new List<OptionModel>()
|
||||
private List<ListPickerItemModel> courseList = new List<ListPickerItemModel>()
|
||||
{
|
||||
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
|
||||
/// <summary>
|
||||
/// List of the degrees
|
||||
/// </summary>
|
||||
private List<OptionModel> degreeList = new List<OptionModel>()
|
||||
private List<ListPickerItemModel> degreeList = new List<ListPickerItemModel>()
|
||||
{
|
||||
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
|
||||
/// <summary>
|
||||
/// List of the semester
|
||||
/// </summary>
|
||||
private List<OptionModel> semesterList = new List<OptionModel>()
|
||||
private List<ListPickerItemModel> semesterList = new List<ListPickerItemModel>()
|
||||
{
|
||||
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
|
||||
/// <summary>
|
||||
/// List for the number of semester
|
||||
/// </summary>
|
||||
private List<OptionModel> numberList = new List<OptionModel>()
|
||||
private List<ListPickerItemModel> numberList = new List<ListPickerItemModel>()
|
||||
{
|
||||
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
|
||||
/// <param name="e"> events arguments</param>
|
||||
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;
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MensaPage
|
||||
|
||||
Reference in New Issue
Block a user