|
|
|
|
@@ -24,30 +24,27 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// List for the courses of the BTU
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// need to be extend to full list
|
|
|
|
|
/// </remarks>
|
|
|
|
|
private CourseListPickerItemListModel courseList;
|
|
|
|
|
private ListPickerItemListModel courseList;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// List of the degrees
|
|
|
|
|
/// </summary>
|
|
|
|
|
private DegreeListPickerItemListModel degreeList;
|
|
|
|
|
private ListPickerItemListModel degreeList;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// List of the semester
|
|
|
|
|
/// </summary>
|
|
|
|
|
private SemesterListPickerItemListModel semesterList;
|
|
|
|
|
private ListPickerItemListModel semesterList;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// List for the number of semester (from)
|
|
|
|
|
/// </summary>
|
|
|
|
|
private List<ListPickerItemModel> fromNumberList;
|
|
|
|
|
private ListPickerItemListModel fromNumberList;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// List for the number of semester (to)
|
|
|
|
|
/// </summary>
|
|
|
|
|
private List<ListPickerItemModel> toNumberList;
|
|
|
|
|
private ListPickerItemListModel toNumberList;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Variable for the courseIndex
|
|
|
|
|
@@ -88,6 +85,11 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
/// </summary>
|
|
|
|
|
public LecturePageModel()
|
|
|
|
|
{
|
|
|
|
|
this.courseList = new CourseListPickerItemListModel();
|
|
|
|
|
this.degreeList = new DegreeListPickerItemListModel();
|
|
|
|
|
this.semesterList = new SemesterListPickerItemListModel();
|
|
|
|
|
this.fromNumberList = new ListPickerItemListModel();
|
|
|
|
|
this.toNumberList = new ListPickerItemListModel();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
@@ -105,7 +107,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value != this.selectCourseIndex && this.courseList != null && value < this.courseList.Count)
|
|
|
|
|
if (value != this.selectCourseIndex && this.courseList != null && value < this.courseList.List.Count)
|
|
|
|
|
{
|
|
|
|
|
this.selectCourseIndex = value;
|
|
|
|
|
}
|
|
|
|
|
@@ -124,7 +126,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value != this.selectDegreeIndex && this.degreeList != null && value < this.degreeList.Count)
|
|
|
|
|
if (value != this.selectDegreeIndex && this.degreeList != null && value < this.degreeList.List.Count)
|
|
|
|
|
{
|
|
|
|
|
this.selectDegreeIndex = value;
|
|
|
|
|
}
|
|
|
|
|
@@ -143,7 +145,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value != this.selectSemesterIndex && this.semesterList != null && value < this.semesterList.Count)
|
|
|
|
|
if (value != this.selectSemesterIndex && this.semesterList != null && value < this.semesterList.List.Count)
|
|
|
|
|
{
|
|
|
|
|
this.selectSemesterIndex = value;
|
|
|
|
|
}
|
|
|
|
|
@@ -162,7 +164,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value != this.selectFromIndex && this.fromNumberList != null && value < this.fromNumberList.Count)
|
|
|
|
|
if (value != this.selectFromIndex && this.fromNumberList != null && value < this.fromNumberList.List.Count)
|
|
|
|
|
{
|
|
|
|
|
this.selectFromIndex = value;
|
|
|
|
|
}
|
|
|
|
|
@@ -181,7 +183,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value != this.selectToIndex && this.toNumberList != null && value < this.toNumberList.Count)
|
|
|
|
|
if (value != this.selectToIndex && this.toNumberList != null && value < this.toNumberList.List.Count)
|
|
|
|
|
{
|
|
|
|
|
this.selectToIndex = value;
|
|
|
|
|
}
|
|
|
|
|
@@ -191,7 +193,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets List for the courses of the BTU
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<ListPickerItemModel> CourseList
|
|
|
|
|
public ListPickerItemListModel CourseList
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
@@ -202,7 +204,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets List of the degrees
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<ListPickerItemModel> DegreeList
|
|
|
|
|
public ListPickerItemListModel DegreeList
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
@@ -213,7 +215,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets List of the semester
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<ListPickerItemModel> SemesterList
|
|
|
|
|
public ListPickerItemListModel SemesterList
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
@@ -224,7 +226,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets List for the number of semester
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<ListPickerItemModel> FromNumberList
|
|
|
|
|
public ListPickerItemListModel FromNumberList
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
@@ -235,7 +237,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the NumberList
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<ListPickerItemModel> ToNumberList
|
|
|
|
|
public ListPickerItemListModel ToNumberList
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
@@ -253,11 +255,11 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void LoadLists()
|
|
|
|
|
{
|
|
|
|
|
this.LoadCourseList();
|
|
|
|
|
this.LoadDegreeList();
|
|
|
|
|
this.LoadFromNumberList();
|
|
|
|
|
this.LoadToNumberList();
|
|
|
|
|
this.LoadSemesterList();
|
|
|
|
|
this.selectCourseIndex = this.courseList.GetIndexOrDefault(Settings.UserProfil.Model.Course.ToString().PadLeft(3, '0'));
|
|
|
|
|
this.selectDegreeIndex = this.degreeList.GetIndexOrDefault(Settings.UserProfil.Model.Degree.ToString());
|
|
|
|
|
this.selectSemesterIndex = this.semesterList.GetIndexOrDefault(Settings.UserProfil.Model.Semester.ToString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
@@ -270,13 +272,13 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
public void LoadFromNumberList()
|
|
|
|
|
{
|
|
|
|
|
string selectValue = null;
|
|
|
|
|
if (this.fromNumberList != null)
|
|
|
|
|
if (this.fromNumberList != null && this.fromNumberList.List.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
selectValue = this.fromNumberList[this.SelectFromIndex].Value;
|
|
|
|
|
selectValue = this.fromNumberList.List[this.SelectFromIndex].Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.fromNumberList = this.CreateNumberList(1, 10);
|
|
|
|
|
this.SelectFromIndex = this.GetIndexOrDefault(this.fromNumberList, selectValue);
|
|
|
|
|
this.fromNumberList.List = this.CreateNumberList(1, 10);
|
|
|
|
|
this.SelectFromIndex = this.fromNumberList.GetIndexOrDefault(selectValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
@@ -285,13 +287,13 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
public void LoadToNumberList()
|
|
|
|
|
{
|
|
|
|
|
string selectValue = null;
|
|
|
|
|
if (this.toNumberList != null)
|
|
|
|
|
if (this.toNumberList != null && this.toNumberList.List.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
selectValue = this.toNumberList[this.SelectToIndex].Value;
|
|
|
|
|
selectValue = this.toNumberList.List[this.SelectToIndex].Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.toNumberList = this.CreateNumberList(this.SelectFromIndex + 1, 10);
|
|
|
|
|
this.SelectToIndex = this.GetIndexOrDefault(this.toNumberList, selectValue);
|
|
|
|
|
this.toNumberList.List = this.CreateNumberList(this.SelectFromIndex + 1, 10);
|
|
|
|
|
this.SelectToIndex = this.toNumberList.GetIndexOrDefault(selectValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
@@ -303,7 +305,7 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
private List<ListPickerItemModel> CreateNumberList(int startvalue, int endvalue)
|
|
|
|
|
{
|
|
|
|
|
List<ListPickerItemModel> list = new List<ListPickerItemModel>();
|
|
|
|
|
string degree = this.DegreeList[this.SelectDegreeIndex].Value;
|
|
|
|
|
string degree = this.DegreeList.List[this.SelectDegreeIndex].Value;
|
|
|
|
|
|
|
|
|
|
for (int i = startvalue; i <= endvalue; i++)
|
|
|
|
|
{
|
|
|
|
|
@@ -318,102 +320,6 @@ namespace CampusAppWP8.Model.Lecture
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Load the SemesterList
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void LoadSemesterList()
|
|
|
|
|
{
|
|
|
|
|
this.semesterList = new List<ListPickerItemModel>();
|
|
|
|
|
this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 13", Value = "20131" });
|
|
|
|
|
this.semesterList.Add(new ListPickerItemModel() { Text = "WiSe 13/14", Value = "20132" });
|
|
|
|
|
this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 14", Value = "20141" });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Load the DegreeList
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void LoadDegreeList()
|
|
|
|
|
{
|
|
|
|
|
this.degreeList = new List<ListPickerItemModel>();
|
|
|
|
|
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Bachelor, Value = "82" });
|
|
|
|
|
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Master, Value = "88" });
|
|
|
|
|
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Diploma, Value = "11" });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Load the DegreeList
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void LoadCourseList()
|
|
|
|
|
{
|
|
|
|
|
this.courseList = new List<ListPickerItemModel>();
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Architektur", Value = "013" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Bauingenieurwesen", Value = "017" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Betriebswirtschaftslehre", Value = "021" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsrecht für Technologieunternehmen", Value = "042" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Elektrotechnik", Value = "048" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Informatik ", Value = "079" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Maschinenbau", Value = "104" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Mathematik", Value = "105" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Physik ", Value = "128" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsingenieurwesen", Value = "179" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftswissenschaften ", Value = "184" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Biomedizinische Gerätetechnik ", Value = "215" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik", Value = "226" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsmathematik ", Value = "276" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Kultur und Technik ", Value = "711" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Physik der Halbleiter-Technologie", Value = "744" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Angewandte Mathematik ", Value = "749" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Technologie- und Innovationsmanagement", Value = "764" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Stadt- und Regionalplanung", Value = "766" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Informations- und Medientechnik ", Value = "767" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "World Heritage Studies", Value = "768" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen und Verfahrenstechnik", Value = "770" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Environmental and Resource Management", Value = "771" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Landnutzung und Wasserbewirtschaftung", Value = "772" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Bauen und Erhalten", Value = "773" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen", Value = "774" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "eBusiness", Value = "794" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Civil Engineering", Value = "798" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Structural Engineering", Value = "799" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Electrical Power Engineering ", Value = "800" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Euro Hydroinformatics and Water Management", Value = "841" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Technologien Biogener Rohstoffe", Value = "842" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Environmental Technologies", Value = "843" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Process Engineering and Plant Design", Value = "844" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Architekturvermittlung", Value = "845" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Nachwachsende Rohstoffe und Erneuerbare Energien", Value = "851" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Energieträger aus Biomasse und Abfällen", Value = "852" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Power Engineering", Value = "853" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik - Prozess- und Anlagentechnik", Value = "857" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Architektur.Studium.Generale", Value = "858" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Verarbeitungstechnologien der Werkstoffe", Value = "860" });
|
|
|
|
|
this.courseList.Add(new ListPickerItemModel() { Text = "Forensic Sciences and Engineering", Value = "871" });
|
|
|
|
|
this.courseList = this.courseList.OrderBy(o => o.Text).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Method return a the Index of an item which has a certain value
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="list">list for items</param>
|
|
|
|
|
/// <param name="value">a certain value</param>
|
|
|
|
|
/// <returns>return index of value or default(0)</returns>
|
|
|
|
|
private int GetIndexOrDefault(List<ListPickerItemModel> list, string value)
|
|
|
|
|
{
|
|
|
|
|
int index = 0;
|
|
|
|
|
int i = 0;
|
|
|
|
|
foreach (ListPickerItemModel item in list)
|
|
|
|
|
{
|
|
|
|
|
if (item.Value.Equals(value))
|
|
|
|
|
{
|
|
|
|
|
index = i;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return index;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|