finish #226
This commit is contained in:
@@ -21,9 +21,9 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Margin="0,0,0,0">
|
||||
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.ExaminationApp_Header, Source={StaticResource LocalizedStrings}}" Margin="0,0,0,0"/>
|
||||
<StackPanel Grid.Row="0">
|
||||
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.ExaminationApp_Header, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
<phone:Pivot Name="ExamPivot" Grid.Row="1">
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Margin="0,0,0,0">
|
||||
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}" Margin="0,0,0,0"/>
|
||||
<StackPanel Grid.Row="0">
|
||||
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
<!--Pivotsteuerelement-->
|
||||
<phone:Pivot Grid.Row="1">
|
||||
|
||||
@@ -7,20 +7,30 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
OrientationChanged="PhoneApplicationPage_OrientationChanged"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<header:DefaultHeader Name="Header" HeaderName="{Binding Path=LocalizedResources.LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--Pivotsteuerelement-->
|
||||
<phone:Pivot Name="MensaPivot" Title="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}">
|
||||
<phone:Pivot Grid.Row="1" Name="MensaPivot">
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<StackPanel Margin="0,-36,0,0">
|
||||
<TextBlock Text="{Binding Day}" />
|
||||
<TextBlock Text="{Binding Date}" FontSize="34" Margin="6,0,0,0"/>
|
||||
</StackPanel>
|
||||
@@ -28,7 +38,7 @@
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ScrollViewer>
|
||||
<ScrollViewer Margin="12,0,0,0">
|
||||
<ItemsControl x:Name="MenuPanel" ItemsSource="{Binding Meals}" ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
@@ -38,12 +48,12 @@
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="0" Margin="0,0,0,12" Width="100">
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="0" Margin="0,0,0,12" MinWidth="100">
|
||||
<TextBlock Text="{Binding MealName}" FontWeight="Bold"/>
|
||||
<TextBlock Text=" : "/>
|
||||
</StackPanel>
|
||||
<Image Source="{Binding IconUrl}" Width="100" Margin="-25,-25,-25,-21"></Image>
|
||||
<Image HorizontalAlignment="Left" Source="{Binding IconUrl}" Width="100" Margin="-12,-25,0,-21"></Image>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding MealDesc}" TextWrapping="Wrap" Grid.Column="1"/>
|
||||
</Grid>
|
||||
@@ -51,12 +61,10 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</ScrollViewer>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
</phone:Pivot>
|
||||
<!-- <Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" /> -->
|
||||
</Grid>
|
||||
<phone:PhoneApplicationPage.ApplicationBar>
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized" >
|
||||
|
||||
@@ -230,8 +230,10 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
private void SetupMensaPivot()
|
||||
{
|
||||
this.MensaPivot.Title = AppResources.MensaApp_Title + " (" + this.feed.Title + ")";
|
||||
this.Header.HeaderName = AppResources.MensaApp_Title + ": " + this.feed.Title;
|
||||
this.CreatesMealIcons();
|
||||
this.feed.Model.Menus[2].Meals = null;
|
||||
this.feed.Model.SetHolidayCaption(AppResources.MensaApp_CloseMensa);
|
||||
this.MensaPivot.ItemsSource = this.feed.Model.Menus;
|
||||
this.MensaPivot.SelectedIndex = this.selectedIndex;
|
||||
}
|
||||
@@ -358,6 +360,23 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.SFB_MAIN);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method handle OrientationPage
|
||||
/// </summary>
|
||||
/// <param name="sender">Caller of the function</param>
|
||||
/// <param name="e">some EventArgs</param>
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight)
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<StackPanel Grid.Row="0">
|
||||
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.PersonApp_Header, Source={StaticResource LocalizedStrings}}"/>
|
||||
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.PersonApp_Header, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<StackPanel Grid.Row="0">
|
||||
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.Setting_User, Source={StaticResource LocalizedStrings}}"/>
|
||||
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.Setting_User, Source={StaticResource LocalizedStrings}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer Grid.Row="1">
|
||||
|
||||
@@ -456,6 +456,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Die Mensa ist heute geschlossen ähnelt.
|
||||
/// </summary>
|
||||
public static string MensaApp_CloseMensa {
|
||||
get {
|
||||
return ResourceManager.GetString("MensaApp_CloseMensa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 84 ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -437,4 +437,7 @@
|
||||
<data name="PlaceLabel_Type" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="MensaApp_CloseMensa" xml:space="preserve">
|
||||
<value>Die Mensa ist heute geschlossen</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -101,7 +101,7 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
|
||||
set
|
||||
{
|
||||
if (value > -1 && value < 8)
|
||||
if (value > -2 && value < 8)
|
||||
{
|
||||
this.mealId = value;
|
||||
this.CreateMealName();
|
||||
@@ -187,7 +187,7 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
this.mealName = AppResources.MensaApp_Action;
|
||||
break;
|
||||
default:
|
||||
this.mealName = string.Empty;
|
||||
this.mealName = AppResources.MensaApp_NoFood;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,29 @@ namespace CampusAppWPortalLib8.Model.Mensa
|
||||
return monday;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method determine holidays (Days with no meals) and add a pseudo meal
|
||||
/// </summary>
|
||||
/// <param name="text">text of the pseudo meal</param>
|
||||
public void SetHolidayCaption(string text)
|
||||
{
|
||||
MealModel holiday = new MealModel();
|
||||
holiday.MealDesc = text;
|
||||
holiday.MealId= -1;
|
||||
|
||||
foreach (MenuModel menu in this.Menus)
|
||||
{
|
||||
if (menu.Meals == null || menu.Meals.Count < 1)
|
||||
{
|
||||
if (menu.Meals == null)
|
||||
{
|
||||
menu.Meals = new ObservableCollection<MealModel>();
|
||||
}
|
||||
menu.Meals.Add(holiday);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CampusAppWPortalLib8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Cottbus Hauptcampus ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Cottbus Campus ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus_CBMain {
|
||||
get {
|
||||
@@ -89,7 +89,7 @@ namespace CampusAppWPortalLib8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Senftenberg Hauptcampus ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Senftenberg Campus ähnelt.
|
||||
/// </summary>
|
||||
public static string Campus_SFBMain {
|
||||
get {
|
||||
@@ -196,6 +196,15 @@ namespace CampusAppWPortalLib8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Kein Essen ähnelt.
|
||||
/// </summary>
|
||||
public static string MensaApp_NoFood {
|
||||
get {
|
||||
return ResourceManager.GetString("MensaApp_NoFood", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Suppe ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Campus_CBMain" xml:space="preserve">
|
||||
<value>Cottbus Hauptcampus</value>
|
||||
<value>Cottbus Campus</value>
|
||||
</data>
|
||||
<data name="Campus_CBNorth" xml:space="preserve">
|
||||
<value>Cottbus Nordcampus</value>
|
||||
@@ -127,7 +127,7 @@
|
||||
<value>Cottbus Südcampus</value>
|
||||
</data>
|
||||
<data name="Campus_SFBMain" xml:space="preserve">
|
||||
<value>Senftenberg Hauptcampus</value>
|
||||
<value>Senftenberg Campus</value>
|
||||
</data>
|
||||
<data name="Degree_Bachelor" xml:space="preserve">
|
||||
<value>Bachelor</value>
|
||||
@@ -162,6 +162,9 @@
|
||||
<data name="MensaApp_Dinner5" xml:space="preserve">
|
||||
<value>Essen 5</value>
|
||||
</data>
|
||||
<data name="MensaApp_NoFood" xml:space="preserve">
|
||||
<value>Kein Essen</value>
|
||||
</data>
|
||||
<data name="MensaApp_Soup" xml:space="preserve">
|
||||
<value>Suppe</value>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user