From 2463d1ad572f98f223fa178e39691c02a37af335 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Wed, 22 May 2013 16:16:10 +0200 Subject: [PATCH 01/47] add new startpage --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 7 ++ .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- .../Resources/AppResources.Designer.cs | 110 +++++++++++++++++- .../CampusAppWP8/Resources/AppResources.resx | 38 +++++- .../CampusAppWP8/pages/StartPage.xaml | 100 ++++++++++++++++ .../CampusAppWP8/pages/StartPage.xaml.cs | 20 ++++ 6 files changed, 274 insertions(+), 3 deletions(-) create mode 100644 CampusAppWP8/CampusAppWP8/pages/StartPage.xaml create mode 100644 CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 65eb7650..547643e7 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -97,6 +97,9 @@ MainPage.xaml + + StartPage.xaml + True @@ -119,6 +122,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index f0f57226..f4b319d3 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -13,7 +13,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs index 55ceef53..12bdbff7 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs @@ -79,7 +79,7 @@ namespace CampusAppWP8.Resources { } /// - /// Sucht eine lokalisierte Zeichenfolge, die MEINE ANWENDUNG ähnelt. + /// Sucht eine lokalisierte Zeichenfolge, die BTU CampusApp ähnelt. /// public static string ApplicationTitle { get { @@ -87,6 +87,105 @@ namespace CampusAppWP8.Resources { } } + /// + /// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt. + /// + public static string CampusMapApp_Title { + get { + return ResourceManager.GetString("CampusMapApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt. + /// + public static string DepartmentApp_Title { + get { + return ResourceManager.GetString("DepartmentApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Events ähnelt. + /// + public static string EventApp_Title { + get { + return ResourceManager.GetString("EventApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hausaufgaben ähnelt. + /// + public static string HomeworkApp_Title { + get { + return ResourceManager.GetString("HomeworkApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Vorlesung ähnelt. + /// + public static string LectureApp_Title { + get { + return ResourceManager.GetString("LectureApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Links ähnelt. + /// + public static string LinkApp_Title { + get { + return ResourceManager.GetString("LinkApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Webmail ähnelt. + /// + public static string MailApp_Title { + get { + return ResourceManager.GetString("MailApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Mensaplan ähnelt. + /// + public static string MensaApp_Title { + get { + return ResourceManager.GetString("MensaApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die News ähnelt. + /// + public static string NewsApp_Title { + get { + return ResourceManager.GetString("NewsApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Öffnungszeiten ähnelt. + /// + public static string OpenHoursApp_Title { + get { + return ResourceManager.GetString("OpenHoursApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Fachschaften ähnelt. + /// + public static string OSAApp_Title { + get { + return ResourceManager.GetString("OSAApp_Title", resourceCulture); + } + } + /// /// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt. /// @@ -114,6 +213,15 @@ namespace CampusAppWP8.Resources { } } + /// + /// Sucht eine lokalisierte Zeichenfolge, die Stundenplan ähnelt. + /// + public static string TimeTableApp_Title { + get { + return ResourceManager.GetString("TimeTableApp_Title", resourceCulture); + } + } + /// /// Sucht eine lokalisierte Zeichenfolge, die Willkommen zur BTU-CampusApp WP8 ähnelt. /// diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx index 72e5f29c..694a70f8 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx @@ -126,7 +126,7 @@ Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language. - MEINE ANWENDUNG + BTU CampusApp Beispielwert für die Laufzeiteigenschaft @@ -140,4 +140,40 @@ Willkommen zur BTU-CampusApp WP8 + + Campusplan + + + Lehrstühle + + + Events + + + Hausaufgaben + + + Vorlesung + + + Links + + + Webmail + + + Mensaplan + + + News + + + Öffnungszeiten + + + Fachschaften + + + Stundenplan + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml new file mode 100644 index 00000000..d3438eac --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs new file mode 100644 index 00000000..29e33ea0 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs @@ -0,0 +1,20 @@ +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; + +namespace CampusAppWP8.pages +{ + public partial class StartPage : PhoneApplicationPage + { + public StartPage() + { + InitializeComponent(); + } + } +} \ No newline at end of file From 852b2b881a52f6520448815f0c2a24aea4c9676e Mon Sep 17 00:00:00 2001 From: stubbfel Date: Thu, 23 May 2013 15:49:03 +0200 Subject: [PATCH 02/47] add Landscape Orientation and Link to webmail --- .../CampusAppWP8/pages/StartPage.xaml | 66 ++++++++++--------- .../CampusAppWP8/pages/StartPage.xaml.cs | 41 ++++++++++++ 2 files changed, 77 insertions(+), 30 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml index d3438eac..9e9c62b3 100644 --- a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml @@ -9,7 +9,8 @@ FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" - SupportedOrientations="Portrait" Orientation="Portrait" + SupportedOrientations="PortraitOrLandscape" Orientation="Portrait" + OrientationChanged="PhoneApplicationPage_OrientationChanged" mc:Ignorable="d" shell:SystemTray.IsVisible="True"> @@ -26,75 +27,80 @@ - + - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - + - - + + - - + + - - + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs index 29e33ea0..e18bb3ab 100644 --- a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs @@ -7,6 +7,7 @@ using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; +using Windows.UI.Input; namespace CampusAppWP8.pages { @@ -16,5 +17,45 @@ namespace CampusAppWP8.pages { InitializeComponent(); } + + private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + { + // Switch the placement of the buttons based on an orientation change. + if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) + { + OpenHoursAppPanel.SetValue(Grid.RowProperty, 0); + OpenHoursAppPanel.SetValue(Grid.ColumnProperty, 3); + + OSAAppPanel.SetValue(Grid.RowProperty, 1); + OSAAppPanel.SetValue(Grid.ColumnProperty, 3); + + LinkAppPanel.SetValue(Grid.RowProperty, 2); + LinkAppPanel.SetValue(Grid.ColumnProperty, 3); + ContentPanel.Margin = new Thickness(12, -24, 0, 0); + + } + // If not in portrait, move buttonList content to visible row and column. + else + { + OpenHoursAppPanel.SetValue(Grid.RowProperty, 3); + OpenHoursAppPanel.SetValue(Grid.ColumnProperty, 0); + + OSAAppPanel.SetValue(Grid.RowProperty, 3); + OSAAppPanel.SetValue(Grid.ColumnProperty, 1); + + LinkAppPanel.SetValue(Grid.RowProperty, 3); + LinkAppPanel.SetValue(Grid.ColumnProperty, 2); + ContentPanel.Margin = new Thickness(12, 0, 0, 0); + + } + } + + private void Button_Click(object sender, RoutedEventArgs e) + { + Microsoft.Phone.Tasks.WebBrowserTask wbt = new Microsoft.Phone.Tasks.WebBrowserTask(); + wbt.Uri = new Uri("https://webmail.tu-cottbus.de"); + wbt.Show(); + } + } } \ No newline at end of file From 6b7af1058b65b873bd4a5310e69ceb1c47dc40a4 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Fri, 24 May 2013 11:17:10 +0200 Subject: [PATCH 03/47] update startpage --- .../CampusAppWP8/pages/StartPage.xaml | 120 +++++++++++------- .../CampusAppWP8/pages/StartPage.xaml.cs | 32 ++--- 2 files changed, 87 insertions(+), 65 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml index 9e9c62b3..4a9f08d0 100644 --- a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml @@ -42,43 +42,65 @@ - - - - - - - - - - - - + + + + + - - - - - - - - - - - - + + + + + - - - - - - - - - + + + + - - - - - - - - - - - - + + + + + diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs index e18bb3ab..5dcb70ba 100644 --- a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs @@ -23,39 +23,31 @@ namespace CampusAppWP8.pages // Switch the placement of the buttons based on an orientation change. if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) { - OpenHoursAppPanel.SetValue(Grid.RowProperty, 0); - OpenHoursAppPanel.SetValue(Grid.ColumnProperty, 3); + OpenHoursAppButton.SetValue(Grid.RowProperty, 0); + OpenHoursAppButton.SetValue(Grid.ColumnProperty, 3); - OSAAppPanel.SetValue(Grid.RowProperty, 1); - OSAAppPanel.SetValue(Grid.ColumnProperty, 3); + OSAAppButton.SetValue(Grid.RowProperty, 1); + OSAAppButton.SetValue(Grid.ColumnProperty, 3); - LinkAppPanel.SetValue(Grid.RowProperty, 2); - LinkAppPanel.SetValue(Grid.ColumnProperty, 3); + LinkAppButton.SetValue(Grid.RowProperty, 2); + LinkAppButton.SetValue(Grid.ColumnProperty, 3); ContentPanel.Margin = new Thickness(12, -24, 0, 0); } // If not in portrait, move buttonList content to visible row and column. else { - OpenHoursAppPanel.SetValue(Grid.RowProperty, 3); - OpenHoursAppPanel.SetValue(Grid.ColumnProperty, 0); + OpenHoursAppButton.SetValue(Grid.RowProperty, 3); + OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0); - OSAAppPanel.SetValue(Grid.RowProperty, 3); - OSAAppPanel.SetValue(Grid.ColumnProperty, 1); + OSAAppButton.SetValue(Grid.RowProperty, 3); + OSAAppButton.SetValue(Grid.ColumnProperty, 1); - LinkAppPanel.SetValue(Grid.RowProperty, 3); - LinkAppPanel.SetValue(Grid.ColumnProperty, 2); + LinkAppButton.SetValue(Grid.RowProperty, 3); + LinkAppButton.SetValue(Grid.ColumnProperty, 2); ContentPanel.Margin = new Thickness(12, 0, 0, 0); } } - - private void Button_Click(object sender, RoutedEventArgs e) - { - Microsoft.Phone.Tasks.WebBrowserTask wbt = new Microsoft.Phone.Tasks.WebBrowserTask(); - wbt.Uri = new Uri("https://webmail.tu-cottbus.de"); - wbt.Show(); - } - } } \ No newline at end of file From eca2bc91fbde5de72d90fea0065c52bef99e99b9 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Fri, 24 May 2013 12:09:22 +0200 Subject: [PATCH 04/47] update webmail --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 7 ++++ .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- .../CampusAppWP8/pages/webmail/Webmail.xaml | 33 +++++++++++++++++++ .../pages/webmail/Webmail.xaml.cs | 27 +++++++++++++++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml create mode 100644 CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 547643e7..32ac13d4 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -100,6 +100,9 @@ StartPage.xaml + + Webmail.xaml + True @@ -126,6 +129,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index f4b319d3..541070b6 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -13,7 +13,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml b/CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml new file mode 100644 index 00000000..e3d7e68f --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml.cs new file mode 100644 index 00000000..791cc499 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml.cs @@ -0,0 +1,27 @@ +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 System.Threading.Tasks; + +namespace CampusAppWP8.pages.webmail +{ + public partial class Webmail : PhoneApplicationPage + { + public Webmail() + { + InitializeComponent(); + loadWebmailPage(); + } + + private void loadWebmailPage() + { + this.WebmailBrowser.Navigate(new Uri("https://webmail.tu-cottbus.de", UriKind.Absolute)); + } + } +} \ No newline at end of file From 80ec85297b6deba1f5dc72623b92acca8e5293ad Mon Sep 17 00:00:00 2001 From: Christian Fiedler Date: Fri, 24 May 2013 12:50:52 +0200 Subject: [PATCH 05/47] initial commit --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 370 +++++++++--------- CampusAppWP8/CampusAppWP8/README_FIRST.txt | 4 +- CampusAppWP8/CampusAppWP8/packages.config | 6 +- .../WPtoolkit.4.2012.10.30.nuspec | 34 +- 4 files changed, 209 insertions(+), 205 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 547643e7..eea574b3 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -1,184 +1,188 @@ - - - - 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 - - - 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 - - - - MainPage.xaml - - - StartPage.xaml - - - - True - True - AppResources.resx - - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - - - - - Designer - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - - - - - PublicResXFileCodeGenerator - AppResources.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 + + + 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 + + + + MainPage.xaml + + + StartPage.xaml + + + + True + True + AppResources.resx + + + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + + + + + Designer + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + PublicResXFileCodeGenerator + AppResources.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/README_FIRST.txt b/CampusAppWP8/CampusAppWP8/README_FIRST.txt index ce40c013..d1bb14e8 100644 --- a/CampusAppWP8/CampusAppWP8/README_FIRST.txt +++ b/CampusAppWP8/CampusAppWP8/README_FIRST.txt @@ -1,3 +1,3 @@ -For the Windows Phone toolkit make sure that you have -marked the icons in the "Toolkit.Content" folder as content. That way they +For the Windows Phone toolkit make sure that you have +marked the icons in the "Toolkit.Content" folder as content. That way they can be used as the icons for the ApplicationBar control. \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/packages.config b/CampusAppWP8/CampusAppWP8/packages.config index a6c4d07d..c4c1d604 100644 --- a/CampusAppWP8/CampusAppWP8/packages.config +++ b/CampusAppWP8/CampusAppWP8/packages.config @@ -1,4 +1,4 @@ - - - + + + \ No newline at end of file diff --git a/CampusAppWP8/packages/WPtoolkit.4.2012.10.30/WPtoolkit.4.2012.10.30.nuspec b/CampusAppWP8/packages/WPtoolkit.4.2012.10.30/WPtoolkit.4.2012.10.30.nuspec index e093d194..3f621d0d 100644 --- a/CampusAppWP8/packages/WPtoolkit.4.2012.10.30/WPtoolkit.4.2012.10.30.nuspec +++ b/CampusAppWP8/packages/WPtoolkit.4.2012.10.30/WPtoolkit.4.2012.10.30.nuspec @@ -1,15 +1,15 @@ - - - - WPtoolkit - 4.2012.10.30 - Windows Phone toolkit - Microsoft - Microsoft - http://phone.codeplex.com/license - http://phone.codeplex.com/ - false - Windows Phone toolkit provides a collection of controls, extension methods and page animations to help create beautiful and consistent Windows Phone user interfaces and make common progamming tasks easier. Documentation and source are on CodePlex at http://phone.codeplex.com. + + + + WPtoolkit + 4.2012.10.30 + Windows Phone toolkit + Microsoft + Microsoft + http://phone.codeplex.com/license + http://phone.codeplex.com/ + false + Windows Phone toolkit provides a collection of controls, extension methods and page animations to help create beautiful and consistent Windows Phone user interfaces and make common progamming tasks easier. Documentation and source are on CodePlex at http://phone.codeplex.com. Release notes - http://phone.codeplex.com/releases/view/96743 Includes - @@ -32,9 +32,9 @@ Removed Tuple.cs Removed PerformanceProgressBar (though we are taking the suggestion that we should add it back as a descendent of ProgressBar for backcompat) -Removed GestureListener - http://phone.codeplex.com/license - en-US - wptoolkit toolkit windowsphone wp7 wp7dev phone tk wp7tk controls mango wp8 apollo - +Removed GestureListener + http://phone.codeplex.com/license + en-US + wptoolkit toolkit windowsphone wp7 wp7dev phone tk wp7tk controls mango wp8 apollo + \ No newline at end of file From 81cb7103093f752d31d6c2c41e05d871abc6f003 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Mon, 27 May 2013 13:06:03 +0200 Subject: [PATCH 06/47] first draft --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 5 + .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- .../Resources/AppResources.Designer.cs | 45 ++++ .../CampusAppWP8/Resources/AppResources.resx | 15 ++ .../CampusAppWP8/pages/mensa/MensaPage.xaml | 246 ++++++++++++++++++ .../pages/mensa/MensaPage.xaml.cs | 25 ++ 6 files changed, 337 insertions(+), 1 deletion(-) create mode 100644 CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml create mode 100644 CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 547643e7..aeaa8254 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -97,6 +97,7 @@ MainPage.xaml + StartPage.xaml @@ -122,6 +123,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index f4b319d3..04b6f0e8 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -13,7 +13,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs index 12bdbff7..d3324b42 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs @@ -213,6 +213,51 @@ namespace CampusAppWP8.Resources { } } + /// + /// Sucht eine lokalisierte Zeichenfolge, die Freitag ähnelt. + /// + public static string Time_Day_Friday { + get { + return ResourceManager.GetString("Time_Day_Friday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Montag ähnelt. + /// + public static string Time_Day_Monday { + get { + return ResourceManager.GetString("Time_Day_Monday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Donnerstag ähnelt. + /// + public static string Time_Day_Thursday { + get { + return ResourceManager.GetString("Time_Day_Thursday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Dienstag ähnelt. + /// + public static string Time_Day_Tuesday { + get { + return ResourceManager.GetString("Time_Day_Tuesday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Mittwoch ähnelt. + /// + public static string Time_Day_Wednesday { + get { + return ResourceManager.GetString("Time_Day_Wednesday", resourceCulture); + } + } + /// /// Sucht eine lokalisierte Zeichenfolge, die Stundenplan ähnelt. /// diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx index 694a70f8..8ed9221a 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx @@ -176,4 +176,19 @@ Stundenplan + + Freitag + + + Montag + + + Donnerstag + + + Dienstag + + + Mittwoch + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml new file mode 100644 index 00000000..dd85a2e9 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs new file mode 100644 index 00000000..59e24a03 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs @@ -0,0 +1,25 @@ +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; + +namespace CampusAppWP8.pages.mensa +{ + public partial class MensaPage : PhoneApplicationPage + { + public MensaPage() + { + InitializeComponent(); + + } + + private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + { + } + } +} \ No newline at end of file From d864cc4425cd8f323721b676cc9cc16b42af0c9c Mon Sep 17 00:00:00 2001 From: stubbfel Date: Mon, 27 May 2013 17:15:03 +0200 Subject: [PATCH 07/47] add mensamodel --- CampusAppWP8/CampusAppWP8/App.xaml | 13 +- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 11 + .../ViewModels/PivotItem1ViewModel.cs | 11 + .../ViewModels/PivotItem2ViewModel.cs | 11 + CampusAppWP8/CampusAppWP8/model/BaseModel.cs | 22 ++ .../CampusAppWP8/model/BaseViewModel.cs | 22 ++ CampusAppWP8/CampusAppWP8/model/mensa/Food.cs | 56 ++++ .../CampusAppWP8/model/mensa/FoodDay.cs | 94 +++++++ .../model/mensa/MensaViewModel.cs | 48 ++++ .../CampusAppWP8/pages/mensa/MensaPage.xaml | 258 +++--------------- .../pages/mensa/MensaPage.xaml.cs | 29 ++ 11 files changed, 345 insertions(+), 230 deletions(-) create mode 100644 CampusAppWP8/CampusAppWP8/ViewModels/PivotItem1ViewModel.cs create mode 100644 CampusAppWP8/CampusAppWP8/ViewModels/PivotItem2ViewModel.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/BaseModel.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/BaseViewModel.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/mensa/Food.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/mensa/FoodDay.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/mensa/MensaViewModel.cs diff --git a/CampusAppWP8/CampusAppWP8/App.xaml b/CampusAppWP8/CampusAppWP8/App.xaml index 99ad2874..7f65fb63 100644 --- a/CampusAppWP8/CampusAppWP8/App.xaml +++ b/CampusAppWP8/CampusAppWP8/App.xaml @@ -1,20 +1,21 @@  + xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" + x:Class="CampusAppWP8.App" + > - + - + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index aeaa8254..844e8b6d 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -25,6 +25,7 @@ true 11.0 true + 5.0.40218.0 true @@ -97,6 +98,10 @@ MainPage.xaml + + + + StartPage.xaml @@ -109,12 +114,18 @@ + + + Designer MSBuild:Compile + + MSBuild:MarkupCompilePass1 + Designer MSBuild:Compile diff --git a/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem1ViewModel.cs b/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem1ViewModel.cs new file mode 100644 index 00000000..83db7e3d --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem1ViewModel.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CampusAppWP8.ViewModels +{ + class PivotItem1ViewModel + { + } +} diff --git a/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem2ViewModel.cs b/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem2ViewModel.cs new file mode 100644 index 00000000..a387d5f7 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem2ViewModel.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CampusAppWP8.ViewModels +{ + class PivotItem2ViewModel + { + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/BaseModel.cs b/CampusAppWP8/CampusAppWP8/model/BaseModel.cs new file mode 100644 index 00000000..bc8b5dec --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/model/BaseModel.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.model +{ + public class BaseModel : INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + public void NotifyPropertyChanged(String propertyName) + { + PropertyChangedEventHandler handler = PropertyChanged; + if (null != handler) + { + handler(this, new PropertyChangedEventArgs(propertyName)); + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/BaseViewModel.cs b/CampusAppWP8/CampusAppWP8/model/BaseViewModel.cs new file mode 100644 index 00000000..ee8974eb --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/model/BaseViewModel.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.model +{ + public class BaseViewModel: INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + public void NotifyPropertyChanged(String propertyName) + { + PropertyChangedEventHandler handler = PropertyChanged; + if (null != handler) + { + handler(this, new PropertyChangedEventArgs(propertyName)); + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/Food.cs b/CampusAppWP8/CampusAppWP8/model/mensa/Food.cs new file mode 100644 index 00000000..a7995f2f --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/model/mensa/Food.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CampusAppWP8.model.mensa +{ + public class Food : BaseModel + { + private string _detail; + private string _title; + public Food() + { + } + + public Food(string title, string detail) + { + _title = title; + _detail = detail; + } + + public string Title + { + get + { + return _title; + } + + set + { + if (value != _title) + { + _title = value; + NotifyPropertyChanged("title"); + } + } + } + + public string Detail + { + get + { + return _detail; + } + + set + { + if (value != _detail) + { + _detail = value; + NotifyPropertyChanged("detail"); + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/FoodDay.cs b/CampusAppWP8/CampusAppWP8/model/mensa/FoodDay.cs new file mode 100644 index 00000000..0f585be5 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/model/mensa/FoodDay.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.model.mensa +{ + public class FoodDay : BaseModel + { + private int _id; + private string _header; + private string _date; + + private ObservableCollection _foods = null; + + public FoodDay() + { + this.LoadData(); + } + + public FoodDay(int id, string header) + { + _id = id; + _header = header; + _date = header + " (01.01.1970)"; + this.LoadData(); + } + + public void LoadData() + { + this.Foods = new ObservableCollection(); + this.Foods.Add(new Food("Tagesuppe", "Schweinebrühe")); + this.Foods.Add(new Food("Essen 1", "Gaisburger Marsch mit Rindfleisch und Wurzelgemüse, dazu eine Scheibe Brot, Obst (R)")); + this.Foods.Add(new Food("Essen 2", "Weißkohlroulade mit pikanter Fleischfüllung auf Schmorkohlsauce zu Petersilienkartoffeln, Obst (S)")); + this.Foods.Add(new Food("Essen 3", "Spätzle-Pilz-Gouda-Pfanne mit Leipziger Allerlei und Sauce Mousseline (*)")); + this.Foods.Add(new Food("Essen 4", "Putenragout \"Florenz\" aus der Brust auf feiner Parmesansauce angerichtet (P),dazu Buttererbsen, Paprikagemüse, Maisgemüse sowie Ingwerreis, Pasta oder Kartoffelrösti(*)")); + this.Foods.Add(new Food("Aktion", "Tandem - Magdeburg kocht für Cottbus Harzer Teufelwurst mit grünen Teufelspuck, Scharfes Hexendessert (S)")); + } + + public string Header + { + get { return _header; } + set + { + if (value != _header) + { + _header = value; + NotifyPropertyChanged("header"); + } + } + } + + public string Date + { + get { return _date; } + set + { + if (value != _date) + { + _date = value; + NotifyPropertyChanged("date"); + } + } + } + + public ObservableCollection Foods + { + get { return _foods; } + set + { + if (value != _foods) + { + _foods = value; + NotifyPropertyChanged("foods"); + } + } + } + + public int Id + { + get { return _id; } + set + { + if (value != _id) + { + _id = value; + NotifyPropertyChanged("id"); + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/MensaViewModel.cs b/CampusAppWP8/CampusAppWP8/model/mensa/MensaViewModel.cs new file mode 100644 index 00000000..d2d5c9d0 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/model/mensa/MensaViewModel.cs @@ -0,0 +1,48 @@ +using CampusAppWP8.Resources; +using Microsoft.Phone.Controls; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.model.mensa +{ + public class MensaViewModel : BaseViewModel + { + private ObservableCollection _foodDays = null; + + public MensaViewModel() + { + this.FoodDays = new ObservableCollection(); + this.LoadData(); + } + + public void LoadData() + { + this.FoodDays.Add(new FoodDay(0, AppResources.Time_Day_Monday)); + this.FoodDays.Add(new FoodDay(1, AppResources.Time_Day_Tuesday)); + this.FoodDays.Add(new FoodDay(2, AppResources.Time_Day_Wednesday)); + this.FoodDays.Add(new FoodDay(3, AppResources.Time_Day_Thursday)); + this.FoodDays.Add(new FoodDay(4, AppResources.Time_Day_Friday)); + } + + public ObservableCollection FoodDays + { + get + { + return _foodDays; + } + set + { + if (value != _foodDays) + { + _foodDays = value; + NotifyPropertyChanged("foodDays"); + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml index dd85a2e9..f515d977 100644 --- a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml @@ -6,7 +6,7 @@ xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:views="CampusAppWP8.model.mensa" + xmlns:viewModel="clr-namespace:CampusAppWP8.model.mensa" mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" @@ -15,232 +15,42 @@ OrientationChanged="PhoneApplicationPage_OrientationChanged" shell:SystemTray.IsVisible="True"> + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs index 59e24a03..b7a5e1fa 100644 --- a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs @@ -15,11 +15,40 @@ namespace CampusAppWP8.pages.mensa public MensaPage() { InitializeComponent(); + MensaPivot.SelectedIndex = this.calcSelectedIndex(); } private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) { } + + private int calcSelectedIndex() + { + DayOfWeek today = DateTime.Now.DayOfWeek; + int todayIndex = 0; + switch (today) + { + case DayOfWeek.Monday: + todayIndex = 0; + break; + case DayOfWeek.Tuesday: + todayIndex = 1; + break; + case DayOfWeek.Wednesday: + todayIndex = 2; + break; + case DayOfWeek.Thursday: + todayIndex = 3; + break; + case DayOfWeek.Friday: + todayIndex = 4; + break; + default: + todayIndex = 0; + break; + } + return todayIndex; + } } } \ No newline at end of file From 074e3b6b79fbfd7d73d5c2b787a2359fd97d12cd Mon Sep 17 00:00:00 2001 From: stubbfel Date: Mon, 27 May 2013 18:21:37 +0200 Subject: [PATCH 08/47] add lecturepage --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 7 ++ .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- .../Resources/AppResources.Designer.cs | 45 +++++++ .../CampusAppWP8/Resources/AppResources.resx | 15 +++ .../pages/lecture/LecturePage.xaml | 113 ++++++++++++++++++ .../pages/lecture/LecturePage.xaml.cs | 24 ++++ 6 files changed, 205 insertions(+), 1 deletion(-) create mode 100644 CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml create mode 100644 CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 547643e7..8513151d 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -97,6 +97,9 @@ MainPage.xaml + + LecturePage.xaml + StartPage.xaml @@ -122,6 +125,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index f4b319d3..546c7228 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -13,7 +13,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs index 12bdbff7..37da2af6 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs @@ -123,6 +123,51 @@ namespace CampusAppWP8.Resources { } } + /// + /// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt. + /// + public static string LectureApp_Course { + get { + return ResourceManager.GetString("LectureApp_Course", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Abschluss ähnelt. + /// + public static string LectureApp_Degree { + get { + return ResourceManager.GetString("LectureApp_Degree", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Vorlesungsname ähnelt. + /// + public static string LectureApp_LectureName { + get { + return ResourceManager.GetString("LectureApp_LectureName", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Semester ähnelt. + /// + public static string LectureApp_Semester { + get { + return ResourceManager.GetString("LectureApp_Semester", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Fachsemester ähnelt. + /// + public static string LectureApp_Term { + get { + return ResourceManager.GetString("LectureApp_Term", resourceCulture); + } + } + /// /// Sucht eine lokalisierte Zeichenfolge, die Vorlesung ähnelt. /// diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx index 694a70f8..2af3726e 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx @@ -176,4 +176,19 @@ Stundenplan + + Studiengang + + + Abschluss + + + Vorlesungsname + + + Semester + + + Fachsemester + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml b/CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml new file mode 100644 index 00000000..ef05c7e3 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml.cs new file mode 100644 index 00000000..d8a59d1f --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml.cs @@ -0,0 +1,24 @@ +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; + +namespace CampusAppWP8.pages.lecture +{ + public partial class Lecture : PhoneApplicationPage + { + public Lecture() + { + InitializeComponent(); + } + + private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + { + } + } +} \ No newline at end of file From 3c2b9acc29b3d284a6ff01e59651b3821b8305b3 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 28 May 2013 11:04:48 +0200 Subject: [PATCH 09/47] add mappage --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 14 ++--- .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- .../pages/campusmap/CampusMapPage.xaml | 52 +++++++++++++++++++ .../pages/campusmap/CampusMapPage.xaml.cs | 24 +++++++++ 4 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml create mode 100644 CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 7feef2cd..c073cd4f 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -98,17 +98,17 @@ MainPage.xaml - + + CampusMapPage.xaml + LecturePage.xaml - - StartPage.xaml @@ -143,15 +143,17 @@ MSBuild:Compile Designer - + + Designer + MSBuild:Compile + Designer MSBuild:Compile - + MSBuild:Compile Designer - Designer diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index 541070b6..8788ec1d 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -13,7 +13,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml b/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml new file mode 100644 index 00000000..b5bcc5ba --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml.cs new file mode 100644 index 00000000..cb70afac --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/campusmap/CampusMapPage.xaml.cs @@ -0,0 +1,24 @@ +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; + +namespace CampusAppWP8.pages.campusmap +{ + public partial class CampusMapPage : PhoneApplicationPage + { + public CampusMapPage() + { + InitializeComponent(); + } + + private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + { + } + } +} \ No newline at end of file From 787e0dcab0a7238653555e4b97d12c26d42534d9 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 28 May 2013 11:21:44 +0200 Subject: [PATCH 10/47] update pagedraft --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 10 ++++------ .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- .../CampusAppWP8/ViewModels/PivotItem1ViewModel.cs | 11 ----------- .../CampusAppWP8/ViewModels/PivotItem2ViewModel.cs | 11 ----------- .../pages/webmail/{Webmail.xaml => WebmailPage.xaml} | 0 .../webmail/{Webmail.xaml.cs => WebmailPage.xaml.cs} | 0 6 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 CampusAppWP8/CampusAppWP8/ViewModels/PivotItem1ViewModel.cs delete mode 100644 CampusAppWP8/CampusAppWP8/ViewModels/PivotItem2ViewModel.cs rename CampusAppWP8/CampusAppWP8/pages/webmail/{Webmail.xaml => WebmailPage.xaml} (100%) rename CampusAppWP8/CampusAppWP8/pages/webmail/{Webmail.xaml.cs => WebmailPage.xaml.cs} (100%) diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index c073cd4f..065e3e8e 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -112,8 +112,8 @@ StartPage.xaml - - Webmail.xaml + + WebmailPage.xaml @@ -124,8 +124,6 @@ - - @@ -159,9 +157,9 @@ Designer MSBuild:Compile - - Designer + MSBuild:Compile + Designer diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index 8788ec1d..f4b319d3 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -13,7 +13,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem1ViewModel.cs b/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem1ViewModel.cs deleted file mode 100644 index 83db7e3d..00000000 --- a/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem1ViewModel.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace CampusAppWP8.ViewModels -{ - class PivotItem1ViewModel - { - } -} diff --git a/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem2ViewModel.cs b/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem2ViewModel.cs deleted file mode 100644 index a387d5f7..00000000 --- a/CampusAppWP8/CampusAppWP8/ViewModels/PivotItem2ViewModel.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace CampusAppWP8.ViewModels -{ - class PivotItem2ViewModel - { - } -} diff --git a/CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml b/CampusAppWP8/CampusAppWP8/pages/webmail/WebmailPage.xaml similarity index 100% rename from CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml rename to CampusAppWP8/CampusAppWP8/pages/webmail/WebmailPage.xaml diff --git a/CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/webmail/WebmailPage.xaml.cs similarity index 100% rename from CampusAppWP8/CampusAppWP8/pages/webmail/Webmail.xaml.cs rename to CampusAppWP8/CampusAppWP8/pages/webmail/WebmailPage.xaml.cs From 3c8fb4781b3d0c92eed4db8d6971ff477ace9d18 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 28 May 2013 14:00:22 +0200 Subject: [PATCH 11/47] add departmentpage and modell --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 13 ++++ .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- .../model/departments/ChairModel.cs | 37 ++++++++++ .../model/departments/DepartmentModel.cs | 68 +++++++++++++++++++ .../model/departments/DepartmentViewModel.cs | 45 ++++++++++++ .../model/departments/FacultyModel.cs | 66 ++++++++++++++++++ .../pages/departments/DepartmentPage.xaml | 58 ++++++++++++++++ .../pages/departments/DepartmentPage.xaml.cs | 24 +++++++ 8 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs create mode 100644 CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml create mode 100644 CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 065e3e8e..ba3c019b 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -98,9 +98,16 @@ MainPage.xaml + + + + CampusMapPage.xaml + + DepartmentPage.xaml + LecturePage.xaml @@ -145,6 +152,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -202,10 +213,12 @@ + ..\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/departments/DepartmentPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs new file mode 100644 index 00000000..edd38c99 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs @@ -0,0 +1,24 @@ +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; + +namespace CampusAppWP8.pages.departments +{ + public partial class DepartmentPage : PhoneApplicationPage + { + public DepartmentPage() + { + InitializeComponent(); + } + + private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + { + } + } +} \ No newline at end of file From 3fafe262d501e53ec3f8eee286519f0084b64269 Mon Sep 17 00:00:00 2001 From: Christian Fiedler Date: Tue, 28 May 2013 14:34:24 +0200 Subject: [PATCH 12/47] News works with RSSFeed. link is not in --- .../CampusAppWP8/pages/news/NewsPage.xaml | 32 +++++++++++++++++ .../CampusAppWP8/pages/news/NewsPage.xaml.cs | 20 +++++++++++ .../CampusAppWP8/pages/news/RSSItem.cs | 12 +++++++ .../pages/news/RSSNewsTemplate.xaml | 35 +++++++++++++++++++ .../pages/news/RSSNewsTemplate.xaml.cs | 20 +++++++++++ 5 files changed, 119 insertions(+) create mode 100644 CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml create mode 100644 CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs create mode 100644 CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs create mode 100644 CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml create mode 100644 CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml.cs diff --git a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml new file mode 100644 index 00000000..e20c3bd6 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs new file mode 100644 index 00000000..2a1b3ca6 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs @@ -0,0 +1,20 @@ +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; + +namespace CampusAppWP8.pages.news +{ + public partial class NewsPage : PhoneApplicationPage + { + public NewsPage() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs b/CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs new file mode 100644 index 00000000..3d4232c8 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.pages.news +{ + class RSSItem + { + } +} diff --git a/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml b/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml new file mode 100644 index 00000000..5d65ba98 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml.cs new file mode 100644 index 00000000..557b0bcd --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml.cs @@ -0,0 +1,20 @@ +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; + +namespace CampusAppWP8.pages.news +{ + public partial class RSSNewsTemplate : PhoneApplicationPage + { + public RSSNewsTemplate() + { + InitializeComponent(); + } + } +} \ No newline at end of file From db68565d9423734b7216217628f610300ab1ff83 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Wed, 29 May 2013 10:14:36 +0200 Subject: [PATCH 13/47] correct csproj -file --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index ba3c019b..091834dd 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -115,7 +115,9 @@ - + + MensaPage.xaml + StartPage.xaml From 072da7047446faa73b8a9bff9d70a78443454985 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Wed, 29 May 2013 10:31:03 +0200 Subject: [PATCH 14/47] correct csproj -file --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 5 +++- .../CampusAppWP8/pages/mensa/MensaFeed.cs | 28 +++++++++++++++++++ CampusAppWP8/CampusAppWP8/utility/Feed.cs | 12 ++++++++ CampusAppWP8/CampusAppWP8/utility/URLList.cs | 13 +++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs create mode 100644 CampusAppWP8/CampusAppWP8/utility/Feed.cs create mode 100644 CampusAppWP8/CampusAppWP8/utility/URLList.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 091834dd..3caed675 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -115,8 +115,9 @@ + - MensaPage.xaml + MensaPage.xaml StartPage.xaml @@ -130,6 +131,8 @@ True AppResources.resx + + diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs new file mode 100644 index 00000000..9658357e --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs @@ -0,0 +1,28 @@ +using CampusAppWP8.utility; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.pages.mensa +{ + public class MensaFeed : Feed + { + + private readonly Uri _feedUrl = URLList.MensaFeedURL; + + public MensaFeed() + { + + } + + public Uri FeedURL + { + get + { + return _feedUrl; + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/utility/Feed.cs b/CampusAppWP8/CampusAppWP8/utility/Feed.cs new file mode 100644 index 00000000..a3ea8996 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/utility/Feed.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.utility +{ + public abstract class Feed + { + } +} diff --git a/CampusAppWP8/CampusAppWP8/utility/URLList.cs b/CampusAppWP8/CampusAppWP8/utility/URLList.cs new file mode 100644 index 00000000..ba369ce8 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/utility/URLList.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.utility +{ + public static class URLList + { + public static Uri MensaFeedURL = new Uri("http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/", UriKind.Absolute); + } +} From 1b0ebe3f983a8b2050094686ae04899e798c74cb Mon Sep 17 00:00:00 2001 From: stubbfel Date: Wed, 29 May 2013 16:12:22 +0200 Subject: [PATCH 15/47] updtade feedutlilty --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 3 +- .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- CampusAppWP8/CampusAppWP8/model/mensa/Food.cs | 56 ----------- .../CampusAppWP8/model/mensa/FoodDay.cs | 94 ------------------- .../model/mensa/MensaViewModel.cs | 17 ++-- .../CampusAppWP8/model/mensa/MenuModel.cs | 50 ++++++++++ .../CampusAppWP8/pages/mensa/MensaFeed.cs | 30 ++++-- .../CampusAppWP8/pages/mensa/MensaPage.xaml | 33 +------ .../pages/mensa/MensaPage.xaml.cs | 34 ++++++- CampusAppWP8/CampusAppWP8/utility/Feed.cs | 57 +++++++++++ 10 files changed, 172 insertions(+), 204 deletions(-) delete mode 100644 CampusAppWP8/CampusAppWP8/model/mensa/Food.cs delete mode 100644 CampusAppWP8/CampusAppWP8/model/mensa/FoodDay.cs create mode 100644 CampusAppWP8/CampusAppWP8/model/mensa/MenuModel.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 3caed675..50ad8105 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -102,6 +102,7 @@ + CampusMapPage.xaml @@ -113,8 +114,6 @@ - - MensaPage.xaml diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index 9f9619ed..04b6f0e8 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -13,7 +13,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/Food.cs b/CampusAppWP8/CampusAppWP8/model/mensa/Food.cs deleted file mode 100644 index a7995f2f..00000000 --- a/CampusAppWP8/CampusAppWP8/model/mensa/Food.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace CampusAppWP8.model.mensa -{ - public class Food : BaseModel - { - private string _detail; - private string _title; - public Food() - { - } - - public Food(string title, string detail) - { - _title = title; - _detail = detail; - } - - public string Title - { - get - { - return _title; - } - - set - { - if (value != _title) - { - _title = value; - NotifyPropertyChanged("title"); - } - } - } - - public string Detail - { - get - { - return _detail; - } - - set - { - if (value != _detail) - { - _detail = value; - NotifyPropertyChanged("detail"); - } - } - } - } -} diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/FoodDay.cs b/CampusAppWP8/CampusAppWP8/model/mensa/FoodDay.cs deleted file mode 100644 index 0f585be5..00000000 --- a/CampusAppWP8/CampusAppWP8/model/mensa/FoodDay.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CampusAppWP8.model.mensa -{ - public class FoodDay : BaseModel - { - private int _id; - private string _header; - private string _date; - - private ObservableCollection _foods = null; - - public FoodDay() - { - this.LoadData(); - } - - public FoodDay(int id, string header) - { - _id = id; - _header = header; - _date = header + " (01.01.1970)"; - this.LoadData(); - } - - public void LoadData() - { - this.Foods = new ObservableCollection(); - this.Foods.Add(new Food("Tagesuppe", "Schweinebrühe")); - this.Foods.Add(new Food("Essen 1", "Gaisburger Marsch mit Rindfleisch und Wurzelgemüse, dazu eine Scheibe Brot, Obst (R)")); - this.Foods.Add(new Food("Essen 2", "Weißkohlroulade mit pikanter Fleischfüllung auf Schmorkohlsauce zu Petersilienkartoffeln, Obst (S)")); - this.Foods.Add(new Food("Essen 3", "Spätzle-Pilz-Gouda-Pfanne mit Leipziger Allerlei und Sauce Mousseline (*)")); - this.Foods.Add(new Food("Essen 4", "Putenragout \"Florenz\" aus der Brust auf feiner Parmesansauce angerichtet (P),dazu Buttererbsen, Paprikagemüse, Maisgemüse sowie Ingwerreis, Pasta oder Kartoffelrösti(*)")); - this.Foods.Add(new Food("Aktion", "Tandem - Magdeburg kocht für Cottbus Harzer Teufelwurst mit grünen Teufelspuck, Scharfes Hexendessert (S)")); - } - - public string Header - { - get { return _header; } - set - { - if (value != _header) - { - _header = value; - NotifyPropertyChanged("header"); - } - } - } - - public string Date - { - get { return _date; } - set - { - if (value != _date) - { - _date = value; - NotifyPropertyChanged("date"); - } - } - } - - public ObservableCollection Foods - { - get { return _foods; } - set - { - if (value != _foods) - { - _foods = value; - NotifyPropertyChanged("foods"); - } - } - } - - public int Id - { - get { return _id; } - set - { - if (value != _id) - { - _id = value; - NotifyPropertyChanged("id"); - } - } - } - } -} diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/MensaViewModel.cs b/CampusAppWP8/CampusAppWP8/model/mensa/MensaViewModel.cs index d2d5c9d0..11443e57 100644 --- a/CampusAppWP8/CampusAppWP8/model/mensa/MensaViewModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/mensa/MensaViewModel.cs @@ -1,4 +1,6 @@ -using CampusAppWP8.Resources; +using CampusAppWP8.pages.mensa; +using CampusAppWP8.Resources; +using CampusAppWP8.utility; using Microsoft.Phone.Controls; using System; using System.Collections.Generic; @@ -12,24 +14,21 @@ namespace CampusAppWP8.model.mensa { public class MensaViewModel : BaseViewModel { - private ObservableCollection _foodDays = null; + private ObservableCollection _foodDays = null; public MensaViewModel() { - this.FoodDays = new ObservableCollection(); + _foodDays = new ObservableCollection(); this.LoadData(); } public void LoadData() { - this.FoodDays.Add(new FoodDay(0, AppResources.Time_Day_Monday)); - this.FoodDays.Add(new FoodDay(1, AppResources.Time_Day_Tuesday)); - this.FoodDays.Add(new FoodDay(2, AppResources.Time_Day_Wednesday)); - this.FoodDays.Add(new FoodDay(3, AppResources.Time_Day_Thursday)); - this.FoodDays.Add(new FoodDay(4, AppResources.Time_Day_Friday)); + Feed feed = new MensaFeed(); + feed.downloadFeed(); } - public ObservableCollection FoodDays + public ObservableCollection FoodDays { get { diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/MenuModel.cs b/CampusAppWP8/CampusAppWP8/model/mensa/MenuModel.cs new file mode 100644 index 00000000..42338ede --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/model/mensa/MenuModel.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace CampusAppWP8.model.mensa +{ + + [XmlRoot("root")] + public class MenuWeekModel + { + [XmlArray("BTU")] + [XmlArrayItem("Tagesmenu")] + public ObservableCollection menus { get; set; } + public MenuWeekModel() + { + } + } + + public class MenuModel + { + public MenuModel() + { + } + + [XmlElement("Wochentag")] + public string WochenTag { get; set; } + + [XmlElement("Essen1")] + public string Essen1 {get; set;} + + [XmlElement("Essen2")] + public string Essen2 {get; set;} + + [XmlElement("Essen3")] + public string Essen3 {get; set;} + + [XmlElement("Essen4")] + public string Essen4 {get; set;} + + [XmlElement("Bio")] + public string Bio {get; set;} + + [XmlElement("Aktionstag")] + public string Aktionstag {get; set;} + } +} diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs index 9658357e..6201c714 100644 --- a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs @@ -1,28 +1,38 @@ -using CampusAppWP8.utility; +using CampusAppWP8.model.mensa; +using CampusAppWP8.utility; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Xml.Linq; +using System.Xml.Serialization; namespace CampusAppWP8.pages.mensa { public class MensaFeed : Feed { - private readonly Uri _feedUrl = URLList.MensaFeedURL; - - public MensaFeed() + public MensaFeed(): base(URLList.MensaFeedURL) { - + } - public Uri FeedURL + protected override void doSomething(string downloadResult) { - get - { - return _feedUrl; - } + XmlSerializer serializer = new XmlSerializer(typeof(MenuWeekModel)); + XDocument document = XDocument.Parse(downloadResult); + + if (!document.Root.Name.Equals("root")) + { + XElement content = document.Root; + document = new XDocument(); + document.Add(new XElement("root", content)); } + MenuWeekModel menuWeek = (MenuWeekModel)serializer.Deserialize(document.CreateReader()); + menus = menuWeek.menus; + } + + public System.Collections.ObjectModel.ObservableCollection menus { get; set; } } } diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml index f515d977..21aa8f8e 100644 --- a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml @@ -6,7 +6,6 @@ xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:viewModel="clr-namespace:CampusAppWP8.model.mensa" mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" @@ -14,43 +13,15 @@ SupportedOrientations="PortraitOrLandscape" Orientation="Portrait" OrientationChanged="PhoneApplicationPage_OrientationChanged" shell:SystemTray.IsVisible="True"> - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs index b7a5e1fa..9ac341b9 100644 --- a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs @@ -7,6 +7,10 @@ using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; +using CampusAppWP8.utility; +using System.Xml.Serialization; +using CampusAppWP8.model.mensa; +using System.Xml.Linq; namespace CampusAppWP8.pages.mensa { @@ -15,8 +19,36 @@ namespace CampusAppWP8.pages.mensa public MensaPage() { InitializeComponent(); - MensaPivot.SelectedIndex = this.calcSelectedIndex(); + //MensaPivot.SelectedIndex = this.calcSelectedIndex(); + WebClient client = new WebClient(); + client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(DownloadCompleted); + client.DownloadStringAsync(URLList.MensaFeedURL); + } + private void DownloadCompleted(object sender, DownloadStringCompletedEventArgs e) + { + Exception downloadError = e.Error; + if (downloadError != null) + { + Console.Out.WriteLineAsync(downloadError.Message); + return; + } + + string downloadResult = e.Result; + if (downloadResult != null && !downloadResult.Equals(String.Empty)) + { + XmlSerializer serializer = new XmlSerializer(typeof(MenuWeekModel)); + XDocument document = XDocument.Parse(downloadResult); + + if (!document.Root.Name.Equals("root")) + { + XElement content = document.Root; + document = new XDocument(); + document.Add(new XElement("root", content)); + } + MenuWeekModel menuWeek = (MenuWeekModel)serializer.Deserialize(document.CreateReader()); + MensaPivot.ItemsSource = menuWeek.menus; + } } private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) diff --git a/CampusAppWP8/CampusAppWP8/utility/Feed.cs b/CampusAppWP8/CampusAppWP8/utility/Feed.cs index a3ea8996..45aaf63d 100644 --- a/CampusAppWP8/CampusAppWP8/utility/Feed.cs +++ b/CampusAppWP8/CampusAppWP8/utility/Feed.cs @@ -3,10 +3,67 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Net; namespace CampusAppWP8.utility { public abstract class Feed { + #region Member + + private readonly Uri _feedURL; + + #endregion + + #region Constructor + + public Feed() + { + } + + public Feed(Uri FeedURL) + { + _feedURL = FeedURL; + } + + #endregion + + #region Methods + public void downloadFeed() + { + WebClient client = new WebClient(); + client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(DownloadCompleted); + client.DownloadStringAsync(_feedURL); + } + + private void DownloadCompleted(object sender, DownloadStringCompletedEventArgs e) + { + Exception downloadError = e.Error; + if (downloadError != null) + { + Console.Out.WriteLineAsync(downloadError.Message); + return; + } + + string downloadResult = e.Result; + if (downloadResult != null && !downloadResult.Equals(String.Empty)) + { + doSomething(downloadResult); + } + } + + protected abstract void doSomething(string downloadResult); + + #endregion + + #region Getter&Setter + + public Uri FeedURL + { + get { return _feedURL; } + } + + #endregion + } } From 3d3e507849fb74b9b968a765a523720ab6aae9ae Mon Sep 17 00:00:00 2001 From: Christian Fiedler Date: Thu, 30 May 2013 15:08:12 +0200 Subject: [PATCH 16/47] update --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 17 +- .../CampusAppWP8/Properties/WMAppManifest.xml | 86 ++-- .../Resources/AppResources.Designer.cs | 477 +++++++++--------- .../CampusAppWP8/Resources/AppResources.resx | 359 ++++++------- .../CampusAppWP8/pages/news/NewsPage.xaml | 29 +- .../CampusAppWP8/pages/news/NewsPage.xaml.cs | 86 ++++ .../CampusAppWP8/pages/news/RSSItem.cs | 79 +++ .../pages/news/RSSNewsTemplate.xaml | 29 +- .../pages/news/RSSNewsTemplate.xaml.cs | 4 +- 9 files changed, 684 insertions(+), 482 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index eea574b3..23dd80f4 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -97,6 +97,13 @@ MainPage.xaml + + NewsPage.xaml + + + + RSSNewsTemplate.xaml + StartPage.xaml @@ -122,6 +129,14 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -167,13 +182,13 @@ + ..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll - diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index f4b319d3..26376530 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -1,44 +1,44 @@ - - - - - Assets\ApplicationIcon.png - - - - - - - - - - - - - - - - Assets\Tiles\FlipCycleTileSmall.png - 0 - Assets\Tiles\FlipCycleTileMedium.png - CampusAppWP8 - - - - - - - - - - - - - - - - - - - + + + + + Assets\ApplicationIcon.png + + + + + + + + + + + + + + + + Assets\Tiles\FlipCycleTileSmall.png + 0 + Assets\Tiles\FlipCycleTileMedium.png + CampusAppWP8 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs index 12bdbff7..9473d3da 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs @@ -1,234 +1,243 @@ -//------------------------------------------------------------------------------ -// -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.18046 -// -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. -// -//------------------------------------------------------------------------------ - -namespace CampusAppWP8.Resources { - using System; - - - /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class AppResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal AppResources() { - } - - /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWP8.Resources.AppResources", typeof(AppResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Hinzufügen ähnelt. - /// - public static string AppBarButtonText { - get { - return ResourceManager.GetString("AppBarButtonText", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Menübefehl ähnelt. - /// - public static string AppBarMenuItemText { - get { - return ResourceManager.GetString("AppBarMenuItemText", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die BTU CampusApp ähnelt. - /// - public static string ApplicationTitle { - get { - return ResourceManager.GetString("ApplicationTitle", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt. - /// - public static string CampusMapApp_Title { - get { - return ResourceManager.GetString("CampusMapApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt. - /// - public static string DepartmentApp_Title { - get { - return ResourceManager.GetString("DepartmentApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Events ähnelt. - /// - public static string EventApp_Title { - get { - return ResourceManager.GetString("EventApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Hausaufgaben ähnelt. - /// - public static string HomeworkApp_Title { - get { - return ResourceManager.GetString("HomeworkApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Vorlesung ähnelt. - /// - public static string LectureApp_Title { - get { - return ResourceManager.GetString("LectureApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Links ähnelt. - /// - public static string LinkApp_Title { - get { - return ResourceManager.GetString("LinkApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Webmail ähnelt. - /// - public static string MailApp_Title { - get { - return ResourceManager.GetString("MailApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Mensaplan ähnelt. - /// - public static string MensaApp_Title { - get { - return ResourceManager.GetString("MensaApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die News ähnelt. - /// - public static string NewsApp_Title { - get { - return ResourceManager.GetString("NewsApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Öffnungszeiten ähnelt. - /// - public static string OpenHoursApp_Title { - get { - return ResourceManager.GetString("OpenHoursApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Fachschaften ähnelt. - /// - public static string OSAApp_Title { - get { - return ResourceManager.GetString("OSAApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt. - /// - public static string ResourceFlowDirection { - get { - return ResourceManager.GetString("ResourceFlowDirection", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die de-de ähnelt. - /// - public static string ResourceLanguage { - get { - return ResourceManager.GetString("ResourceLanguage", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Beispielwert für die Laufzeiteigenschaft ähnelt. - /// - public static string SampleProperty { - get { - return ResourceManager.GetString("SampleProperty", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Stundenplan ähnelt. - /// - public static string TimeTableApp_Title { - get { - return ResourceManager.GetString("TimeTableApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Willkommen zur BTU-CampusApp WP8 ähnelt. - /// - public static string WelcomeString { - get { - return ResourceManager.GetString("WelcomeString", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.18046 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace CampusAppWP8.Resources { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class AppResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AppResources() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWP8.Resources.AppResources", typeof(AppResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hinzufügen ähnelt. + /// + public static string AppBarButtonText { + get { + return ResourceManager.GetString("AppBarButtonText", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Menübefehl ähnelt. + /// + public static string AppBarMenuItemText { + get { + return ResourceManager.GetString("AppBarMenuItemText", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die BTU CampusApp ähnelt. + /// + public static string ApplicationTitle { + get { + return ResourceManager.GetString("ApplicationTitle", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt. + /// + public static string CampusMapApp_Title { + get { + return ResourceManager.GetString("CampusMapApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt. + /// + public static string DepartmentApp_Title { + get { + return ResourceManager.GetString("DepartmentApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Events ähnelt. + /// + public static string EventApp_Title { + get { + return ResourceManager.GetString("EventApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hausaufgaben ähnelt. + /// + public static string HomeworkApp_Title { + get { + return ResourceManager.GetString("HomeworkApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Vorlesung ähnelt. + /// + public static string LectureApp_Title { + get { + return ResourceManager.GetString("LectureApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Links ähnelt. + /// + public static string LinkApp_Title { + get { + return ResourceManager.GetString("LinkApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Webmail ähnelt. + /// + public static string MailApp_Title { + get { + return ResourceManager.GetString("MailApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Mensaplan ähnelt. + /// + public static string MensaApp_Title { + get { + return ResourceManager.GetString("MensaApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die News ähnelt. + /// + public static string NewsApp_Title { + get { + return ResourceManager.GetString("NewsApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die zur Übersicht ähnelt. + /// + public static string NewsHomeBtn { + get { + return ResourceManager.GetString("NewsHomeBtn", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Öffnungszeiten ähnelt. + /// + public static string OpenHoursApp_Title { + get { + return ResourceManager.GetString("OpenHoursApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Fachschaften ähnelt. + /// + public static string OSAApp_Title { + get { + return ResourceManager.GetString("OSAApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt. + /// + public static string ResourceFlowDirection { + get { + return ResourceManager.GetString("ResourceFlowDirection", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die de-de ähnelt. + /// + public static string ResourceLanguage { + get { + return ResourceManager.GetString("ResourceLanguage", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Beispielwert für die Laufzeiteigenschaft ähnelt. + /// + public static string SampleProperty { + get { + return ResourceManager.GetString("SampleProperty", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Stundenplan ähnelt. + /// + public static string TimeTableApp_Title { + get { + return ResourceManager.GetString("TimeTableApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Willkommen zur BTU-CampusApp WP8 ähnelt. + /// + public static string WelcomeString { + get { + return ResourceManager.GetString("WelcomeString", resourceCulture); + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx index 694a70f8..c410adb8 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx @@ -1,179 +1,182 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - LeftToRight - Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language - - - de-de - Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language. - - - BTU CampusApp - - - Beispielwert für die Laufzeiteigenschaft - - - Hinzufügen - - - Menübefehl - - - Willkommen zur BTU-CampusApp WP8 - - - Campusplan - - - Lehrstühle - - - Events - - - Hausaufgaben - - - Vorlesung - - - Links - - - Webmail - - - Mensaplan - - - News - - - Öffnungszeiten - - - Fachschaften - - - Stundenplan - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + LeftToRight + Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language + + + de-de + Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language. + + + BTU CampusApp + + + Beispielwert für die Laufzeiteigenschaft + + + Hinzufügen + + + Menübefehl + + + Willkommen zur BTU-CampusApp WP8 + + + Campusplan + + + Lehrstühle + + + Events + + + Hausaufgaben + + + Vorlesung + + + Links + + + Webmail + + + Mensaplan + + + News + + + Öffnungszeiten + + + Fachschaften + + + Stundenplan + + + zur Übersicht + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml index e20c3bd6..abcdf6b0 100644 --- a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml @@ -16,17 +16,32 @@ - + - - + + + + + - - - + - \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs index 2a1b3ca6..b98bc8e0 100644 --- a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml.cs @@ -7,14 +7,100 @@ using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; +using System.Xml.Linq; +using System.Xml; +using System.IO; namespace CampusAppWP8.pages.news { public partial class NewsPage : PhoneApplicationPage { + List itemList; + public NewsPage() { InitializeComponent(); } + + // + protected override void OnNavigatedTo(NavigationEventArgs e) + { + this.itemList = new List(); + this.itemList.Clear(); + + WebClient wc = new WebClient(); + wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(WC_DownloadStringCompleted); + + wc.DownloadStringAsync(new Uri("http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php")); + } + + private void WC_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) + { + if (e.Error != null) + return; + + int i = 0; + + XElement xmlitems = XElement.Parse(e.Result); + + List elements = xmlitems.Descendants("item").ToList(); + + + + foreach (XElement rssItem in elements) + { + if(i < 12) + { + RSSItem rss = new RSSItem(); + + rss.Title = rssItem.Element("title").Value; + rss.Text = rssItem.Element("description").Value; + rss.Timestamp = rssItem.Element("pubDate").Value; + + this.itemList.Add(rss); + + + Button btn = new Button(); + btn.Name = "NewsRowAppButton" + i; + btn.Content = rss.Title; + btn.BorderBrush = null; + btn.Background = null; + btn.VerticalContentAlignment = VerticalAlignment.Stretch; + btn.HorizontalContentAlignment = HorizontalAlignment.Stretch; + btn.BorderThickness = new Thickness(0); + btn.Padding = new Thickness(0); + btn.Click += NewsRowAppButton_Click; + btn.Tag = i; + + PivotItem newPivItem = new PivotItem(); + newPivItem.Name = "NewsPivot" + i; + newPivItem.Header = rss.Date; + + RSSNewsTemplate pvContent = new RSSNewsTemplate(); + pvContent.NewsHeadline.Text = rss.Title; + pvContent.NewsText.Text = rss.Text; + pvContent.NewsHome.Click += NewsHome_Click; + + newPivItem.Content = pvContent; + NewsPivot.Items.Add(newPivItem); + + ButtonPanel.Items.Add(btn); + + i++; + } + } + } + + // Button Functions + private void NewsRowAppButton_Click(object sender, RoutedEventArgs e) + { + Button btn = (Button)sender; + NewsPivot.SelectedIndex = (int)btn.Tag + 1; + } + + private void NewsHome_Click(object sender, RoutedEventArgs e) + { + NewsPivot.SelectedIndex = 0; + } } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs b/CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs index 3d4232c8..1a04c3a1 100644 --- a/CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs +++ b/CampusAppWP8/CampusAppWP8/pages/news/RSSItem.cs @@ -8,5 +8,84 @@ namespace CampusAppWP8.pages.news { class RSSItem { + private string title; + private string text; + private DateTime timestamp; + + public string Title + { + get { return this.title; } + set { this.title = value; } + } + + public string Text + { + get { return this.text; } + set { this.text = HTMLUnicodeToString(value); } + } + + public string Timestamp + { + get { return this.timestamp.ToString("R"); } + set { this.timestamp = DateTime.Parse(value); } + } + + public string Date + { + get { return String.Format("{0:ddd, dd.MM.yyyy}", this.timestamp); } + } + + public string Time + { + get { return String.Format("{0:h:mm} Uhr", this.timestamp); } + } + + private string HTMLUnicodeToString(string htmluni) + { + StringBuilder retValue = new StringBuilder(); + + for(int i = 0; i < htmluni.Length; i++) + { + switch (htmluni[i]) + { + case '&': + { + int startOff = i + 2; + int endOff = htmluni.IndexOf(';', startOff); + string sub = htmluni.Substring(startOff, endOff - startOff); + int cVal = int.Parse(sub); + + switch (cVal) + { + case 128: + retValue.Append('€'); + break; + + default: + retValue.Append((char)cVal); + break; + } + + i = endOff; + } + break; + case '<': + { + i = htmluni.IndexOf('>', i); + } + break; + case '\t': + break; + + default: + { + retValue.Append(htmluni[i]); + } + break; + } + } + + return retValue.ToString(); + } } } diff --git a/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml b/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml index 5d65ba98..0266db8a 100644 --- a/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/news/RSSNewsTemplate.xaml @@ -1,4 +1,4 @@ - - - + - + + - - - - - - - - - - - + + + + + + diff --git a/CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs similarity index 79% rename from CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml.cs rename to CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs index 7fa67653..21f26d96 100644 --- a/CampusAppWP8/CampusAppWP8/pages/lecture/LecturePage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/LecturePage.xaml.cs @@ -7,6 +7,8 @@ using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; +using CampusAppWP8.Pages.Lecture; +using CampusAppWP8.Utility; namespace CampusAppWP8.Pages.lecture { @@ -15,6 +17,8 @@ namespace CampusAppWP8.Pages.lecture public Lecture() { InitializeComponent(); + LectureFeed test = new LectureFeed(); + test.LoadFeed(); } private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/Results.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/Results.xaml new file mode 100644 index 00000000..119c3071 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/Results.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/Results.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/Results.xaml.cs new file mode 100644 index 00000000..4897337f --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/Results.xaml.cs @@ -0,0 +1,20 @@ +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; + +namespace CampusAppWP8.Pages.Lecture +{ + public partial class Results : PhoneApplicationPage + { + public Results() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index 04b6f0e8..b65e09d5 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -13,7 +13,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs index 211fb878..e5345b13 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs @@ -169,7 +169,7 @@ namespace CampusAppWP8.Resources { } /// - /// Sucht eine lokalisierte Zeichenfolge, die Vorlesung ähnelt. + /// Sucht eine lokalisierte Zeichenfolge, die Vorlesungen ähnelt. /// public static string LectureApp_Title { get { diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx index db28a286..9ce3f841 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx @@ -153,7 +153,7 @@ Hausaufgaben - Vorlesung + Vorlesungen Links diff --git a/CampusAppWP8/CampusAppWP8/Utility/RestApi.cs b/CampusAppWP8/CampusAppWP8/Utility/RestApi.cs index 49a94bbe..f179c448 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/RestApi.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/RestApi.cs @@ -8,16 +8,12 @@ namespace CampusAppWP8.Utility { using System; - using System.Collections.Generic; - using System.Linq; using System.Net; - using System.Text; - using System.Threading.Tasks; /// /// Class realize the access of restful RestAPI /// - public class RestApi + public abstract class RestApi { #region Members diff --git a/CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs b/CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs index 760d964d..5b49b20d 100644 --- a/CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs +++ b/CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs @@ -18,6 +18,8 @@ namespace CampusAppWP8.Utility /// Type for model of the feed public abstract class XmlFeed : Feed { + protected string validRootName = Constants.XMLRootElementName; + #region Constructor /// @@ -48,10 +50,9 @@ namespace CampusAppWP8.Utility { XmlSerializer serializer = new XmlSerializer(typeof(T)); XDocument document = XDocument.Parse(feedString); - string validRootName = Constants.XMLRootElementName; - if (!document.Root.Name.Equals(validRootName)) + if (!document.Root.Name.ToString().Equals(validRootName)) { - XElement content = document.Root; + XElement content = document.Root; document = new XDocument(); document.Add(new XElement(validRootName, content)); } From 29bc8620351c44d549ece5eeaa020b954b6a8c47 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Mon, 10 Jun 2013 18:45:55 +0200 Subject: [PATCH 36/47] add resultpage --- .../Pages/Lecture/ModulWebPage.xaml | 35 ++++++++++++++++++ .../Pages/Lecture/ModulWebPage.xaml.cs | 20 +++++++++++ .../Pages/Lecture/ResultPage.xaml | 36 +++++++++++++++++++ .../Pages/Lecture/ResultPage.xaml.cs | 33 +++++++++++++++++ .../{pages => Pages}/webmail/WebmailPage.xaml | 0 .../webmail/WebmailPage.xaml.cs | 0 6 files changed, 124 insertions(+) create mode 100644 CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml create mode 100644 CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs create mode 100644 CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml create mode 100644 CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs rename CampusAppWP8/CampusAppWP8/{pages => Pages}/webmail/WebmailPage.xaml (100%) rename CampusAppWP8/CampusAppWP8/{pages => Pages}/webmail/WebmailPage.xaml.cs (100%) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml new file mode 100644 index 00000000..45e8bd82 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs new file mode 100644 index 00000000..b8c9b463 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs @@ -0,0 +1,20 @@ +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; + +namespace CampusAppWP8.Pages.Lecture +{ + public partial class ModulWebPage : PhoneApplicationPage + { + public ModulWebPage() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml new file mode 100644 index 00000000..a1d44598 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs new file mode 100644 index 00000000..ffccf041 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml.cs @@ -0,0 +1,33 @@ +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.Utility; + +namespace CampusAppWP8.Pages.Lecture +{ + public partial class Results : PhoneApplicationPage + { + LectureFeed feed = new LectureFeed(); + public Results() + { + InitializeComponent(); + + this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady); + feed.LoadFeed(); + } + + /// + /// Method will be execute if the feed is ready + /// + private void FeedIsReady() + { + ResultList.ItemsSource = feed.Model.Activities; + } + } +} \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/webmail/WebmailPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/webmail/WebmailPage.xaml similarity index 100% rename from CampusAppWP8/CampusAppWP8/pages/webmail/WebmailPage.xaml rename to CampusAppWP8/CampusAppWP8/Pages/webmail/WebmailPage.xaml diff --git a/CampusAppWP8/CampusAppWP8/pages/webmail/WebmailPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/webmail/WebmailPage.xaml.cs similarity index 100% rename from CampusAppWP8/CampusAppWP8/pages/webmail/WebmailPage.xaml.cs rename to CampusAppWP8/CampusAppWP8/Pages/webmail/WebmailPage.xaml.cs From faa5dc744096bd8a6198ba3294c1f37ceae28a76 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Mon, 10 Jun 2013 18:46:39 +0200 Subject: [PATCH 37/47] add resultpage --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 13 +++++-- .../CampusAppWP8/Model/Lecture/LectureList.cs | 2 +- .../Pages/Lecture/ModulWebPage.xaml | 11 ++---- .../Pages/Lecture/ModulWebPage.xaml.cs | 13 +++++++ .../Pages/Lecture/ResultPage.xaml | 34 +++++++++++++++++-- .../Pages/Lecture/ResultPage.xaml.cs | 34 ++++++++++++++++++- .../CampusAppWP8/Pages/Lecture/Results.xaml | 34 ------------------- .../Pages/Lecture/Results.xaml.cs | 20 ----------- .../CampusAppWP8/Properties/WMAppManifest.xml | 2 +- 9 files changed, 91 insertions(+), 72 deletions(-) delete mode 100644 CampusAppWP8/CampusAppWP8/Pages/Lecture/Results.xaml delete mode 100644 CampusAppWP8/CampusAppWP8/Pages/Lecture/Results.xaml.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index ab05e896..f7fc8dd5 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -122,8 +122,11 @@ - - Results.xaml + + ModulWebPage.xaml + + + ResultPage.xaml MensaPage.xaml @@ -179,7 +182,11 @@ Designer MSBuild:Compile - + + Designer + MSBuild:Compile + + Designer MSBuild:Compile diff --git a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs index ac8e3fda..167d9457 100644 --- a/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs +++ b/CampusAppWP8/CampusAppWP8/Model/Lecture/LectureList.cs @@ -28,7 +28,7 @@ namespace CampusAppWP8.Model.Lecture [XmlArray("veranstaltungsliste")] [XmlArrayItem("veranstaltung")] - public ObservableCollection Activity { get; set; } + public ObservableCollection Activities { get; set; } #endregion diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml index 45e8bd82..f52dd8f2 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml @@ -9,26 +9,19 @@ FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" - SupportedOrientations="Portrait" Orientation="Portrait" + SupportedOrientations="PortraitOrLandscape" Orientation="Portrait" mc:Ignorable="d" shell:SystemTray.IsVisible="True"> - - - - - - - - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs index b8c9b463..dc55b355 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ModulWebPage.xaml.cs @@ -7,6 +7,7 @@ using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; +using System.Threading.Tasks; namespace CampusAppWP8.Pages.Lecture { @@ -16,5 +17,17 @@ namespace CampusAppWP8.Pages.Lecture { InitializeComponent(); } + + protected override void OnNavigatedTo(NavigationEventArgs e) + { + + if (NavigationContext.QueryString.ContainsKey("URL")) + { + string url = NavigationContext.QueryString["URL"]; + + this.WebmailBrowser.Navigate(new Uri(url, UriKind.Absolute)); + } + base.OnNavigatedTo(e); + } } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml index a1d44598..f75742c6 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml @@ -9,10 +9,37 @@ FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" - SupportedOrientations="Portrait" Orientation="Portrait" + SupportedOrientations="PortraitOrLandscape" Orientation="Portrait" mc:Ignorable="d" shell:SystemTray.IsVisible="True"> + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs index fb12527f..3a788d23 100644 --- a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs @@ -1,53 +1,85 @@ -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 Windows.UI.Input; - -namespace CampusAppWP8.Pages -{ - public partial class StartPage : PhoneApplicationPage - { - public StartPage() - { - InitializeComponent(); - } - - private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) - { - // Switch the placement of the buttons based on an orientation change. - if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) - { - OpenHoursAppButton.SetValue(Grid.RowProperty, 0); - OpenHoursAppButton.SetValue(Grid.ColumnProperty, 3); - - OSAAppButton.SetValue(Grid.RowProperty, 1); - OSAAppButton.SetValue(Grid.ColumnProperty, 3); - - LinkAppButton.SetValue(Grid.RowProperty, 2); - LinkAppButton.SetValue(Grid.ColumnProperty, 3); - ContentPanel.Margin = new Thickness(12, -24, 0, 0); - - } - // If not in portrait, move buttonList content to visible row and column. - else - { - OpenHoursAppButton.SetValue(Grid.RowProperty, 3); - OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0); - - OSAAppButton.SetValue(Grid.RowProperty, 3); - OSAAppButton.SetValue(Grid.ColumnProperty, 1); - - LinkAppButton.SetValue(Grid.RowProperty, 3); - LinkAppButton.SetValue(Grid.ColumnProperty, 2); - ContentPanel.Margin = new Thickness(12, 0, 0, 0); - - } - } - } +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 Windows.UI.Input; + +namespace CampusAppWP8.Pages +{ + public partial class StartPage : PhoneApplicationPage + { + public StartPage() + { + InitializeComponent(); + + if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible) + this.SetIconThemeToDark(); + } + + private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + { + // Switch the placement of the buttons based on an orientation change. + if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) + { + OpenHoursAppButton.SetValue(Grid.RowProperty, 0); + OpenHoursAppButton.SetValue(Grid.ColumnProperty, 3); + + OSAAppButton.SetValue(Grid.RowProperty, 1); + OSAAppButton.SetValue(Grid.ColumnProperty, 3); + + LinkAppButton.SetValue(Grid.RowProperty, 2); + LinkAppButton.SetValue(Grid.ColumnProperty, 3); + ContentPanel.Margin = new Thickness(12, -24, 0, 0); + + } + // If not in portrait, move buttonList content to visible row and column. + else + { + OpenHoursAppButton.SetValue(Grid.RowProperty, 3); + OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0); + + OSAAppButton.SetValue(Grid.RowProperty, 3); + OSAAppButton.SetValue(Grid.ColumnProperty, 1); + + LinkAppButton.SetValue(Grid.RowProperty, 3); + LinkAppButton.SetValue(Grid.ColumnProperty, 2); + ContentPanel.Margin = new Thickness(12, 0, 0, 0); + + } + } + + private void SetIconThemeToDark() + { + this.ImgLightCampus.Visibility = Visibility.Collapsed; + this.ImgLightDepartments.Visibility = Visibility.Collapsed; + this.ImgLightEvents.Visibility = Visibility.Collapsed; + this.ImgLightHomework.Visibility = Visibility.Collapsed; + this.ImgLightLectures.Visibility = Visibility.Collapsed; + this.ImgLightLink.Visibility = Visibility.Collapsed; + this.ImgLightMensa.Visibility = Visibility.Collapsed; + this.ImgLightNews.Visibility = Visibility.Collapsed; + this.ImgLightOpenhours.Visibility = Visibility.Collapsed; + this.ImgLightStudentcouncil.Visibility = Visibility.Collapsed; + this.ImgLightTimetable.Visibility = Visibility.Collapsed; + this.ImgLightWebmail.Visibility = Visibility.Collapsed; + + this.ImgDarkCampus.Visibility = Visibility.Visible; + this.ImgDarkDepartments.Visibility = Visibility.Visible; + this.ImgDarkEvents.Visibility = Visibility.Visible; + this.ImgDarkHomework.Visibility = Visibility.Visible; + this.ImgDarkLectures.Visibility = Visibility.Visible; + this.ImgDarkLink.Visibility = Visibility.Visible; + this.ImgDarkMensa.Visibility = Visibility.Visible; + this.ImgDarkNews.Visibility = Visibility.Visible; + this.ImgDarkOpenhours.Visibility = Visibility.Visible; + this.ImgDarkStudentcouncil.Visibility = Visibility.Visible; + this.ImgDarkTimetable.Visibility = Visibility.Visible; + this.ImgDarkWebmail.Visibility = Visibility.Visible; + } + } } \ No newline at end of file From d935b7c2d9194ad5efa76feb9c57e66bd0caa74e Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 11 Jun 2013 14:14:52 +0200 Subject: [PATCH 43/47] i18 to ResultDetailPage --- .../Pages/Lecture/ResultDetailPage.xaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml index b504341b..04b6ada9 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultDetailPage.xaml @@ -22,7 +22,7 @@ - + @@ -31,37 +31,37 @@ - + - + - + - + - + - + From a71a67cd062b45b7625cc7b2074698bc6e1f4130 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 11 Jun 2013 15:15:49 +0200 Subject: [PATCH 44/47] finish ResultPage --- .../Pages/Lecture/ResultPage.xaml | 44 +++--- .../Pages/Lecture/ResultPage.xaml.cs | 149 ++++++++++++++---- .../Resources/AppResources.Designer.cs | 53 ++++++- .../CampusAppWP8/Resources/AppResources.resx | 19 ++- 4 files changed, 208 insertions(+), 57 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml index a836dfba..187ffc38 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Lecture/ResultPage.xaml @@ -1,5 +1,5 @@  - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs index 3a788d23..d3eefb73 100644 --- a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml.cs @@ -1,85 +1,85 @@ -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 Windows.UI.Input; - -namespace CampusAppWP8.Pages -{ - public partial class StartPage : PhoneApplicationPage - { - public StartPage() - { - InitializeComponent(); - - if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible) - this.SetIconThemeToDark(); - } - - private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) - { - // Switch the placement of the buttons based on an orientation change. - if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) - { - OpenHoursAppButton.SetValue(Grid.RowProperty, 0); - OpenHoursAppButton.SetValue(Grid.ColumnProperty, 3); - - OSAAppButton.SetValue(Grid.RowProperty, 1); - OSAAppButton.SetValue(Grid.ColumnProperty, 3); - - LinkAppButton.SetValue(Grid.RowProperty, 2); - LinkAppButton.SetValue(Grid.ColumnProperty, 3); - ContentPanel.Margin = new Thickness(12, -24, 0, 0); - - } - // If not in portrait, move buttonList content to visible row and column. - else - { - OpenHoursAppButton.SetValue(Grid.RowProperty, 3); - OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0); - - OSAAppButton.SetValue(Grid.RowProperty, 3); - OSAAppButton.SetValue(Grid.ColumnProperty, 1); - - LinkAppButton.SetValue(Grid.RowProperty, 3); - LinkAppButton.SetValue(Grid.ColumnProperty, 2); - ContentPanel.Margin = new Thickness(12, 0, 0, 0); - - } - } - - private void SetIconThemeToDark() - { - this.ImgLightCampus.Visibility = Visibility.Collapsed; - this.ImgLightDepartments.Visibility = Visibility.Collapsed; - this.ImgLightEvents.Visibility = Visibility.Collapsed; - this.ImgLightHomework.Visibility = Visibility.Collapsed; - this.ImgLightLectures.Visibility = Visibility.Collapsed; - this.ImgLightLink.Visibility = Visibility.Collapsed; - this.ImgLightMensa.Visibility = Visibility.Collapsed; - this.ImgLightNews.Visibility = Visibility.Collapsed; - this.ImgLightOpenhours.Visibility = Visibility.Collapsed; - this.ImgLightStudentcouncil.Visibility = Visibility.Collapsed; - this.ImgLightTimetable.Visibility = Visibility.Collapsed; - this.ImgLightWebmail.Visibility = Visibility.Collapsed; - - this.ImgDarkCampus.Visibility = Visibility.Visible; - this.ImgDarkDepartments.Visibility = Visibility.Visible; - this.ImgDarkEvents.Visibility = Visibility.Visible; - this.ImgDarkHomework.Visibility = Visibility.Visible; - this.ImgDarkLectures.Visibility = Visibility.Visible; - this.ImgDarkLink.Visibility = Visibility.Visible; - this.ImgDarkMensa.Visibility = Visibility.Visible; - this.ImgDarkNews.Visibility = Visibility.Visible; - this.ImgDarkOpenhours.Visibility = Visibility.Visible; - this.ImgDarkStudentcouncil.Visibility = Visibility.Visible; - this.ImgDarkTimetable.Visibility = Visibility.Visible; - this.ImgDarkWebmail.Visibility = Visibility.Visible; - } - } +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 Windows.UI.Input; + +namespace CampusAppWP8.Pages +{ + public partial class StartPage : PhoneApplicationPage + { + public StartPage() + { + InitializeComponent(); + + if ((Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"] == Visibility.Visible) + this.SetIconThemeToDark(); + } + + private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + { + // Switch the placement of the buttons based on an orientation change. + if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) + { + OpenHoursAppButton.SetValue(Grid.RowProperty, 0); + OpenHoursAppButton.SetValue(Grid.ColumnProperty, 3); + + OSAAppButton.SetValue(Grid.RowProperty, 1); + OSAAppButton.SetValue(Grid.ColumnProperty, 3); + + LinkAppButton.SetValue(Grid.RowProperty, 2); + LinkAppButton.SetValue(Grid.ColumnProperty, 3); + ContentPanel.Margin = new Thickness(12, -24, 0, 0); + + } + // If not in portrait, move buttonList content to visible row and column. + else + { + OpenHoursAppButton.SetValue(Grid.RowProperty, 3); + OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0); + + OSAAppButton.SetValue(Grid.RowProperty, 3); + OSAAppButton.SetValue(Grid.ColumnProperty, 1); + + LinkAppButton.SetValue(Grid.RowProperty, 3); + LinkAppButton.SetValue(Grid.ColumnProperty, 2); + ContentPanel.Margin = new Thickness(12, 0, 0, 0); + + } + } + + private void SetIconThemeToDark() + { + this.ImgLightCampus.Visibility = Visibility.Collapsed; + this.ImgLightDepartments.Visibility = Visibility.Collapsed; + this.ImgLightEvents.Visibility = Visibility.Collapsed; + this.ImgLightHomework.Visibility = Visibility.Collapsed; + this.ImgLightLectures.Visibility = Visibility.Collapsed; + this.ImgLightLink.Visibility = Visibility.Collapsed; + this.ImgLightMensa.Visibility = Visibility.Collapsed; + this.ImgLightNews.Visibility = Visibility.Collapsed; + this.ImgLightOpenhours.Visibility = Visibility.Collapsed; + this.ImgLightStudentcouncil.Visibility = Visibility.Collapsed; + this.ImgLightTimetable.Visibility = Visibility.Collapsed; + this.ImgLightWebmail.Visibility = Visibility.Collapsed; + + this.ImgDarkCampus.Visibility = Visibility.Visible; + this.ImgDarkDepartments.Visibility = Visibility.Visible; + this.ImgDarkEvents.Visibility = Visibility.Visible; + this.ImgDarkHomework.Visibility = Visibility.Visible; + this.ImgDarkLectures.Visibility = Visibility.Visible; + this.ImgDarkLink.Visibility = Visibility.Visible; + this.ImgDarkMensa.Visibility = Visibility.Visible; + this.ImgDarkNews.Visibility = Visibility.Visible; + this.ImgDarkOpenhours.Visibility = Visibility.Visible; + this.ImgDarkStudentcouncil.Visibility = Visibility.Visible; + this.ImgDarkTimetable.Visibility = Visibility.Visible; + this.ImgDarkWebmail.Visibility = Visibility.Visible; + } + } } \ No newline at end of file From 70a8f7a266e73d6ea9a4fb935697d4a65a705dfb Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 11 Jun 2013 15:47:32 +0200 Subject: [PATCH 46/47] commit department --- CampusAppWP8/CampusAppWP8.sln | 76 +- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 564 ++++++------ .../CampusAppWP8/Properties/WMAppManifest.xml | 86 +- .../Resources/AppResources.Designer.cs | 846 +++++++++--------- .../CampusAppWP8/Resources/AppResources.resx | 482 +++++----- .../model/departments/ChairModel.cs | 180 ++-- .../model/departments/DepartmentModel.cs | 172 ++-- .../model/departments/DepartmentViewModel.cs | 78 +- .../model/departments/FacultyModel.cs | 124 +-- .../model/events_news/RSSChannelModel.cs | 98 +- .../model/events_news/RSSModel.cs | 406 ++++----- .../model/events_news/RSSViewModel.cs | 102 +-- .../pages/departments/DepartmentFeed.cs | 38 +- .../pages/departments/DepartmentPage.xaml | 122 +-- .../pages/departments/DepartmentPage.xaml.cs | 264 +++--- .../CampusAppWP8/pages/events/EventFeed.cs | 48 +- .../pages/events/EventIndexPage.xaml | 62 +- .../pages/events/EventIndexPage.xaml.cs | 212 ++--- .../CampusAppWP8/pages/events/EventPage.xaml | 98 +- .../pages/events/EventPage.xaml.cs | 214 ++--- .../CampusAppWP8/pages/news/NewsFeed.cs | 48 +- .../pages/news/NewsIndexPage.xaml | 64 +- .../pages/news/NewsIndexPage.xaml.cs | 214 ++--- .../CampusAppWP8/pages/news/NewsPage.xaml | 100 +-- .../CampusAppWP8/pages/news/NewsPage.xaml.cs | 214 ++--- CampusAppWP8/CampusAppWP8/utility/URLList.cs | 32 +- 26 files changed, 2472 insertions(+), 2472 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8.sln b/CampusAppWP8/CampusAppWP8.sln index 1be19652..6413a5ed 100644 --- a/CampusAppWP8/CampusAppWP8.sln +++ b/CampusAppWP8/CampusAppWP8.sln @@ -1,38 +1,38 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8", "CampusAppWP8\CampusAppWP8.csproj", "{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.ActiveCfg = Debug|ARM - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Build.0 = Debug|ARM - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Deploy.0 = Debug|ARM - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.ActiveCfg = Debug|x86 - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Build.0 = Debug|x86 - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Deploy.0 = Debug|x86 - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Build.0 = Release|Any CPU - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Deploy.0 = Release|Any CPU - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.ActiveCfg = Release|ARM - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Build.0 = Release|ARM - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Deploy.0 = Release|ARM - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.ActiveCfg = Release|x86 - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Build.0 = Release|x86 - {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Deploy.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8", "CampusAppWP8\CampusAppWP8.csproj", "{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.ActiveCfg = Debug|ARM + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Build.0 = Debug|ARM + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Deploy.0 = Debug|ARM + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.ActiveCfg = Debug|x86 + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Build.0 = Debug|x86 + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Deploy.0 = Debug|x86 + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Build.0 = Release|Any CPU + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Deploy.0 = Release|Any CPU + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.ActiveCfg = Release|ARM + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Build.0 = Release|ARM + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Deploy.0 = Release|ARM + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.ActiveCfg = Release|x86 + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Build.0 = Release|x86 + {120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 40d62a03..7b7fe18c 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -1,283 +1,283 @@ - - - - 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 - - - - MainPage.xaml - - - - - - - - - - - CampusMapPage.xaml - - - - DepartmentPage.xaml - - - - EventIndexPage.xaml - - - EventPage.xaml - - - LecturePage.xaml - - - - - - MensaPage.xaml - - - - NewsIndexPage.xaml - - - NewsPage.xaml - - - - StartPage.xaml - - - WebmailPage.xaml - - - - True - True - AppResources.resx - - - True - True - Constants.resx - - - - - - - - - - - - - Designer - MSBuild:Compile - - - MSBuild:MarkupCompilePass1 - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - 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 - - - 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 + + + + MainPage.xaml + + + + + + + + + + + CampusMapPage.xaml + + + + DepartmentPage.xaml + + + + EventIndexPage.xaml + + + EventPage.xaml + + + LecturePage.xaml + + + + + + MensaPage.xaml + + + + NewsIndexPage.xaml + + + NewsPage.xaml + + + + StartPage.xaml + + + WebmailPage.xaml + + + + True + True + AppResources.resx + + + True + True + Constants.resx + + + + + + + + + + + + + Designer + MSBuild:Compile + + + MSBuild:MarkupCompilePass1 + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + 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 + + + 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/Properties/WMAppManifest.xml b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml index cd51949e..16bab57b 100644 --- a/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml +++ b/CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml @@ -1,44 +1,44 @@ - - - - - Assets\ApplicationIcon.png - - - - - - - - - - - - - - - - Assets\Tiles\FlipCycleTileSmall.png - 0 - Assets\Tiles\FlipCycleTileMedium.png - CampusAppWP8 - - - - - - - - - - - - - - - - - - - + + + + + Assets\ApplicationIcon.png + + + + + + + + + + + + + + + + Assets\Tiles\FlipCycleTileSmall.png + 0 + Assets\Tiles\FlipCycleTileMedium.png + CampusAppWP8 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs index 8ae30501..21b5c85d 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs @@ -1,423 +1,423 @@ -//------------------------------------------------------------------------------ -// -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.18046 -// -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. -// -//------------------------------------------------------------------------------ - -namespace CampusAppWP8.Resources { - using System; - - - /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class AppResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal AppResources() { - } - - /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWP8.Resources.AppResources", typeof(AppResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Hinzufügen ähnelt. - /// - public static string AppBarButtonText { - get { - return ResourceManager.GetString("AppBarButtonText", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Menübefehl ähnelt. - /// - public static string AppBarMenuItemText { - get { - return ResourceManager.GetString("AppBarMenuItemText", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die BTU CampusApp ähnelt. - /// - public static string ApplicationTitle { - get { - return ResourceManager.GetString("ApplicationTitle", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt. - /// - public static string CampusMapApp_Title { - get { - return ResourceManager.GetString("CampusMapApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt. - /// - public static string DepartmentApp_Title { - get { - return ResourceManager.GetString("DepartmentApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Events ähnelt. - /// - public static string EventApp_Title { - get { - return ResourceManager.GetString("EventApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Fakultät ähnelt. - /// - public static string Faculty { - get { - return ResourceManager.GetString("Faculty", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Hausaufgaben ähnelt. - /// - public static string HomeworkApp_Title { - get { - return ResourceManager.GetString("HomeworkApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt. - /// - public static string LectureApp_Course { - get { - return ResourceManager.GetString("LectureApp_Course", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Abschluss ähnelt. - /// - public static string LectureApp_Degree { - get { - return ResourceManager.GetString("LectureApp_Degree", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Vorlesungsname ähnelt. - /// - public static string LectureApp_LectureName { - get { - return ResourceManager.GetString("LectureApp_LectureName", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Semester ähnelt. - /// - public static string LectureApp_Semester { - get { - return ResourceManager.GetString("LectureApp_Semester", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Fachsemester ähnelt. - /// - public static string LectureApp_Term { - get { - return ResourceManager.GetString("LectureApp_Term", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Vorlesung ähnelt. - /// - public static string LectureApp_Title { - get { - return ResourceManager.GetString("LectureApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Links ähnelt. - /// - public static string LinkApp_Title { - get { - return ResourceManager.GetString("LinkApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Webmail ähnelt. - /// - public static string MailApp_Title { - get { - return ResourceManager.GetString("MailApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Aktion ähnelt. - /// - public static string MensaApp_Action { - get { - return ResourceManager.GetString("MensaApp_Action", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Bio ähnelt. - /// - public static string MensaApp_Bio { - get { - return ResourceManager.GetString("MensaApp_Bio", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Essen 1 ähnelt. - /// - public static string MensaApp_Dinner1 { - get { - return ResourceManager.GetString("MensaApp_Dinner1", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt. - /// - public static string MensaApp_Dinner2 { - get { - return ResourceManager.GetString("MensaApp_Dinner2", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt. - /// - public static string MensaApp_Dinner3 { - get { - return ResourceManager.GetString("MensaApp_Dinner3", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Essen 4 ähnelt. - /// - public static string MensaApp_Dinner4 { - get { - return ResourceManager.GetString("MensaApp_Dinner4", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Heute nicht im Angbot ähnelt. - /// - public static string MensaApp_NotToday { - get { - return ResourceManager.GetString("MensaApp_NotToday", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Mensaplan ähnelt. - /// - public static string MensaApp_Title { - get { - return ResourceManager.GetString("MensaApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die News ähnelt. - /// - public static string NewsApp_Title { - get { - return ResourceManager.GetString("NewsApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die zur Übersicht ähnelt. - /// - public static string NewsHomeBtn { - get { - return ResourceManager.GetString("NewsHomeBtn", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Link ähnelt. - /// - public static string NewsLinkBtn { - get { - return ResourceManager.GetString("NewsLinkBtn", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Öffnungszeiten ähnelt. - /// - public static string OpenHoursApp_Title { - get { - return ResourceManager.GetString("OpenHoursApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Fachschaften ähnelt. - /// - public static string OSAApp_Title { - get { - return ResourceManager.GetString("OSAApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt. - /// - public static string Professorship_chairs { - get { - return ResourceManager.GetString("Professorship_chairs", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt. - /// - public static string ResourceFlowDirection { - get { - return ResourceManager.GetString("ResourceFlowDirection", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die de-de ähnelt. - /// - public static string ResourceLanguage { - get { - return ResourceManager.GetString("ResourceLanguage", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Beispielwert für die Laufzeiteigenschaft ähnelt. - /// - public static string SampleProperty { - get { - return ResourceManager.GetString("SampleProperty", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Freitag ähnelt. - /// - public static string Time_Day_Friday { - get { - return ResourceManager.GetString("Time_Day_Friday", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Montag ähnelt. - /// - public static string Time_Day_Monday { - get { - return ResourceManager.GetString("Time_Day_Monday", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Donnerstag ähnelt. - /// - public static string Time_Day_Thursday { - get { - return ResourceManager.GetString("Time_Day_Thursday", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Dienstag ähnelt. - /// - public static string Time_Day_Tuesday { - get { - return ResourceManager.GetString("Time_Day_Tuesday", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Mittwoch ähnelt. - /// - public static string Time_Day_Wednesday { - get { - return ResourceManager.GetString("Time_Day_Wednesday", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Stundenplan ähnelt. - /// - public static string TimeTableApp_Title { - get { - return ResourceManager.GetString("TimeTableApp_Title", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Willkommen zur BTU-CampusApp WP8 ähnelt. - /// - public static string WelcomeString { - get { - return ResourceManager.GetString("WelcomeString", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.18046 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace CampusAppWP8.Resources { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class AppResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AppResources() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CampusAppWP8.Resources.AppResources", typeof(AppResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hinzufügen ähnelt. + /// + public static string AppBarButtonText { + get { + return ResourceManager.GetString("AppBarButtonText", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Menübefehl ähnelt. + /// + public static string AppBarMenuItemText { + get { + return ResourceManager.GetString("AppBarMenuItemText", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die BTU CampusApp ähnelt. + /// + public static string ApplicationTitle { + get { + return ResourceManager.GetString("ApplicationTitle", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Campusplan ähnelt. + /// + public static string CampusMapApp_Title { + get { + return ResourceManager.GetString("CampusMapApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt. + /// + public static string DepartmentApp_Title { + get { + return ResourceManager.GetString("DepartmentApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Events ähnelt. + /// + public static string EventApp_Title { + get { + return ResourceManager.GetString("EventApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Fakultät ähnelt. + /// + public static string Faculty { + get { + return ResourceManager.GetString("Faculty", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hausaufgaben ähnelt. + /// + public static string HomeworkApp_Title { + get { + return ResourceManager.GetString("HomeworkApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt. + /// + public static string LectureApp_Course { + get { + return ResourceManager.GetString("LectureApp_Course", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Abschluss ähnelt. + /// + public static string LectureApp_Degree { + get { + return ResourceManager.GetString("LectureApp_Degree", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Vorlesungsname ähnelt. + /// + public static string LectureApp_LectureName { + get { + return ResourceManager.GetString("LectureApp_LectureName", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Semester ähnelt. + /// + public static string LectureApp_Semester { + get { + return ResourceManager.GetString("LectureApp_Semester", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Fachsemester ähnelt. + /// + public static string LectureApp_Term { + get { + return ResourceManager.GetString("LectureApp_Term", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Vorlesung ähnelt. + /// + public static string LectureApp_Title { + get { + return ResourceManager.GetString("LectureApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Links ähnelt. + /// + public static string LinkApp_Title { + get { + return ResourceManager.GetString("LinkApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Webmail ähnelt. + /// + public static string MailApp_Title { + get { + return ResourceManager.GetString("MailApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Aktion ähnelt. + /// + public static string MensaApp_Action { + get { + return ResourceManager.GetString("MensaApp_Action", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Bio ähnelt. + /// + public static string MensaApp_Bio { + get { + return ResourceManager.GetString("MensaApp_Bio", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Essen 1 ähnelt. + /// + public static string MensaApp_Dinner1 { + get { + return ResourceManager.GetString("MensaApp_Dinner1", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt. + /// + public static string MensaApp_Dinner2 { + get { + return ResourceManager.GetString("MensaApp_Dinner2", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Essen 2 ähnelt. + /// + public static string MensaApp_Dinner3 { + get { + return ResourceManager.GetString("MensaApp_Dinner3", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Essen 4 ähnelt. + /// + public static string MensaApp_Dinner4 { + get { + return ResourceManager.GetString("MensaApp_Dinner4", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Heute nicht im Angbot ähnelt. + /// + public static string MensaApp_NotToday { + get { + return ResourceManager.GetString("MensaApp_NotToday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Mensaplan ähnelt. + /// + public static string MensaApp_Title { + get { + return ResourceManager.GetString("MensaApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die News ähnelt. + /// + public static string NewsApp_Title { + get { + return ResourceManager.GetString("NewsApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die zur Übersicht ähnelt. + /// + public static string NewsHomeBtn { + get { + return ResourceManager.GetString("NewsHomeBtn", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Link ähnelt. + /// + public static string NewsLinkBtn { + get { + return ResourceManager.GetString("NewsLinkBtn", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Öffnungszeiten ähnelt. + /// + public static string OpenHoursApp_Title { + get { + return ResourceManager.GetString("OpenHoursApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Fachschaften ähnelt. + /// + public static string OSAApp_Title { + get { + return ResourceManager.GetString("OSAApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Lehrstühle ähnelt. + /// + public static string Professorship_chairs { + get { + return ResourceManager.GetString("Professorship_chairs", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die LeftToRight ähnelt. + /// + public static string ResourceFlowDirection { + get { + return ResourceManager.GetString("ResourceFlowDirection", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die de-de ähnelt. + /// + public static string ResourceLanguage { + get { + return ResourceManager.GetString("ResourceLanguage", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Beispielwert für die Laufzeiteigenschaft ähnelt. + /// + public static string SampleProperty { + get { + return ResourceManager.GetString("SampleProperty", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Freitag ähnelt. + /// + public static string Time_Day_Friday { + get { + return ResourceManager.GetString("Time_Day_Friday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Montag ähnelt. + /// + public static string Time_Day_Monday { + get { + return ResourceManager.GetString("Time_Day_Monday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Donnerstag ähnelt. + /// + public static string Time_Day_Thursday { + get { + return ResourceManager.GetString("Time_Day_Thursday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Dienstag ähnelt. + /// + public static string Time_Day_Tuesday { + get { + return ResourceManager.GetString("Time_Day_Tuesday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Mittwoch ähnelt. + /// + public static string Time_Day_Wednesday { + get { + return ResourceManager.GetString("Time_Day_Wednesday", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Stundenplan ähnelt. + /// + public static string TimeTableApp_Title { + get { + return ResourceManager.GetString("TimeTableApp_Title", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Willkommen zur BTU-CampusApp WP8 ähnelt. + /// + public static string WelcomeString { + get { + return ResourceManager.GetString("WelcomeString", resourceCulture); + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx index a8be2df5..c55ad9a1 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx @@ -1,242 +1,242 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - LeftToRight - Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language - - - de-de - Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language. - - - BTU CampusApp - - - Beispielwert für die Laufzeiteigenschaft - - - Hinzufügen - - - Menübefehl - - - Willkommen zur BTU-CampusApp WP8 - - - Campusplan - - - Lehrstühle - - - Events - - - Hausaufgaben - - - Vorlesung - - - Links - - - Webmail - - - Mensaplan - - - News - - - Öffnungszeiten - - - Fachschaften - - - Stundenplan - - - Studiengang - - - Abschluss - - - Vorlesungsname - - - Semester - - - Fachsemester - - - Freitag - - - Montag - - - Donnerstag - - - Dienstag - - - Mittwoch - - - Aktion - - - Bio - - - Essen 1 - - - Essen 2 - - - Essen 2 - - - Essen 4 - - - Heute nicht im Angbot - - - zur Übersicht - - - Fakultät - - - Lehrstühle - - - Link - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + LeftToRight + Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language + + + de-de + Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language. + + + BTU CampusApp + + + Beispielwert für die Laufzeiteigenschaft + + + Hinzufügen + + + Menübefehl + + + Willkommen zur BTU-CampusApp WP8 + + + Campusplan + + + Lehrstühle + + + Events + + + Hausaufgaben + + + Vorlesung + + + Links + + + Webmail + + + Mensaplan + + + News + + + Öffnungszeiten + + + Fachschaften + + + Stundenplan + + + Studiengang + + + Abschluss + + + Vorlesungsname + + + Semester + + + Fachsemester + + + Freitag + + + Montag + + + Donnerstag + + + Dienstag + + + Mittwoch + + + Aktion + + + Bio + + + Essen 1 + + + Essen 2 + + + Essen 2 + + + Essen 4 + + + Heute nicht im Angbot + + + zur Übersicht + + + Fakultät + + + Lehrstühle + + + Link + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs index c8935ab5..5c136dfa 100644 --- a/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs @@ -1,90 +1,90 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml.Serialization; - -namespace CampusAppWP8.model.departments -{ - /// - /// Class to hold information about a professorship chair. - /// - public class ChairModel : BaseModel - { - private string name_de; // german name of the chair - private string url; // link-url to the chair homepage - private string name_en; // english name of the chair - - /// - /// Default Constructor. Set every class variable to default value. - /// - public ChairModel() - { - this.name_de = String.Empty; - this.name_en = String.Empty; - this.url = String.Empty; - } - - /// - /// Constructor. Set the german and english name. - /// - /// Name of the professorship chair. - public ChairModel(string name) - { - this.name_de = name; - this.name_en = name; - this.url = String.Empty; - } - - /// - /// Set or return the german name of the chair. - /// - [XmlAttribute("name_de")] - public string Name_DE - { - get { return this.name_de; } - set - { - if (value != this.name_de) - { - this.name_de = value; - NotifyPropertyChanged("chair"); - } - } - } - - /// - /// Set or return the english name of the chair. - /// - [XmlAttribute("name_en")] - public string Name_EN - { - get { return this.name_en; } - set - { - if (value != this.name_en) - { - this.name_en = value; - NotifyPropertyChanged("chair"); - } - } - } - - /// - /// Set or return the url of the chair homepage. - /// - [XmlAttribute("url")] - public string Url - { - get { return this.url; } - set - { - if (value != this.url) - { - this.url = value; - NotifyPropertyChanged("chair"); - } - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml.Serialization; + +namespace CampusAppWP8.model.departments +{ + /// + /// Class to hold information about a professorship chair. + /// + public class ChairModel : BaseModel + { + private string name_de; // german name of the chair + private string url; // link-url to the chair homepage + private string name_en; // english name of the chair + + /// + /// Default Constructor. Set every class variable to default value. + /// + public ChairModel() + { + this.name_de = String.Empty; + this.name_en = String.Empty; + this.url = String.Empty; + } + + /// + /// Constructor. Set the german and english name. + /// + /// Name of the professorship chair. + public ChairModel(string name) + { + this.name_de = name; + this.name_en = name; + this.url = String.Empty; + } + + /// + /// Set or return the german name of the chair. + /// + [XmlAttribute("name_de")] + public string Name_DE + { + get { return this.name_de; } + set + { + if (value != this.name_de) + { + this.name_de = value; + NotifyPropertyChanged("chair"); + } + } + } + + /// + /// Set or return the english name of the chair. + /// + [XmlAttribute("name_en")] + public string Name_EN + { + get { return this.name_en; } + set + { + if (value != this.name_en) + { + this.name_en = value; + NotifyPropertyChanged("chair"); + } + } + } + + /// + /// Set or return the url of the chair homepage. + /// + [XmlAttribute("url")] + public string Url + { + get { return this.url; } + set + { + if (value != this.url) + { + this.url = value; + NotifyPropertyChanged("chair"); + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs index c18eaa64..e178c47f 100644 --- a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs @@ -1,86 +1,86 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Windows; -using System.Xml.Serialization; - -namespace CampusAppWP8.model.departments -{ - public class DepartmentModel : BaseModel - { - [XmlElement("chair")] - public ObservableCollection _chairs { get; set; } - - private string _name = "d_mod"; - private Visibility visible; - - public DepartmentModel() - { - this.visible = Visibility.Collapsed; - this.Chairs = new ObservableCollection(); - //this.LoadData(); - } - - public DepartmentModel(string name) - { - this.visible = Visibility.Collapsed; - _name = name; - this.Chairs = new ObservableCollection(); - //this.LoadData(); - } - - public void LoadData() - { - this.Chairs.Add(new ChairModel("LS 1")); - this.Chairs.Add(new ChairModel("LS 2")); - this.Chairs.Add(new ChairModel("LS 3")); - this.Chairs.Add(new ChairModel("LS 4")); - } - - public ObservableCollection Chairs - { - get - { - return _chairs; - } - set - { - if (value != _chairs) - { - _chairs = value; - NotifyPropertyChanged("department"); - } - } - } - - public string Name - { - get - { - return _name; - } - set - { - if (value != _name) - { - _name = value; - NotifyPropertyChanged("chair"); - } - } - } - - public Visibility Visible - { - get { return this.visible; } - set - { - if (value != this.visible) - { - this.visible = value; - } - } - } - } -} +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Windows; +using System.Xml.Serialization; + +namespace CampusAppWP8.model.departments +{ + public class DepartmentModel : BaseModel + { + [XmlElement("chair")] + public ObservableCollection _chairs { get; set; } + + private string _name = "d_mod"; + private Visibility visible; + + public DepartmentModel() + { + this.visible = Visibility.Collapsed; + this.Chairs = new ObservableCollection(); + //this.LoadData(); + } + + public DepartmentModel(string name) + { + this.visible = Visibility.Collapsed; + _name = name; + this.Chairs = new ObservableCollection(); + //this.LoadData(); + } + + public void LoadData() + { + this.Chairs.Add(new ChairModel("LS 1")); + this.Chairs.Add(new ChairModel("LS 2")); + this.Chairs.Add(new ChairModel("LS 3")); + this.Chairs.Add(new ChairModel("LS 4")); + } + + public ObservableCollection Chairs + { + get + { + return _chairs; + } + set + { + if (value != _chairs) + { + _chairs = value; + NotifyPropertyChanged("department"); + } + } + } + + public string Name + { + get + { + return _name; + } + set + { + if (value != _name) + { + _name = value; + NotifyPropertyChanged("chair"); + } + } + } + + public Visibility Visible + { + get { return this.visible; } + set + { + if (value != this.visible) + { + this.visible = value; + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs index d9d242b0..6d407811 100644 --- a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs @@ -1,39 +1,39 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Serialization; - -namespace CampusAppWP8.model.departments -{ - [XmlRoot("root")] - public class DepartmentViewModel : BaseViewModel - { - [XmlArray("professorships")] - [XmlArrayItem("faculty")] - public ObservableCollection _faculties { get; set; } - - public DepartmentViewModel() - { - this.Faculties = new ObservableCollection(); - } - - public ObservableCollection Faculties - { - get - { - return _faculties; - } - set - { - if (value != _faculties) - { - _faculties = value; - NotifyPropertyChanged("foodDays"); - } - } - } - } -} +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace CampusAppWP8.model.departments +{ + [XmlRoot("root")] + public class DepartmentViewModel : BaseViewModel + { + [XmlArray("professorships")] + [XmlArrayItem("faculty")] + public ObservableCollection _faculties { get; set; } + + public DepartmentViewModel() + { + this.Faculties = new ObservableCollection(); + } + + public ObservableCollection Faculties + { + get + { + return _faculties; + } + set + { + if (value != _faculties) + { + _faculties = value; + NotifyPropertyChanged("foodDays"); + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs index c3133b3f..424b8fdb 100644 --- a/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs @@ -1,62 +1,62 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Xml.Serialization; -using CampusAppWP8.Resources; - -namespace CampusAppWP8.model.departments -{ - public class FacultyModel : BaseModel - { - [XmlElement("chair")] - public ObservableCollection chairs { get; set; } - //public ObservableCollection _faculties { get; set; } - - private string name = "t_fak"; - - public FacultyModel() - { - //this.Faculties = new ObservableCollection(); - this.chairs = new ObservableCollection(); - } - - public FacultyModel(string name) - { - this.name = name; - //this.Faculties = new ObservableCollection(); - this.chairs = new ObservableCollection(); - } - - public ObservableCollection Chairs - { - get { return this.chairs; } - set - { - if (value != this.chairs) - { - this.chairs = value; - NotifyPropertyChanged("faculty"); - } - } - } - - [XmlAttribute("id")] - public string Name - { - get - { - return AppResources.Faculty + " " + this.name; - } - set - { - if (value != this.name) - { - this.name = value; - NotifyPropertyChanged("faculty"); - } - } - } - } -} +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Xml.Serialization; +using CampusAppWP8.Resources; + +namespace CampusAppWP8.model.departments +{ + public class FacultyModel : BaseModel + { + [XmlElement("chair")] + public ObservableCollection chairs { get; set; } + //public ObservableCollection _faculties { get; set; } + + private string name = "t_fak"; + + public FacultyModel() + { + //this.Faculties = new ObservableCollection(); + this.chairs = new ObservableCollection(); + } + + public FacultyModel(string name) + { + this.name = name; + //this.Faculties = new ObservableCollection(); + this.chairs = new ObservableCollection(); + } + + public ObservableCollection Chairs + { + get { return this.chairs; } + set + { + if (value != this.chairs) + { + this.chairs = value; + NotifyPropertyChanged("faculty"); + } + } + } + + [XmlAttribute("id")] + public string Name + { + get + { + return AppResources.Faculty + " " + this.name; + } + set + { + if (value != this.name) + { + this.name = value; + NotifyPropertyChanged("faculty"); + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/events_news/RSSChannelModel.cs b/CampusAppWP8/CampusAppWP8/model/events_news/RSSChannelModel.cs index f9d4d42d..0198bcf0 100644 --- a/CampusAppWP8/CampusAppWP8/model/events_news/RSSChannelModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/events_news/RSSChannelModel.cs @@ -1,49 +1,49 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Serialization; -using System.Collections.ObjectModel; - -namespace CampusAppWP8.model.events_news -{ - /// - /// Channel Model, which contains the rss feed item list. - /// - public class RSSChannelModel : BaseModel - { - /// - /// RssFeed information item list. - /// - [XmlElement("item")] - public ObservableCollection item { get; set; } - - /// - /// Default constructor. - /// - public RSSChannelModel() - { - this.item = new ObservableCollection(); - } - - /// - /// Set/Get the rss feed item list. - /// - public ObservableCollection Item - { - get - { - return this.item; - } - set - { - if (value != this.item) - { - this.item = value; - NotifyPropertyChanged("item"); - } - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; +using System.Collections.ObjectModel; + +namespace CampusAppWP8.model.events_news +{ + /// + /// Channel Model, which contains the rss feed item list. + /// + public class RSSChannelModel : BaseModel + { + /// + /// RssFeed information item list. + /// + [XmlElement("item")] + public ObservableCollection item { get; set; } + + /// + /// Default constructor. + /// + public RSSChannelModel() + { + this.item = new ObservableCollection(); + } + + /// + /// Set/Get the rss feed item list. + /// + public ObservableCollection Item + { + get + { + return this.item; + } + set + { + if (value != this.item) + { + this.item = value; + NotifyPropertyChanged("item"); + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/events_news/RSSModel.cs b/CampusAppWP8/CampusAppWP8/model/events_news/RSSModel.cs index 6da3af44..13f34ab8 100644 --- a/CampusAppWP8/CampusAppWP8/model/events_news/RSSModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/events_news/RSSModel.cs @@ -1,203 +1,203 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Serialization; - -namespace CampusAppWP8.model.events_news -{ - /// - /// Contains the rss feed informations. - /// - public class RSSModel : BaseModel - { - /// - /// Title of the fees - /// - private string title; - /// - /// Description text of the feed. - /// - private string text; - /// - /// Timestamp (publication date) of the event or news. - /// - private DateTime timestamp; - /// - /// Url of the feed. - /// - private string link; - - /// - /// Set/Get the title of the feed. - /// - [XmlElement("title")] - public string Title - { - get { return this.title; } - set - { - if (this.title != value) - { - this.title = value; - NotifyPropertyChanged("rss"); - } - } - } - - /// - /// Set/Get the text of the feed. - /// - [XmlElement("description")] - public string Text - { - get { return this.text; } - set - { - if (this.text != HTMLUnicodeToString(value)) - { - this.text = HTMLUnicodeToString(value); - NotifyPropertyChanged("rss"); - } - } - } - - /// - /// Set/Get the timestamp of the feed as string. - /// - [XmlElement("pubDate")] - public string Timestamp - { - get { return this.timestamp.ToString("R"); } - set - { - if (this.timestamp != DateTime.Parse(value)) - { - this.timestamp = DateTime.Parse(value); - NotifyPropertyChanged("rss"); - } - } - } - - /// - /// Set/Get the timestamp of the feed as DateTime object. - /// - public DateTime DTTimestamp - { - get { return this.timestamp; } - set { this.timestamp = value; } - } - - /// - /// Return the date of the timestamp as string. - /// example: Mon, 25.06.2013. - /// - public string Date - { - get { return String.Format("{0:ddd, dd.MM.yyyy}", this.timestamp); } - } - - /// - /// Return the time of the timestamp as string. - /// example: 12:56 Uhr. - /// - public string Time - { - get { return String.Format("{0:h:mm} Uhr", this.timestamp); } - } - - /// - /// Set/Get the link/url of the feed. - /// - [XmlElement("link")] - public string Link - { - get { return this.link; } - set - { - if (this.link != value) - { - this.link = value; - NotifyPropertyChanged("rss"); - } - } - } - - /// - /// Remove or transform html-unicode specific tags into ascii. - /// - /// html string - /// ascii string - private string HTMLUnicodeToString(string htmluni) - { - StringBuilder retValue = new StringBuilder(); - - for(int i = 0; i < htmluni.Length; i++) - { - switch (htmluni[i]) - { - // beginning tag of the unicode - case '&': - { - int startOff = i + 2; - // sear closing tag of the unicode - int endOff = htmluni.IndexOf(';', startOff); - // get and parse value inbetween - string sub = htmluni.Substring(startOff, endOff - startOff); - int cVal = int.Parse(sub); - - switch (cVal) - { - // if the unicode value is 128 (€) - case 128: - retValue.Append('€'); - break; - - default: - retValue.Append((char)cVal); - break; - } - - // set the current index to the end of the unicode tag - i = endOff; - } - break; - case '<': - { - // ignoring <..> html tags - i = htmluni.IndexOf('>', i); - } - break; - case '\t': - // removing tabs - break; - - default: - { - // adding other characters to the return string - retValue.Append(htmluni[i]); - } - break; - } - } - - return retValue.ToString(); - } - - /// - /// Comparing function for Datetime-Timestamps. - /// (currently unused) - /// - /// first item - /// secound item - /// - public static int CompareTimeStamp(RSSModel item1, RSSModel item2) - { - if (item1.DTTimestamp > item2.DTTimestamp) - return -1; - else - return 0; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace CampusAppWP8.model.events_news +{ + /// + /// Contains the rss feed informations. + /// + public class RSSModel : BaseModel + { + /// + /// Title of the fees + /// + private string title; + /// + /// Description text of the feed. + /// + private string text; + /// + /// Timestamp (publication date) of the event or news. + /// + private DateTime timestamp; + /// + /// Url of the feed. + /// + private string link; + + /// + /// Set/Get the title of the feed. + /// + [XmlElement("title")] + public string Title + { + get { return this.title; } + set + { + if (this.title != value) + { + this.title = value; + NotifyPropertyChanged("rss"); + } + } + } + + /// + /// Set/Get the text of the feed. + /// + [XmlElement("description")] + public string Text + { + get { return this.text; } + set + { + if (this.text != HTMLUnicodeToString(value)) + { + this.text = HTMLUnicodeToString(value); + NotifyPropertyChanged("rss"); + } + } + } + + /// + /// Set/Get the timestamp of the feed as string. + /// + [XmlElement("pubDate")] + public string Timestamp + { + get { return this.timestamp.ToString("R"); } + set + { + if (this.timestamp != DateTime.Parse(value)) + { + this.timestamp = DateTime.Parse(value); + NotifyPropertyChanged("rss"); + } + } + } + + /// + /// Set/Get the timestamp of the feed as DateTime object. + /// + public DateTime DTTimestamp + { + get { return this.timestamp; } + set { this.timestamp = value; } + } + + /// + /// Return the date of the timestamp as string. + /// example: Mon, 25.06.2013. + /// + public string Date + { + get { return String.Format("{0:ddd, dd.MM.yyyy}", this.timestamp); } + } + + /// + /// Return the time of the timestamp as string. + /// example: 12:56 Uhr. + /// + public string Time + { + get { return String.Format("{0:h:mm} Uhr", this.timestamp); } + } + + /// + /// Set/Get the link/url of the feed. + /// + [XmlElement("link")] + public string Link + { + get { return this.link; } + set + { + if (this.link != value) + { + this.link = value; + NotifyPropertyChanged("rss"); + } + } + } + + /// + /// Remove or transform html-unicode specific tags into ascii. + /// + /// html string + /// ascii string + private string HTMLUnicodeToString(string htmluni) + { + StringBuilder retValue = new StringBuilder(); + + for(int i = 0; i < htmluni.Length; i++) + { + switch (htmluni[i]) + { + // beginning tag of the unicode + case '&': + { + int startOff = i + 2; + // sear closing tag of the unicode + int endOff = htmluni.IndexOf(';', startOff); + // get and parse value inbetween + string sub = htmluni.Substring(startOff, endOff - startOff); + int cVal = int.Parse(sub); + + switch (cVal) + { + // if the unicode value is 128 (€) + case 128: + retValue.Append('€'); + break; + + default: + retValue.Append((char)cVal); + break; + } + + // set the current index to the end of the unicode tag + i = endOff; + } + break; + case '<': + { + // ignoring <..> html tags + i = htmluni.IndexOf('>', i); + } + break; + case '\t': + // removing tabs + break; + + default: + { + // adding other characters to the return string + retValue.Append(htmluni[i]); + } + break; + } + } + + return retValue.ToString(); + } + + /// + /// Comparing function for Datetime-Timestamps. + /// (currently unused) + /// + /// first item + /// secound item + /// + public static int CompareTimeStamp(RSSModel item1, RSSModel item2) + { + if (item1.DTTimestamp > item2.DTTimestamp) + return -1; + else + return 0; + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/events_news/RSSViewModel.cs b/CampusAppWP8/CampusAppWP8/model/events_news/RSSViewModel.cs index 9df6b26f..3293adba 100644 --- a/CampusAppWP8/CampusAppWP8/model/events_news/RSSViewModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/events_news/RSSViewModel.cs @@ -1,51 +1,51 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Serialization; - -namespace CampusAppWP8.model.events_news -{ - /// - /// ViewModel of the rss feed, containing the feed/channel object. - /// - [XmlRoot("root")] - public class RSSViewModel : BaseViewModel - { - /// - /// channel list for the rss feeds. - /// - [XmlArray("rss")] - [XmlArrayItem("channel")] - public ObservableCollection channel { get; set; } - - /// - /// Default constructor. - /// - public RSSViewModel() - { - this.channel = new ObservableCollection(); - } - - /// - /// Set/Get the channel list. - /// - public ObservableCollection Channel - { - get - { - return this.channel; - } - set - { - if (value != this.channel) - { - this.channel = value; - NotifyPropertyChanged("channel"); - } - } - } - } -} +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace CampusAppWP8.model.events_news +{ + /// + /// ViewModel of the rss feed, containing the feed/channel object. + /// + [XmlRoot("root")] + public class RSSViewModel : BaseViewModel + { + /// + /// channel list for the rss feeds. + /// + [XmlArray("rss")] + [XmlArrayItem("channel")] + public ObservableCollection channel { get; set; } + + /// + /// Default constructor. + /// + public RSSViewModel() + { + this.channel = new ObservableCollection(); + } + + /// + /// Set/Get the channel list. + /// + public ObservableCollection Channel + { + get + { + return this.channel; + } + set + { + if (value != this.channel) + { + this.channel = value; + NotifyPropertyChanged("channel"); + } + } + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentFeed.cs b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentFeed.cs index 4bca4589..94bcbf5b 100644 --- a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentFeed.cs +++ b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentFeed.cs @@ -1,19 +1,19 @@ -using CampusAppWP8.model.departments; -using CampusAppWP8.utility; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CampusAppWP8.pages.departments -{ - class DepartmentFeed : XMLFeed - { - public DepartmentFeed() : base(URLList.DepartmentFeedURL, "DepartmentFeed.xml") - { - - } - public System.Collections.ObjectModel.ObservableCollection _faculties { get; set; } - } -} +using CampusAppWP8.model.departments; +using CampusAppWP8.utility; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CampusAppWP8.pages.departments +{ + class DepartmentFeed : XMLFeed + { + public DepartmentFeed() : base(URLList.DepartmentFeedURL, "DepartmentFeed.xml") + { + + } + public System.Collections.ObjectModel.ObservableCollection _faculties { get; set; } + } +} diff --git a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml index ccf1ad55..a0387e3e 100644 --- a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml @@ -1,62 +1,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs index 06c25d35..44bda04e 100644 --- a/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/departments/DepartmentPage.xaml.cs @@ -1,133 +1,133 @@ -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.utility; -using CampusAppWP8.model.departments; -using Microsoft.Phone.Tasks; - - -namespace CampusAppWP8.pages.departments -{ - /// - /// Pivot page with list of the chairs of the facultis. - /// - public partial class DepartmentPage : PhoneApplicationPage - { - /// - /// Stores the last visible department panel. - /// - private UIElement lastVisibleUIElem = null; - /// - /// department/chair feed object, storing the model and data. - /// - private DepartmentFeed feed { get; set; } - - /// - /// Default constructor. - /// - public DepartmentPage() - { - InitializeComponent(); - // init feed object - this.feed = new DepartmentFeed(); - } - - /// - /// On naviagtion to this page. - /// Init the feed loading. - /// - /// event args - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); - - this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupDepartmentPivot); - this.feed.LoadFeed(); - } - - /// - /// Called after the feeds are loaded. - /// Set the pivotitem source of this page. - /// - private void SetupDepartmentPivot() - { - DepartmentPivot.ItemsSource = feed.Model._faculties; - } - - /// - /// On orientation changed. - /// - /// unused - /// unused - private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) - { - } - - /// - /// Called at clicking on the department headline buttons. - /// Collapses all visible department panels and open (set to visible) - /// the clicked department list. - /// - /// clicked department button - /// unused - private void DepartmentBtn_Click(object sender, RoutedEventArgs e) - { - // if the sender was a button - if(sender is Button) - { - Button btn = sender as Button; - - // if the parent is a stackpanel - if(btn.Parent is StackPanel) - { - StackPanel pan = (StackPanel)btn.Parent; - - // if there is a child after the clicked button in the parent panel - if ((pan.Children.Count() > 1) && (pan.Children[1] != null)) - { - // if the clicked department wasn't the one clicked before - if (pan.Children[1] != this.lastVisibleUIElem) - { - // collapse the last visible chair list - if (this.lastVisibleUIElem != null) - this.lastVisibleUIElem.Visibility = Visibility.Collapsed; - - // open the choosen chair list - pan.Children[1].Visibility = Visibility.Visible; - this.lastVisibleUIElem = pan.Children[1]; - } - } - } - } - } - - /// - /// On clicking a chair textbolock. - /// Open the browser with the url of the chair. - /// - /// clicked chair textblock - /// - private void ChairTB_Click(object sender, RoutedEventArgs e) - { - if (sender is FrameworkElement) - { - FrameworkElement btn = sender as FrameworkElement; - - // if the chair has a url in the tag element - if ((btn.Tag != null) && ((btn.Tag as string).Length > 0)) - { - // open browser with the url - WebBrowserTask task = new WebBrowserTask(); - task.Uri = new Uri(btn.Tag.ToString(), UriKind.Absolute); - task.Show(); - } - } - } - } +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.utility; +using CampusAppWP8.model.departments; +using Microsoft.Phone.Tasks; + + +namespace CampusAppWP8.pages.departments +{ + /// + /// Pivot page with list of the chairs of the facultis. + /// + public partial class DepartmentPage : PhoneApplicationPage + { + /// + /// Stores the last visible department panel. + /// + private UIElement lastVisibleUIElem = null; + /// + /// department/chair feed object, storing the model and data. + /// + private DepartmentFeed feed { get; set; } + + /// + /// Default constructor. + /// + public DepartmentPage() + { + InitializeComponent(); + // init feed object + this.feed = new DepartmentFeed(); + } + + /// + /// On naviagtion to this page. + /// Init the feed loading. + /// + /// event args + protected override void OnNavigatedTo(NavigationEventArgs e) + { + base.OnNavigatedTo(e); + + this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupDepartmentPivot); + this.feed.LoadFeed(); + } + + /// + /// Called after the feeds are loaded. + /// Set the pivotitem source of this page. + /// + private void SetupDepartmentPivot() + { + DepartmentPivot.ItemsSource = feed.Model._faculties; + } + + /// + /// On orientation changed. + /// + /// unused + /// unused + private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) + { + } + + /// + /// Called at clicking on the department headline buttons. + /// Collapses all visible department panels and open (set to visible) + /// the clicked department list. + /// + /// clicked department button + /// unused + private void DepartmentBtn_Click(object sender, RoutedEventArgs e) + { + // if the sender was a button + if(sender is Button) + { + Button btn = sender as Button; + + // if the parent is a stackpanel + if(btn.Parent is StackPanel) + { + StackPanel pan = (StackPanel)btn.Parent; + + // if there is a child after the clicked button in the parent panel + if ((pan.Children.Count() > 1) && (pan.Children[1] != null)) + { + // if the clicked department wasn't the one clicked before + if (pan.Children[1] != this.lastVisibleUIElem) + { + // collapse the last visible chair list + if (this.lastVisibleUIElem != null) + this.lastVisibleUIElem.Visibility = Visibility.Collapsed; + + // open the choosen chair list + pan.Children[1].Visibility = Visibility.Visible; + this.lastVisibleUIElem = pan.Children[1]; + } + } + } + } + } + + /// + /// On clicking a chair textbolock. + /// Open the browser with the url of the chair. + /// + /// clicked chair textblock + /// + private void ChairTB_Click(object sender, RoutedEventArgs e) + { + if (sender is FrameworkElement) + { + FrameworkElement btn = sender as FrameworkElement; + + // if the chair has a url in the tag element + if ((btn.Tag != null) && ((btn.Tag as string).Length > 0)) + { + // open browser with the url + WebBrowserTask task = new WebBrowserTask(); + task.Uri = new Uri(btn.Tag.ToString(), UriKind.Absolute); + task.Show(); + } + } + } + } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/events/EventFeed.cs b/CampusAppWP8/CampusAppWP8/pages/events/EventFeed.cs index 6d8261f6..219be534 100644 --- a/CampusAppWP8/CampusAppWP8/pages/events/EventFeed.cs +++ b/CampusAppWP8/CampusAppWP8/pages/events/EventFeed.cs @@ -1,24 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using CampusAppWP8.model.events_news; -using CampusAppWP8.utility; - -namespace CampusAppWP8.pages.events -{ - /// - /// Event Feed. - /// - public class EventFeed : XMLFeed - { - /// - /// Default constructor. - /// - public EventFeed() : base(URLList.EventsFeedURL, "EventFeed.xml") - { - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using CampusAppWP8.model.events_news; +using CampusAppWP8.utility; + +namespace CampusAppWP8.pages.events +{ + /// + /// Event Feed. + /// + public class EventFeed : XMLFeed + { + /// + /// Default constructor. + /// + public EventFeed() : base(URLList.EventsFeedURL, "EventFeed.xml") + { + } + } +} diff --git a/CampusAppWP8/CampusAppWP8/pages/events/EventIndexPage.xaml b/CampusAppWP8/CampusAppWP8/pages/events/EventIndexPage.xaml index 0bb5ff43..4657a3d4 100644 --- a/CampusAppWP8/CampusAppWP8/pages/events/EventIndexPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/events/EventIndexPage.xaml @@ -1,32 +1,32 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/events/EventIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/events/EventIndexPage.xaml.cs index 95bded50..f70d6f8e 100644 --- a/CampusAppWP8/CampusAppWP8/pages/events/EventIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/events/EventIndexPage.xaml.cs @@ -1,107 +1,107 @@ -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.model.events_news; -using CampusAppWP8.utility; -using CampusAppWP8.Resources; -using System.Collections.ObjectModel; - -namespace CampusAppWP8.pages.events -{ - /// - /// Overview page of all events. - /// - public partial class EventIndexPage : PhoneApplicationPage - { - /// - /// Event Feed object, which contains the rss models and data. - /// - public static EventFeed eventFeed { get; set; } - - /// - /// Default constructor. - /// - public EventIndexPage() - { - InitializeComponent(); - EventIndexPage.eventFeed = new EventFeed(); - } - - /// - /// On navigation to this page, creates a FeedEventHandler and load the rss feed data. - /// - /// event args - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); - - // Set handler and load the fees informations. - EventIndexPage.eventFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupEventPageList); - EventIndexPage.eventFeed.LoadFeed(); - } - - /// - /// Is called after the rss feeds are loaded into the eventFeed model. - /// If there was no feed informations set to the ui, the feed list - /// will be sorted by timestamp and the buttons will be created. - /// - private void SetupEventPageList() - { - if ((EventIndexPage.eventFeed.Model != null) - && (EventIndexPage.eventFeed.Model.Channel != null) - && (EventIndexPage.eventFeed.Model.Channel.Count() >= 1) - && (this.ButtonPanel.Items.Count() == 0)) - { - // Sort the list of rssfeeds. - IEnumerable tempList = EventIndexPage.eventFeed.Model.Channel[0].item.OrderByDescending(e => e.DTTimestamp); - EventIndexPage.eventFeed.Model.Channel[0].item = new ObservableCollection(tempList); - - // Create the buttons for the fees selection and add it to the buttonpanel. - for (int i = 0; i < EventIndexPage.eventFeed.Model.Channel[0].item.Count(); i++) - { - Button tempBtn = new Button(); - tempBtn.Name = "EventRowAppButton"; - tempBtn.Content = EventIndexPage.eventFeed.Model.Channel[0].item[i].Title; - tempBtn.VerticalContentAlignment = VerticalAlignment.Stretch; - tempBtn.HorizontalContentAlignment = HorizontalAlignment.Stretch; - tempBtn.BorderThickness = new Thickness(0.0); - tempBtn.Padding = new Thickness(0.0); - tempBtn.Click += EventRowAppButton_Click; - tempBtn.Tag = i; - - this.ButtonPanel.Items.Add(tempBtn); - } - } - } - - /// - /// Return the eventFeed object. - /// - static public EventFeed GetEventFeed - { - get { return EventIndexPage.eventFeed; } - set { } - } - - /// - /// Is called on clicking on a feed button. - /// Navigates to the event pivot page with the information of the - /// selected feed index. - /// - /// pressed button object - /// event args - private void EventRowAppButton_Click(object sender, RoutedEventArgs e) - { - FrameworkElement tempElem = sender as FrameworkElement; - - NavigationService.Navigate(new Uri("/pages/events/EventPage.xaml?pivotindex=" + tempElem.Tag, UriKind.Relative)); - } - } +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.model.events_news; +using CampusAppWP8.utility; +using CampusAppWP8.Resources; +using System.Collections.ObjectModel; + +namespace CampusAppWP8.pages.events +{ + /// + /// Overview page of all events. + /// + public partial class EventIndexPage : PhoneApplicationPage + { + /// + /// Event Feed object, which contains the rss models and data. + /// + public static EventFeed eventFeed { get; set; } + + /// + /// Default constructor. + /// + public EventIndexPage() + { + InitializeComponent(); + EventIndexPage.eventFeed = new EventFeed(); + } + + /// + /// On navigation to this page, creates a FeedEventHandler and load the rss feed data. + /// + /// event args + protected override void OnNavigatedTo(NavigationEventArgs e) + { + base.OnNavigatedTo(e); + + // Set handler and load the fees informations. + EventIndexPage.eventFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(SetupEventPageList); + EventIndexPage.eventFeed.LoadFeed(); + } + + /// + /// Is called after the rss feeds are loaded into the eventFeed model. + /// If there was no feed informations set to the ui, the feed list + /// will be sorted by timestamp and the buttons will be created. + /// + private void SetupEventPageList() + { + if ((EventIndexPage.eventFeed.Model != null) + && (EventIndexPage.eventFeed.Model.Channel != null) + && (EventIndexPage.eventFeed.Model.Channel.Count() >= 1) + && (this.ButtonPanel.Items.Count() == 0)) + { + // Sort the list of rssfeeds. + IEnumerable tempList = EventIndexPage.eventFeed.Model.Channel[0].item.OrderByDescending(e => e.DTTimestamp); + EventIndexPage.eventFeed.Model.Channel[0].item = new ObservableCollection(tempList); + + // Create the buttons for the fees selection and add it to the buttonpanel. + for (int i = 0; i < EventIndexPage.eventFeed.Model.Channel[0].item.Count(); i++) + { + Button tempBtn = new Button(); + tempBtn.Name = "EventRowAppButton"; + tempBtn.Content = EventIndexPage.eventFeed.Model.Channel[0].item[i].Title; + tempBtn.VerticalContentAlignment = VerticalAlignment.Stretch; + tempBtn.HorizontalContentAlignment = HorizontalAlignment.Stretch; + tempBtn.BorderThickness = new Thickness(0.0); + tempBtn.Padding = new Thickness(0.0); + tempBtn.Click += EventRowAppButton_Click; + tempBtn.Tag = i; + + this.ButtonPanel.Items.Add(tempBtn); + } + } + } + + /// + /// Return the eventFeed object. + /// + static public EventFeed GetEventFeed + { + get { return EventIndexPage.eventFeed; } + set { } + } + + /// + /// Is called on clicking on a feed button. + /// Navigates to the event pivot page with the information of the + /// selected feed index. + /// + /// pressed button object + /// event args + private void EventRowAppButton_Click(object sender, RoutedEventArgs e) + { + FrameworkElement tempElem = sender as FrameworkElement; + + NavigationService.Navigate(new Uri("/pages/events/EventPage.xaml?pivotindex=" + tempElem.Tag, UriKind.Relative)); + } + } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/events/EventPage.xaml b/CampusAppWP8/CampusAppWP8/pages/events/EventPage.xaml index 24b2b652..1c8224ce 100644 --- a/CampusAppWP8/CampusAppWP8/pages/events/EventPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/events/EventPage.xaml @@ -1,50 +1,50 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -