From eb533e80082578518c06bf941e3bd22f3dd09c3f Mon Sep 17 00:00:00 2001 From: stubbfel Date: Wed, 12 Jun 2013 15:21:16 +0200 Subject: [PATCH] update lecture --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 649 +++++++++--------- .../Pages/Lecture/LecturePage.xaml | 108 ++- .../Pages/Lecture/LecturePage.xaml.cs | 54 +- .../CampusAppWP8/Pages/Lecture/OptionModel.cs | 15 + .../Resources/AppResources.Designer.cs | 27 + .../CampusAppWP8/Resources/AppResources.resx | 12 +- 6 files changed, 512 insertions(+), 353 deletions(-) create mode 100644 CampusAppWP8/CampusAppWP8/Pages/Lecture/OptionModel.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 19f0fb80..b4ed6a7b 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -1,325 +1,326 @@ - - - - Debug - AnyCPU - 10.0.20506 - 2.0 - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC} - {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - CampusAppWP8 - CampusAppWP8 - WindowsPhone - v8.0 - $(TargetFrameworkVersion) - true - - - true - true - CampusAppWP8_$(Configuration)_$(Platform).xap - Properties\AppManifest.xml - CampusAppWP8.App - true - 11.0 - true - 5.0.40218.0 - - - true - full - false - Bin\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - - - pdbonly - true - Bin\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - true - full - false - Bin\x86\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - pdbonly - true - Bin\x86\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - true - full - false - Bin\ARM\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - pdbonly - true - Bin\ARM\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - - App.xaml - - - - - - - - - - - - - - - - - - CampusMapPage.xaml - - - - - DepartmentPage.xaml - - - - EventIndexPage.xaml - - - EventPage.xaml - - - LecturePage.xaml - - - - - - ModulWebPage.xaml - - - ResultDetailPage.xaml - - - ResultPage.xaml - - - MensaPage.xaml - - - - NewsIndexPage.xaml - - - NewsPage.xaml - - - - StartPage.xaml - - - WebmailPage.xaml - - - - True - True - AppResources.resx - - - True - True - Constants.resx - - - - - - - - - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - - - - - - - Designer - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - - - - - PublicResXFileCodeGenerator - AppResources.Designer.cs - Designer - - - ResXFileCodeGenerator - Constants.Designer.cs - - - - - - ..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll - - - - - - - + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC} + {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + CampusAppWP8 + CampusAppWP8 + WindowsPhone + v8.0 + $(TargetFrameworkVersion) + true + + + true + true + CampusAppWP8_$(Configuration)_$(Platform).xap + Properties\AppManifest.xml + CampusAppWP8.App + true + 11.0 + true + 5.0.40218.0 + + + true + full + false + Bin\Debug + DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + + + pdbonly + true + Bin\Release + TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + true + full + false + Bin\x86\Debug + DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + pdbonly + true + Bin\x86\Release + TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + true + full + false + Bin\ARM\Debug + DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + pdbonly + true + Bin\ARM\Release + TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + + App.xaml + + + + + + + + + + + + + + + + + + CampusMapPage.xaml + + + + + DepartmentPage.xaml + + + + EventIndexPage.xaml + + + EventPage.xaml + + + LecturePage.xaml + + + + + + ModulWebPage.xaml + + + + ResultDetailPage.xaml + + + ResultPage.xaml + + + MensaPage.xaml + + + + NewsIndexPage.xaml + + + NewsPage.xaml + + + + StartPage.xaml + + + WebmailPage.xaml + + + + True + True + AppResources.resx + + + True + True + Constants.resx + + + + + + + + + + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + + + + + + + Designer + + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + PublicResXFileCodeGenerator + AppResources.Designer.cs + Designer + + + ResXFileCodeGenerator + Constants.Designer.cs + + + + + + ..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml index d73948eb..803d8c33 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml @@ -14,7 +14,20 @@ OrientationChanged="PhoneApplicationPage_OrientationChanged" mc:Ignorable="d" shell:SystemTray.IsVisible="True"> - + + + + + + + + + + + + + + @@ -28,6 +41,7 @@ + @@ -54,10 +68,21 @@ - - - - + + + + + + + + + + + + + + + @@ -65,10 +90,21 @@ - - - - + + + + + + + + + + + + + + + @@ -76,17 +112,37 @@ - - - - + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + @@ -95,9 +151,20 @@ - - - + + + + + + + + + + + + + + @@ -107,7 +174,6 @@ - diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs index 8080d402..4c82f7dd 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs @@ -11,6 +11,7 @@ using CampusAppWP8.Pages.Lecture; using CampusAppWP8.Utility; using CampusAppWP8.Model.Lecture; using CampusAppWP8.Resources; +using System.Collections.ObjectModel; namespace CampusAppWP8.Pages.lecture { @@ -21,9 +22,48 @@ namespace CampusAppWP8.Pages.lecture /// private LectureFeed feed; + private List courseList = new List() + { + new OptionModel(){Text = "Architektur", Value = "013"}, + new OptionModel(){Text = "Bauingenieurwesen", Value = "017"}, + new OptionModel(){Text = "Betriebswirtschaftslehre", Value = "021"} + }; + + 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"} + }; + + 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"} + }; + + 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"} + }; + public Lecture() { InitializeComponent(); + 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) @@ -32,14 +72,15 @@ namespace CampusAppWP8.Pages.lecture private void SendRequest(object sender, RoutedEventArgs e) { - ListPickerItem semester = (ListPickerItem)this.Semester.SelectedItem; - ListPickerItem degree= (ListPickerItem)this.Degree.SelectedItem; - ListPickerItem course = (ListPickerItem)this.Course.SelectedItem; - ListPickerItem from = (ListPickerItem)this.From.SelectedItem; - ListPickerItem to = (ListPickerItem)this.To.SelectedItem; - Uri request = LectureFeed.createFeedUrl(semester.Tag.ToString(), degree.Tag.ToString(), course.Tag.ToString(), from.Tag.ToString(), to.Tag.ToString()); + 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); this.feed = new LectureFeed(request); this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady); + this.ProgressBar.Visibility = System.Windows.Visibility.Visible; this.feed.LoadFeed(); } @@ -49,6 +90,7 @@ namespace CampusAppWP8.Pages.lecture private void FeedIsReady() { App.SaveToIsolatedStorage(Constants.IsolatedStorageLectureModel, this.feed.Model); + this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed; Uri url = new Uri(Constants.PathResultPage, UriKind.Relative); NavigationService.Navigate(url); } diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/OptionModel.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/OptionModel.cs new file mode 100644 index 00000000..1baad1f7 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/OptionModel.cs @@ -0,0 +1,15 @@ +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/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs index 6d31c647..b2651d55 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs @@ -96,6 +96,33 @@ namespace CampusAppWP8.Resources { } } + /// + /// Sucht eine lokalisierte Zeichenfolge, die Bachelor ähnelt. + /// + public static string Degree_Bachelor { + get { + return ResourceManager.GetString("Degree_Bachelor", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Diplom ähnelt. + /// + public static string Degree_Diploma { + get { + return ResourceManager.GetString("Degree_Diploma", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Master ähnelt. + /// + public static string Degree_Master { + get { + return ResourceManager.GetString("Degree_Master", resourceCulture); + } + } + /// /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt. /// diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx index 09832ae4..bf5cf8f0 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx @@ -230,7 +230,6 @@ zur Übersicht - 84 @@ -251,7 +250,7 @@ Veranstaltungsart - + Fakultät @@ -261,4 +260,13 @@ Link + + Bachelor + + + Diplom + + + Master + \ No newline at end of file