diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml index 803d8c33..9eeaf42a 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml @@ -1,5 +1,5 @@  - - - - - - - - - - - - - @@ -68,7 +54,8 @@ - + + @@ -88,6 +75,7 @@ + @@ -109,6 +97,7 @@ + @@ -149,6 +138,7 @@ + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs index 4c82f7dd..1f2cc3af 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs @@ -1,75 +1,144 @@ -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.Pages.Lecture; -using CampusAppWP8.Utility; -using CampusAppWP8.Model.Lecture; -using CampusAppWP8.Resources; -using System.Collections.ObjectModel; - -namespace CampusAppWP8.Pages.lecture +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 13.06.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Pages.Lecture { - public partial class Lecture : PhoneApplicationPage + using System; + using System.Collections.Generic; + using System.Windows; + using System.Windows.Navigation; + using CampusAppWP8.Model.Lecture; + using CampusAppWP8.Pages.Lecture; + using CampusAppWP8.Resources; + using CampusAppWP8.Utility; + using Microsoft.Phone.Controls; + + /// + /// Class for the LecturePage + /// + public partial class LecturePage : PhoneApplicationPage { /// /// actual LectureFeed /// private LectureFeed feed; + /// + /// List for the courses of the BTU + /// + /// + /// need to be extend to full list + /// private List courseList = new List() { - new OptionModel(){Text = "Architektur", Value = "013"}, - new OptionModel(){Text = "Bauingenieurwesen", Value = "017"}, - new OptionModel(){Text = "Betriebswirtschaftslehre", Value = "021"} + new OptionModel() + { + Text = "Architektur", Value = "013" + }, + new OptionModel() + { + Text = "Bauingenieurwesen", Value = "017" + }, + new OptionModel() + { + Text = "Betriebswirtschaftslehre", Value = "021" + } }; + /// + /// List of the degrees + /// private List degreeList = new List() { - new OptionModel(){Text = AppResources.Degree_Bachelor, Value = "82"}, - new OptionModel(){Text = AppResources.Degree_Master, Value = "88"}, - new OptionModel(){Text = AppResources.Degree_Diploma, Value = "11"} + new OptionModel() + { + Text = AppResources.Degree_Bachelor, Value = "82" + }, + new OptionModel() + { + Text = AppResources.Degree_Master, Value = "88" + }, + new OptionModel() + { + Text = AppResources.Degree_Diploma, Value = "11" + } }; + /// + /// List of the semester + /// private List semesterList = new List() { - new OptionModel(){Text = "SoSe 13", Value = "20131"}, - new OptionModel(){Text = "WiSe 13/14", Value = "20132"}, - new OptionModel(){Text = "SoSe 14", Value = "20141"} + new OptionModel() + { + Text = "SoSe 13", Value = "20131" + }, + new OptionModel() + { + Text = "WiSe 13/14", Value = "20132" + }, + new OptionModel() + { + Text = "SoSe 14", Value = "20141" + } }; + /// + /// List for the number of semester + /// private List numberList = new List() { - new OptionModel(){Text = "1", Value = "1"}, - new OptionModel(){Text = "2", Value = "2"}, - new OptionModel(){Text = "3", Value = "3"}, - new OptionModel(){Text = "4", Value = "4"} + new OptionModel() + { + Text = "1", Value = "1" + }, + new OptionModel() + { + Text = "2", Value = "2" + }, + new OptionModel() + { + Text = "3", Value = "3" + }, + new OptionModel() + { + Text = "4", Value = "4" + } }; - public Lecture() + /// + /// Initializes a new instance of the class. + /// + public LecturePage() { - InitializeComponent(); - setupListPickers(); + this.InitializeComponent(); + this.SetupListPickers(); } - private void setupListPickers() - { - this.Course.ItemsSource = courseList; - this.Degree.ItemsSource = degreeList; - this.From.ItemsSource = numberList; - this.To.ItemsSource = numberList; - this.Semester.ItemsSource = semesterList; - } - - private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + /// + /// Method sets the ItemSource of the ListPickers + /// + private void SetupListPickers() { + this.Course.ItemsSource = this.courseList; + this.Degree.ItemsSource = this.degreeList; + this.From.ItemsSource = this.numberList; + this.To.ItemsSource = this.numberList; + this.Semester.ItemsSource = this.semesterList; } + /// + /// Method send a request to the Feed + /// + /// + /// have to refactors + /// + /// sender of this event + /// events arguments private void SendRequest(object sender, RoutedEventArgs e) { OptionModel semester = (OptionModel)this.Semester.SelectedItem; diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs index 7004f271..454b67ea 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs @@ -84,8 +84,8 @@ namespace CampusAppWP8.Pages.Lecture /// Reference of the StackPanel which include the buttons private void HideOptions(StackPanel parent) { - Button link = (Button)parent.FindName("Link"); - Button details = (Button)parent.FindName("Details"); + UIElement link = (UIElement)parent.FindName("Link"); + UIElement details = (UIElement)parent.FindName("Details"); this.HideVisibility(link); this.HideVisibility(details); } diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs index b2651d55..0bbe0d75 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs @@ -222,6 +222,15 @@ namespace CampusAppWP8.Resources { } } + /// + /// Sucht eine lokalisierte Zeichenfolge, die Studiengangauswahl ähnelt. + /// + public static string LectureApp_ListPickerHeaderCourse { + get { + return ResourceManager.GetString("LectureApp_ListPickerHeaderCourse", resourceCulture); + } + } + /// /// Sucht eine lokalisierte Zeichenfolge, die Verantwortlicher ähnelt. /// diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx index bf5cf8f0..b31b365e 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx @@ -269,4 +269,7 @@ Master + + Studiengangauswahl + \ No newline at end of file