add docmumentation to the pages

This commit is contained in:
stubbfel
2013-06-13 10:50:37 +02:00
parent eb533e8008
commit 512d367a7e
5 changed files with 133 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
<phone:PhoneApplicationPage
x:Class="CampusAppWP8.Pages.lecture.Lecture"
x:Class="CampusAppWP8.Pages.Lecture.LecturePage"
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"
@@ -10,24 +10,10 @@
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
OrientationChanged="PhoneApplicationPage_OrientationChanged"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>
<DataTemplate x:Name="modulePickerItemTemplate">
<StackPanel>
<TextBlock Text="{Binding Content}"/>
</StackPanel>
</DataTemplate>
<DataTemplate x:Name="modulePickerFullItemTemplate">
<StackPanel>
<TextBlock Text="{Binding Content}"/>
</StackPanel>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
@@ -68,7 +54,8 @@
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="1">
<StackPanel >
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Course, Source={StaticResource LocalizedStrings}}"/>
<toolkit:ListPicker Name="Course" ExpansionMode="FullScreenOnly" FullModeHeader="Studiengangasuwahl" >
<!-- Listpicket of courses -->
<toolkit:ListPicker Name="Course" ExpansionMode="FullScreenOnly" FullModeHeader="{Binding Path=LocalizedResources.LectureApp_ListPickerHeaderCourse, Source={StaticResource LocalizedStrings}}" >
<toolkit:ListPicker.ItemTemplate>
<DataTemplate>
<StackPanel>
@@ -88,6 +75,7 @@
</Border>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="2">
<StackPanel >
<!-- Listpicket of degree-->
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Degree, Source={StaticResource LocalizedStrings}}"/>
<toolkit:ListPicker Name="Degree">
<toolkit:ListPicker.ItemTemplate>
@@ -109,6 +97,7 @@
</Border>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="3">
<StackPanel >
<!-- Listpicket of semesters(from to) -->
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Term, Source={StaticResource LocalizedStrings}}"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<toolkit:ListPicker Width="60" Name="From" >
@@ -149,6 +138,7 @@
</Border>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="4">
<StackPanel>
<!-- Listpicket of semster -->
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Semester, Source={StaticResource LocalizedStrings}}"/>
<toolkit:ListPicker Name="Semester">
<toolkit:ListPicker.ItemTemplate>

View File

@@ -1,75 +1,144 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWP8.Pages.Lecture;
using CampusAppWP8.Utility;
using CampusAppWP8.Model.Lecture;
using CampusAppWP8.Resources;
using System.Collections.ObjectModel;
namespace CampusAppWP8.Pages.lecture
//-----------------------------------------------------------------------
// <copyright file="LecturePage.xaml.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>13.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Pages.Lecture
{
public partial class Lecture : PhoneApplicationPage
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Navigation;
using CampusAppWP8.Model.Lecture;
using CampusAppWP8.Pages.Lecture;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
/// <summary>
/// Class for the LecturePage
/// </summary>
public partial class LecturePage : PhoneApplicationPage
{
/// <summary>
/// actual LectureFeed
/// </summary>
private LectureFeed feed;
/// <summary>
/// List for the courses of the BTU
/// </summary>
/// <remarks>
/// need to be extend to full list
/// </remarks>
private List<OptionModel> courseList = new List<OptionModel>()
{
new OptionModel(){Text = "Architektur", Value = "013"},
new OptionModel(){Text = "Bauingenieurwesen", Value = "017"},
new OptionModel(){Text = "Betriebswirtschaftslehre", Value = "021"}
new OptionModel()
{
Text = "Architektur", Value = "013"
},
new OptionModel()
{
Text = "Bauingenieurwesen", Value = "017"
},
new OptionModel()
{
Text = "Betriebswirtschaftslehre", Value = "021"
}
};
/// <summary>
/// List of the degrees
/// </summary>
private List<OptionModel> degreeList = new List<OptionModel>()
{
new OptionModel(){Text = AppResources.Degree_Bachelor, Value = "82"},
new OptionModel(){Text = AppResources.Degree_Master, Value = "88"},
new OptionModel(){Text = AppResources.Degree_Diploma, Value = "11"}
new OptionModel()
{
Text = AppResources.Degree_Bachelor, Value = "82"
},
new OptionModel()
{
Text = AppResources.Degree_Master, Value = "88"
},
new OptionModel()
{
Text = AppResources.Degree_Diploma, Value = "11"
}
};
/// <summary>
/// List of the semester
/// </summary>
private List<OptionModel> semesterList = new List<OptionModel>()
{
new OptionModel(){Text = "SoSe 13", Value = "20131"},
new OptionModel(){Text = "WiSe 13/14", Value = "20132"},
new OptionModel(){Text = "SoSe 14", Value = "20141"}
new OptionModel()
{
Text = "SoSe 13", Value = "20131"
},
new OptionModel()
{
Text = "WiSe 13/14", Value = "20132"
},
new OptionModel()
{
Text = "SoSe 14", Value = "20141"
}
};
/// <summary>
/// List for the number of semester
/// </summary>
private List<OptionModel> numberList = new List<OptionModel>()
{
new OptionModel(){Text = "1", Value = "1"},
new OptionModel(){Text = "2", Value = "2"},
new OptionModel(){Text = "3", Value = "3"},
new OptionModel(){Text = "4", Value = "4"}
new OptionModel()
{
Text = "1", Value = "1"
},
new OptionModel()
{
Text = "2", Value = "2"
},
new OptionModel()
{
Text = "3", Value = "3"
},
new OptionModel()
{
Text = "4", Value = "4"
}
};
public Lecture()
/// <summary>
/// Initializes a new instance of the <see cref="LecturePage" /> class.
/// </summary>
public LecturePage()
{
InitializeComponent();
setupListPickers();
this.InitializeComponent();
this.SetupListPickers();
}
private void setupListPickers()
{
this.Course.ItemsSource = courseList;
this.Degree.ItemsSource = degreeList;
this.From.ItemsSource = numberList;
this.To.ItemsSource = numberList;
this.Semester.ItemsSource = semesterList;
}
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
/// <summary>
/// Method sets the ItemSource of the ListPickers
/// </summary>
private void SetupListPickers()
{
this.Course.ItemsSource = this.courseList;
this.Degree.ItemsSource = this.degreeList;
this.From.ItemsSource = this.numberList;
this.To.ItemsSource = this.numberList;
this.Semester.ItemsSource = this.semesterList;
}
/// <summary>
/// Method send a request to the Feed
/// </summary>
/// <remarks>
/// have to refactors
/// </remarks>
/// <param name="sender">sender of this event</param>
/// <param name="e"> events arguments</param>
private void SendRequest(object sender, RoutedEventArgs e)
{
OptionModel semester = (OptionModel)this.Semester.SelectedItem;

View File

@@ -84,8 +84,8 @@ namespace CampusAppWP8.Pages.Lecture
/// <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");
UIElement link = (UIElement)parent.FindName("Link");
UIElement details = (UIElement)parent.FindName("Details");
this.HideVisibility(link);
this.HideVisibility(details);
}

View File

@@ -222,6 +222,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Studiengangauswahl ähnelt.
/// </summary>
public static string LectureApp_ListPickerHeaderCourse {
get {
return ResourceManager.GetString("LectureApp_ListPickerHeaderCourse", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Verantwortlicher ähnelt.
/// </summary>

View File

@@ -269,4 +269,7 @@
<data name="Degree_Master" xml:space="preserve">
<value>Master</value>
</data>
<data name="LectureApp_ListPickerHeaderCourse" xml:space="preserve">
<value>Studiengangauswahl</value>
</data>
</root>