Merge branch 'ĺecturepage' into HEAD

Conflicts:
	CampusAppWP8/CampusAppWP8/Properties/WMAppManifest.xml
This commit is contained in:
stubbfel
2013-06-11 15:37:54 +02:00
20 changed files with 755 additions and 40 deletions

View File

@@ -7,6 +7,7 @@ using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWP8.Resources;
using System.IO.IsolatedStorage;
namespace CampusAppWP8
@@ -59,6 +60,37 @@ namespace CampusAppWP8
}
}
/// <summary>
/// Method save any object to the IsolatedStorage
/// </summary>
/// <param name="key"> key of the object</param>
/// <param name="value">value of the object, if value == null => remove key</param>
public static void SaveToIsolatedStorage<T>(string key, T value)
{
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
isolatedStore.Remove(key);
if (value != null)
{
isolatedStore.Add(key, value);
}
isolatedStore.Save();
}
/// <summary>
/// Method load any object to the IsolatedStorage
/// </summary>
/// <param name="key"> key of the object</param>
public static T LoadFromIsolatedStorage<T>(string key)
{
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
if(isolatedStore.Contains(key)) {
object value = isolatedStore[key];
return (T)value;
}
return default(T);
}
// Code, der beim Starten der Anwendung ausgeführt werden soll (z. B. über "Start")
// Dieser Code wird beim Reaktivieren der Anwendung nicht ausgeführt
private void Application_Launching(object sender, LaunchingEventArgs e)

View File

@@ -122,8 +122,14 @@
<Compile Include="Model\BaseModel.cs" />
<Compile Include="Model\BaseViewModel.cs" />
<Compile Include="Feed\Mensa\MensaFeed.cs" />
<Compile Include="Pages\Lecture\Results.xaml.cs">
<DependentUpon>Results.xaml</DependentUpon>
<Compile Include="Pages\Lecture\ModulWebPage.xaml.cs">
<DependentUpon>ModulWebPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Lecture\ResultDetailPage.xaml.cs">
<DependentUpon>ResultDetailPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Lecture\ResultPage.xaml.cs">
<DependentUpon>ResultPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Mensa\MensaPage.xaml.cs">
<DependentUpon>MensaPage.xaml</DependentUpon>
@@ -179,7 +185,15 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Lecture\Results.xaml">
<Page Include="Pages\Lecture\ModulWebPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Lecture\ResultDetailPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Lecture\ResultPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>

View File

@@ -1,4 +1,5 @@
using System;
using CampusAppWP8.Utility;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
@@ -10,6 +11,12 @@ namespace CampusAppWP8.Model.Lecture
{
public class LectureActivity
{
#region
private ObservableCollection<LectureLecturer> lecturer;
private string lecturerString;
private string courseString;
private string topic;
#endregion
#region Constructor
/// <summary>
@@ -24,7 +31,10 @@ namespace CampusAppWP8.Model.Lecture
#region Proberty
[XmlElement("art")]
public string Type{ get; set; }
public string Type { get; set; }
[XmlAttribute("id")]
public int Id { get; set; }
[XmlElement("semester")]
public int Semester { get; set; }
@@ -36,7 +46,49 @@ namespace CampusAppWP8.Model.Lecture
public LectureModul Modul { get; set; }
[XmlElement("lehrperson")]
public ObservableCollection<LectureLecturer> Lecturer { get; set; }
public ObservableCollection<LectureLecturer> Lecturer {
get
{
return lecturer;
}
set
{
if (value != lecturer)
{
lecturer = value;
}
}
}
public string LecturerString {
get
{
return this.lecturerString;
}
set
{
if (value != this.lecturerString)
{
this.lecturerString = value;
}
}
}
public string CourseString
{
get
{
return this.courseString;
}
set
{
if (value != this.courseString)
{
this.courseString = value;
}
}
}
[XmlElement("studiengang")]
public ObservableCollection<LectureCourse> Course { get; set; }
@@ -44,6 +96,45 @@ namespace CampusAppWP8.Model.Lecture
[XmlElement("termin")]
public ObservableCollection<LectureDate> Dates { get; set; }
[XmlElement("zugeordnete_einrichtung")]
public string Department { get; set; }
[XmlElement("lehrinhalt")]
public string Topic
{
get
{
return topic;
}
set
{
if (value != topic)
{
topic = StringManager.StripHTML(value);
}
}
}
#endregion
public void createLectureString()
{
string result = string.Empty;
foreach (LectureLecturer tmpLecturer in Lecturer)
{
result += tmpLecturer.ToString() + "\n";
}
this.LecturerString = result.TrimEnd('\n');
}
public void createCourseString()
{
string result = string.Empty;
foreach (LectureCourse course in Course)
{
result += course.Title + "\n";
}
this.CourseString = result.TrimEnd('\n');
}
}
}

View File

@@ -23,5 +23,24 @@ namespace CampusAppWP8.Model.Lecture
[XmlAttribute("zustaendigkeit")]
public string Responsibility { get; set; }
public override string ToString()
{
string result = string.Empty;
if (!Title.Equals(string.Empty))
{
result += Title + " ";
}
result += FirstName + " ";
result += LastName + " ";
if (!Responsibility.Equals(string.Empty))
{
result += "(" + Responsibility + ") ";
}
return result;
}
}
}

View File

@@ -7,8 +7,11 @@
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Lecture
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
using System.Linq;
[XmlRoot("lsf_auszug")]
public class LectureList
{
@@ -28,9 +31,18 @@ namespace CampusAppWP8.Model.Lecture
[XmlArray("veranstaltungsliste")]
[XmlArrayItem("veranstaltung")]
public ObservableCollection<LectureActivity> Activity { get; set; }
public ObservableCollection<LectureActivity> Activities { get; set; }
#endregion
#region Methods
public LectureActivity GetActivity(int id)
{
LectureActivity activity = Activities.Where(p => p.Id == id).First();
return activity;
}
#endregion
}
}

View File

@@ -7,6 +7,7 @@
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Lecture
{
using CampusAppWP8.Resources;
using System;
using System.Xml.Serialization;
public class LectureModul
@@ -61,7 +62,7 @@ namespace CampusAppWP8.Model.Lecture
private void createUrl()
{
this.url = new Uri("https://www.tu-cottbus.de/modul/" + number.ToString());
this.url = new Uri(Constants.UrlLectureModulBaseAddr + number.ToString());
}
#endregion

View File

@@ -1,5 +1,5 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.Lecture.Results"
x:Class="CampusAppWP8.Pages.Lecture.ModulWebPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
@@ -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">
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}"/>
</StackPanel>
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<phone:WebBrowser x:Name="WebmailBrowser" IsScriptEnabled="True"/>
</Grid>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,43 @@
//-----------------------------------------------------------------------
// <copyright file="ModulWebPage.xaml.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>11.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Pages.Lecture
{
using System;
using System.Windows.Navigation;
using CampusAppWP8.Resources;
using Microsoft.Phone.Controls;
/// <summary>
/// Class for the page which shows Webpages from the BaseAddress <see cref="Constants.UrlLectureModulBaseAddr" />
/// </summary>
public partial class ModulWebPage : PhoneApplicationPage
{
/// <summary>
/// Initializes a new instance of the <see cref="ModulWebPage" /> class.
/// </summary>
public ModulWebPage()
{
this.InitializeComponent();
}
/// <summary>
/// Override the OnNavigatedTo method
/// </summary>
/// <param name="e">Arguments of navigation</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (NavigationContext.QueryString.ContainsKey(Constants.ParamLectureModulNumber))
{
string number = NavigationContext.QueryString[Constants.ParamLectureModulNumber];
this.WebmailBrowser.Navigate(new Uri(Constants.UrlLectureModulBaseAddr + number, UriKind.Absolute));
}
base.OnNavigatedTo(e);
}
}
}

View File

@@ -0,0 +1,73 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.Lecture.ResultDetailPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_DetailsHeader, Source={StaticResource LocalizedStrings}}"/>
</StackPanel>
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ScrollViewer>
<StackPanel>
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,0,0,0" Padding="0,12,0,12">
<StackPanel>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Type, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
<TextBlock Text="{Binding Type}" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<StackPanel>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureName, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
<TextBlock Text="{Binding Modul.Title}" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<StackPanel>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Officer, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
<TextBlock Text="{Binding LecturerString}" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<StackPanel>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Courses, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
<TextBlock Text="{Binding CourseString}" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<StackPanel>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Department, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
<TextBlock Text="{Binding Department}" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
<StackPanel>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureTopic, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
<TextBlock Text="{Binding Topic}" TextWrapping="Wrap"/>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
</Grid>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,59 @@
//-----------------------------------------------------------------------
// <copyright file="ResultDetailPage.xaml.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>11.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Pages.Lecture
{
using System.Windows.Navigation;
using CampusAppWP8.Model.Lecture;
using CampusAppWP8.Resources;
using Microsoft.Phone.Controls;
/// <summary>
/// Class for the page which shows details of an activity
/// </summary>
public partial class ResultDetailPage : PhoneApplicationPage
{
/// <summary>
/// Initializes a new instance of the <see cref="ResultDetailPage" /> class.
/// </summary>
public ResultDetailPage()
{
this.InitializeComponent();
}
/// <summary>
/// Override the OnNavigatedTo method
/// </summary>
/// <param name="e">Arguments of navigation</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (NavigationContext.QueryString.ContainsKey(Constants.ParamLectureActivityId))
{
string activityId = NavigationContext.QueryString[Constants.ParamLectureActivityId];
this.LoadActivity(int.Parse(activityId));
}
base.OnNavigatedTo(e);
}
/// <summary>
/// Method load a certain Activity from the model
/// </summary>
/// <param name="activityId">id of the activity</param>
private void LoadActivity(int activityId)
{
LectureList list = App.LoadFromIsolatedStorage<LectureList>(Constants.IsolatedStorageLectureModel);
if (list != null)
{
LectureActivity activity = list.GetActivity(activityId);
activity.createLectureString();
activity.createCourseString();
this.ContentPanel.DataContext = activity;
}
}
}
}

View File

@@ -0,0 +1,70 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.Lecture.ResultPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>
<DataTemplate x:Key="LectureItemTemplate">
<Border Background="{x:Null}" BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,0,0,0">
<StackPanel>
<Button Click="ToggleOptions" BorderBrush="{x:Null}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Type}" Grid.Column="0" Grid.Row="0"/>
<TextBlock Text=" : " Grid.Column="1" Grid.Row="0"/>
<TextBlock Text="{Binding Modul.Title}" TextWrapping="Wrap" Grid.Column="2" Grid.Row="0"/>
</Grid>
</Button>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Name="Link" Visibility="Collapsed" Content="Link" Tag="{Binding Modul.Number}" Click="ShowModulWebPage"/>
<Button Name="Details" Visibility="Collapsed" Content="Details" Tag="{Binding Id}" Click="ShowDetailPage"/>
</StackPanel>
</StackPanel>
</Border>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}"/>
</StackPanel>
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ScrollViewer>
<phone:LongListSelector Name="ResultList" ItemTemplate="{StaticResource LectureItemTemplate}" HorizontalContentAlignment="Left" />
</ScrollViewer>
</Grid>
</Grid>
</phone:PhoneApplicationPage>

View File

@@ -0,0 +1,158 @@
//-----------------------------------------------------------------------
// <copyright file="ResultPage.xaml.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>11.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Pages.Lecture
{
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using CampusAppWP8.Model.Lecture;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
/// <summary>
/// Class for the page which shows the results of an LectureRequest
/// </summary>
public partial class ResultPage : PhoneApplicationPage
{
/// <summary>
/// actual LectureFeed
/// </summary>
private LectureFeed feed;
/// <summary>
/// Reference of the button which was lastClicked
/// </summary>
private Button lastClickedButton;
/// <summary>
/// Initializes a new instance of the <see cref="ResultPage" /> class.
/// </summary>
public ResultPage()
{
this.InitializeComponent();
this.feed = new LectureFeed();
this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady);
this.feed.LoadFeed();
}
/// <summary>
/// Method will be execute if the feed is ready
/// </summary>
private void FeedIsReady()
{
this.ResultList.ItemsSource = this.feed.Model.Activities;
App.SaveToIsolatedStorage<LectureList>(Constants.IsolatedStorageLectureModel, this.feed.Model);
}
/// <summary>
/// Method toggle the Visibility of the Link- and Details-Buttons
/// </summary>
/// <param name="sender">Caller of the function</param>
/// <param name="e">some EventArgs</param>
private void ToggleOptions(object sender, RoutedEventArgs e)
{
Button button = (Button)sender;
StackPanel parent = (StackPanel)button.Parent;
if (this.lastClickedButton != null && !this.lastClickedButton.Equals(button))
{
this.HideOptions(parent);
}
this.lastClickedButton = button;
Button link = (Button)parent.FindName("Link");
Button details = (Button)parent.FindName("Details");
this.ToogleVisibility(link);
this.ToogleVisibility(details);
}
/// <summary>
/// Method shows the Link- and Details-Buttons
/// </summary>
/// <param name="parent">Reference of the StackPanel which include the buttons </param>
private void ShowOptions(StackPanel parent)
{
Button link = (Button)parent.FindName("Link");
Button details = (Button)parent.FindName("Details");
this.ShowVisibility(link);
this.ShowVisibility(details);
}
/// <summary>
/// Method hide the Link- and Details-Buttons
/// </summary>
/// <param name="parent">Reference of the StackPanel which include the buttons </param>
private void HideOptions(StackPanel parent)
{
Button link = (Button)parent.FindName("Link");
Button details = (Button)parent.FindName("Details");
this.HideVisibility(link);
this.HideVisibility(details);
}
/// <summary>
/// Method toggle the Visibility of an UIElement
/// </summary>
/// <param name="element">UIElement which Visibility has to be toggle</param>
private void ToogleVisibility(UIElement element)
{
if (System.Windows.Visibility.Visible.Equals(element.Visibility))
{
this.HideVisibility(element);
}
else
{
this.ShowVisibility(element);
}
}
/// <summary>
/// Method set the Visibility=true of an UIElement
/// </summary>
/// <param name="element">UIElement which Visibility has to been true</param>
private void ShowVisibility(UIElement element)
{
element.Visibility = System.Windows.Visibility.Visible;
}
/// <summary>
/// Method set the Visibility=false of an UIElement
/// </summary>
/// <param name="element">UIElement which Visibility has to been false</param>
private void HideVisibility(UIElement element)
{
element.Visibility = System.Windows.Visibility.Collapsed;
}
/// <summary>
/// Method navigate to ModuleWebPage
/// </summary>
/// <param name="sender">Caller of the function</param>
/// <param name="e">some EventArgs</param>
private void ShowModulWebPage(object sender, RoutedEventArgs e)
{
Button btn = (Button)sender;
Uri url = new Uri(Constants.PathLectureModulWebPage + Constants.Paramseparator + Constants.ParamLectureModulNumber + "=" + btn.Tag, UriKind.Relative);
NavigationService.Navigate(url);
}
/// <summary>
/// Method navigate to DetailPage
/// </summary>
/// <param name="sender">Caller of the function</param>
/// <param name="e">some EventArgs</param>
private void ShowDetailPage(object sender, RoutedEventArgs e)
{
Button btn = (Button)sender;
Uri url = new Uri(Constants.PathResultDetailWebPage + Constants.Paramseparator + Constants.ParamLectureActivityId + "=" + btn.Tag, UriKind.Relative);
NavigationService.Navigate(url);
}
}
}

View File

@@ -1,20 +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;
namespace CampusAppWP8.Pages.Lecture
{
public partial class Results : PhoneApplicationPage
{
public Results()
{
InitializeComponent();
}
}
}

View File

@@ -13,7 +13,9 @@
<Capability Name="ID_CAP_ISV_CAMERA" />
</Capabilities>
<Tasks>
<DefaultTask Name="_default" NavigationPage="pages/StartPage.xaml" />
</Tasks>
<Tokens>
<PrimaryToken TokenID="CampusAppWP8Token" TaskName="_default">

View File

@@ -132,6 +132,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Studiengänge ähnelt.
/// </summary>
public static string LectureApp_Courses {
get {
return ResourceManager.GetString("LectureApp_Courses", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Abschluss ähnelt.
/// </summary>
@@ -142,7 +151,25 @@ namespace CampusAppWP8.Resources {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Vorlesungsname ähnelt.
/// Sucht eine lokalisierte Zeichenfolge, die Lehrstuhl ähnelt.
/// </summary>
public static string LectureApp_Department {
get {
return ResourceManager.GetString("LectureApp_Department", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Vorlesungen - Details ähnelt.
/// </summary>
public static string LectureApp_DetailsHeader {
get {
return ResourceManager.GetString("LectureApp_DetailsHeader", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Veranstaltungsname ähnelt.
/// </summary>
public static string LectureApp_LectureName {
get {
@@ -150,6 +177,24 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Lehrinhalt ähnelt.
/// </summary>
public static string LectureApp_LectureTopic {
get {
return ResourceManager.GetString("LectureApp_LectureTopic", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Verantwortlicher ähnelt.
/// </summary>
public static string LectureApp_Officer {
get {
return ResourceManager.GetString("LectureApp_Officer", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Semester ähnelt.
/// </summary>
@@ -177,6 +222,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Veranstaltungsart ähnelt.
/// </summary>
public static string LectureApp_Type {
get {
return ResourceManager.GetString("LectureApp_Type", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Links ähnelt.
/// </summary>

View File

@@ -183,7 +183,7 @@
<value>Abschluss</value>
</data>
<data name="LectureApp_LectureName" xml:space="preserve">
<value>Vorlesungsname</value>
<value>Veranstaltungsname</value>
</data>
<data name="LectureApp_Semester" xml:space="preserve">
<value>Semester</value>
@@ -233,4 +233,22 @@
<data name="MensaApp_DinnerLabelW" xml:space="preserve">
<value>84</value>
</data>
<data name="LectureApp_Courses" xml:space="preserve">
<value>Studiengänge</value>
</data>
<data name="LectureApp_Department" xml:space="preserve">
<value>Lehrstuhl</value>
</data>
<data name="LectureApp_DetailsHeader" xml:space="preserve">
<value>Vorlesungen - Details</value>
</data>
<data name="LectureApp_LectureTopic" xml:space="preserve">
<value>Lehrinhalt</value>
</data>
<data name="LectureApp_Officer" xml:space="preserve">
<value>Verantwortlicher</value>
</data>
<data name="LectureApp_Type" xml:space="preserve">
<value>Veranstaltungsart</value>
</data>
</root>

View File

@@ -60,6 +60,78 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die LectureModel ähnelt.
/// </summary>
internal static string IsolatedStorageLectureModel {
get {
return ResourceManager.GetString("IsolatedStorageLectureModel", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ActivityId ähnelt.
/// </summary>
internal static string ParamLectureActivityId {
get {
return ResourceManager.GetString("ParamLectureActivityId", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ModulNumber ähnelt.
/// </summary>
internal static string ParamLectureModulNumber {
get {
return ResourceManager.GetString("ParamLectureModulNumber", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ? ähnelt.
/// </summary>
internal static string Paramseparator {
get {
return ResourceManager.GetString("Paramseparator", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Url ähnelt.
/// </summary>
internal static string ParamUrl {
get {
return ResourceManager.GetString("ParamUrl", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/ModulWebPage.xaml ähnelt.
/// </summary>
internal static string PathLectureModulWebPage {
get {
return ResourceManager.GetString("PathLectureModulWebPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/ResultDetailPage.xaml ähnelt.
/// </summary>
internal static string PathResultDetailWebPage {
get {
return ResourceManager.GetString("PathResultDetailWebPage", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die https://www.tu-cottbus.de/modul/ ähnelt.
/// </summary>
internal static string UrlLectureModulBaseAddr {
get {
return ResourceManager.GetString("UrlLectureModulBaseAddr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die root ähnelt.
/// </summary>

View File

@@ -117,6 +117,30 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="IsolatedStorageLectureModel" xml:space="preserve">
<value>LectureModel</value>
</data>
<data name="ParamLectureActivityId" xml:space="preserve">
<value>ActivityId</value>
</data>
<data name="ParamLectureModulNumber" xml:space="preserve">
<value>ModulNumber</value>
</data>
<data name="Paramseparator" xml:space="preserve">
<value>?</value>
</data>
<data name="ParamUrl" xml:space="preserve">
<value>Url</value>
</data>
<data name="PathLectureModulWebPage" xml:space="preserve">
<value>/Pages/Lecture/ModulWebPage.xaml</value>
</data>
<data name="PathResultDetailWebPage" xml:space="preserve">
<value>/Pages/Lecture/ResultDetailPage.xaml</value>
</data>
<data name="UrlLectureModulBaseAddr" xml:space="preserve">
<value>https://www.tu-cottbus.de/modul/</value>
</data>
<data name="XMLRootElementName" xml:space="preserve">
<value>root</value>
</data>