Merge branch 'develop' into feature/#214

This commit is contained in:
stubbfel
2013-10-08 16:10:53 +02:00
41 changed files with 580 additions and 121 deletions

View File

@@ -158,6 +158,9 @@
<Compile Include="Utility\AppUriMapper.cs" />
<Compile Include="Utility\BackgroundTasks.cs" />
<Compile Include="Utility\Lui\Button\AddPersonButton.cs" />
<Compile Include="Utility\Lui\Header\DefaultHeader.xaml.cs">
<DependentUpon>DefaultHeader.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Lui\Tiles\TileCreator.cs" />
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
@@ -402,6 +405,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Utility\Lui\Header\DefaultHeader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Assets\psd\holo_optionsbuttons.psd" />

View File

@@ -8,7 +8,9 @@
namespace CampusAppWP8.Model.Lecture
{
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.Lecture;
using System.Xml.Serialization;
/// <summary>
/// Model for a Activity
@@ -34,6 +36,26 @@ namespace CampusAppWP8.Model.Lecture
return this.iconUrl;
}
}
/// <summary>
/// Gets or sets the topic of the Lecture
/// </summary>
[XmlElement("lehrinhalt")]
public new string Topic
{
get
{
return base.Topic;
}
set
{
if (value != this.Topic)
{
base.Topic = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
#endregion
#region Methods

View File

@@ -11,13 +11,13 @@ namespace CampusAppWP8.Model.Openinghours
using System.Globalization;
using System.Windows;
using System.Xml.Serialization;
/// <summary>
/// Model for menu
/// </summary>
public class OpeninghoursInstitutionWp8Model : CampusAppWPortalLib8.Model.Openinghours.OpeninghoursInstitutionModel
{
#region Property
#region Property
/// <summary>
/// Gets the visibility state of the monday TextBlock.
@@ -152,5 +152,5 @@ namespace CampusAppWP8.Model.Openinghours
}
#endregion
}
}
}

View File

@@ -10,6 +10,7 @@ namespace CampusAppWP8.Model.Person
{
using System.Xml.Serialization;
using CampusAppWPortalLib8.Model.Person;
using System.Collections.Generic;
/// <summary>Person list model.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
@@ -25,5 +26,25 @@ namespace CampusAppWP8.Model.Person
IPersonModel<IPersonFunctionModel> tmpPerson = base.GetPerson(id);
return tmpPerson as PersonWp8Model;
}
/// <summary>Removes the non function person.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
public override void RemoveNonFunctionPerson()
{
List<PersonWp8Model> removeList = new List<PersonWp8Model>();
foreach (PersonWp8Model tmpPerson in this.Persons)
{
if (tmpPerson.Functions.Count < 1)
{
removeList.Add(tmpPerson);
}
}
foreach (PersonWp8Model removePerson in removeList)
{
this.Persons.Remove(removePerson);
}
}
}
}

View File

@@ -180,7 +180,7 @@ namespace CampusAppWP8.Pages.Departments
FrameworkElement infoBtn = sender as FrameworkElement;
string chairName = ((this.lastClickedBtn as Button).Content as TextBlock).Text.ToString();
NavigationService.Navigate(new Uri(Constants.PathDepartment_DepartmentInfoPage + "?url=" + infoBtn.Tag.ToString() + "&name=" + chairName, UriKind.Relative));
NavigationService.Navigate(new Uri(Constants.PathDepartment_DepartmentInfoPage + "?" + Constants.ParamUrl + "=" + infoBtn.Tag.ToString() + "&" + Constants.ParamName + "=" + chairName, UriKind.Relative));
}
#endregion

View File

@@ -47,16 +47,7 @@ namespace CampusAppWP8.Pages.Departments
this.progressBar.Visibility = Visibility.Visible;
//// init feed objects
if (DepartmentIndexPage.feed == null)
{
DepartmentIndexPage.feed = new DepartmentFeed(false);
}
DepartmentIndexPage.feed.OnLoaded += new DepartmentFeed.OnIO(this.SetupFacultyList);
DepartmentIndexPage.feed.OnFailedWeb += new DepartmentFeed.OnFailed(this.FeedIsFailedWeb);
DepartmentIndexPage.feed.OnFailedFile += new DepartmentFeed.OnFailed(this.FeedIsFailedFile);
DepartmentIndexPage.feed.LoadData(Utilities.GetLoadModus<CampusAppWPortalLib8.Model.Departments.DepartmentModel>());
DepartmentIndexPage.InitFeed(this.SetupFacultyList, this.FeedIsFailedWeb, this.FeedIsFailedFile);
if (DepartmentIndexPage.favorite == null)
{
@@ -83,10 +74,7 @@ namespace CampusAppWP8.Pages.Departments
set
{
if (value != DepartmentIndexPage.feed)
{
DepartmentIndexPage.feed = value;
}
DepartmentIndexPage.feed = value;
}
}
@@ -179,6 +167,26 @@ namespace CampusAppWP8.Pages.Departments
{
}
/// <summary>
/// Initialize the feed objects and load the data.
/// </summary>
public static void InitFeed(DepartmentFeed.OnIO onLoaded = null, DepartmentFeed.OnIO failedWeb = null, DepartmentFeed.OnIO failedFile = null)
{
if (DepartmentIndexPage.feed == null)
{
DepartmentIndexPage.feed = new DepartmentFeed(false);
}
if(onLoaded != null)
DepartmentIndexPage.feed.OnLoaded += new DepartmentFeed.OnIO(onLoaded);
if(failedWeb != null)
DepartmentIndexPage.feed.OnFailedWeb += new DepartmentFeed.OnFailed(failedWeb);
if(failedFile != null)
DepartmentIndexPage.feed.OnFailedFile += new DepartmentFeed.OnFailed(failedFile);
DepartmentIndexPage.feed.LoadData(Utilities.GetLoadModus<CampusAppWPortalLib8.Model.Departments.DepartmentModel>());
}
/// <summary>
/// Setup the faculty list.
/// </summary>

View File

@@ -8,14 +8,23 @@
namespace CampusAppWP8.Pages.Departments
{
using System;
using System.Windows;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Departments;
/// <summary>
/// Info page of a chair.
/// </summary>
public partial class DepartmentInfoPage : PhoneApplicationPage
{
private bool feedLoadedFlag = false;
private string chairName = string.Empty;
#region Constructor
/// <summary>
@@ -41,15 +50,32 @@ namespace CampusAppWP8.Pages.Departments
{
base.OnNavigatedTo(e);
string url = string.Empty;
string chairName = string.Empty;
this.feedLoadedFlag = false;
if (NavigationContext.QueryString.TryGetValue("url", out url)
&& NavigationContext.QueryString.TryGetValue("name", out chairName))
string url = string.Empty;
if(NavigationContext.QueryString.TryGetValue(Constants.ParamName, out this.chairName))
{
this.PageHeadline.Text = this.chairName;
}
if (NavigationContext.QueryString.TryGetValue(Constants.ParamUrl, out url))
{
this.PageHeadline.Text = chairName;
this.WebBrowser.Navigate(new Uri(url, UriKind.Absolute));
}
else
{
CampusAppWP8.Feed.Departments.DepartmentFeed temp = DepartmentIndexPage.Feed;
if (temp != null)
{
this.OnFeedReady();
}
else
{
DepartmentIndexPage.InitFeed(this.OnFeedReady);
}
}
}
#endregion
@@ -64,6 +90,53 @@ namespace CampusAppWP8.Pages.Departments
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
}
/// <summary>
/// On feed ready.
/// </summary>
private void OnFeedReady()
{
if (this.feedLoadedFlag == false)
{
this.feedLoadedFlag = true;
DepartmentIndexPage.Feed.OnLoaded -= this.OnFeedReady;
ChairModel chair = null;
ObservableCollection<FacultyModel> tempModelList = DepartmentIndexPage.GetFeed().Model.Faculties;
foreach (CampusAppWPortalLib8.Model.Departments.FacultyModel model in tempModelList)
{
if (chair == null)
{
chair = model.GetChairModel(this.chairName);
}
}
if (chair != null)
{
this.WebBrowser.Navigate(new Uri(chair.Url, UriKind.Absolute));
}
else
{
MessageBoxResult res = MessageBox.Show(AppResources.DepartmentNotFound + " " + AppResources.DepartmentForwarding, string.Empty, MessageBoxButton.OKCancel);
switch (res)
{
case MessageBoxResult.OK:
{
NavigationService.Navigate(new Uri(Constants.PathDepartment_DepartmentIndexPage, UriKind.Relative));
}
break;
case MessageBoxResult.Cancel:
{
NavigationService.GoBack();
}
break;
}
}
}
}
#endregion

View File

@@ -205,7 +205,7 @@ namespace CampusAppWP8.Pages.Departments
FrameworkElement infoBtn = sender as FrameworkElement;
string chairName = ((this.lastClickedBtn as Button).Content as TextBlock).Text.ToString();
NavigationService.Navigate(new Uri(Constants.PathDepartment_DepartmentInfoPage + "?url=" + infoBtn.Tag.ToString() + "&name=" + chairName, UriKind.Relative));
NavigationService.Navigate(new Uri(Constants.PathDepartment_DepartmentInfoPage + "?" + Constants.ParamUrl + "=" + infoBtn.Tag.ToString() + "&" + Constants.ParamName + "=" + chairName, UriKind.Relative));
}
#endregion

View File

@@ -7,6 +7,7 @@
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -23,10 +24,13 @@
<ProgressBar x:Name="progressBar" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" IsIndeterminate="True"/>
<!-- Title and headline -->
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}" />
<!--
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
-->
<!-- Content -->
<ListBox x:Name="EventList" Grid.Row="1">
<ListBox.ItemContainerStyle>
@@ -39,7 +43,15 @@
<DataTemplate>
<Border BorderBrush="{StaticResource PhoneContrastBackgroundBrush}" Style="{StaticResource ListButtonBorder}">
<lui:NavigateButton Name="EventItem" QuerryStringValue="{Binding Index}" Url="{Binding Path=Constants.PathEvent_EventPage, Source={StaticResource Const}}" QuerryStringName="{Binding Path=Constants.ParamPivotIndex, Source={StaticResource Const}}" Style="{StaticResource ListButtonNoneBorder}" HorizontalContentAlignment="Left">
<TextBlock TextWrapping="Wrap" Text="{Binding Title}"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" TextWrapping="NoWrap" Text="{Binding ShortDate}" Margin="-8,0,10,0"/>
<TextBlock Grid.Column="1" TextWrapping="Wrap" Text="{Binding Title}"/>
</Grid>
</lui:NavigateButton>
</Border>
</DataTemplate>

View File

@@ -125,6 +125,26 @@ namespace CampusAppWP8.Pages.Events
base.OnNavigatedFrom(e);
}
/// <summary>
/// Methods overrides the OnOrientationChanged-Method.
/// </summary>
/// <param name="e">orientation changed event args.</param>
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
{
if (e.Orientation == PageOrientation.Landscape
|| e.Orientation == PageOrientation.LandscapeLeft
|| e.Orientation == PageOrientation.LandscapeRight)
{
ApplicationBar.Mode = ApplicationBarMode.Default;
}
else
{
ApplicationBar.Mode = ApplicationBarMode.Minimized;
}
base.OnOrientationChanged(e);
}
#endregion
#region private

View File

@@ -34,13 +34,13 @@
<Grid x:Name="EventTextGrid" Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="Auto" MaxHeight="300"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock x:Name="EventHeadline" Text="{Binding Path=Title, Mode=OneWay}" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="42"/>
<TextBlock x:Name="EventHeadline" Text="{Binding Path=Title, Mode=OneWay}" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}"/>
<ScrollViewer x:Name="EventTextScroll" Grid.Row="1">
<TextBlock x:Name="EventText" Text="{Binding Path=Text, Mode=OneWay}" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="24" />
<TextBlock x:Name="EventText" Text="{Binding Path=Text, Mode=OneWay}" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource PhoneTextNormalStyle}" />
</ScrollViewer>
</Grid>

View File

@@ -21,7 +21,7 @@ namespace CampusAppWP8.Pages.Events
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// EventPage, where every event fees has his own PivotItem.
/// EventPage, where every event feed has his own PivotItem.
/// </summary>
public partial class EventPage : PhoneApplicationPage
{

View File

@@ -7,6 +7,7 @@
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -16,9 +17,23 @@
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
<phone:Pivot Name="ExamPivot" Title="{Binding Path=LocalizedResources.ExaminationApp_Header, Source={StaticResource LocalizedStrings}}">
<phone:PivotItem Header="{Binding Path=LocalizedResources.Degree_Bachelor, Source={StaticResource LocalizedStrings}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<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>
<DataTemplate>
<Grid Margin="0,-36,0,0">
<TextBlock Text="{Binding}"/>
</Grid>
</DataTemplate>
</phone:Pivot.HeaderTemplate>
<phone:PivotItem Name="BachelorItem">
<ListBox x:Name="BachelorPanel" ItemsSource="{Binding Value}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
@@ -30,14 +45,14 @@
<DataTemplate>
<StackPanel>
<Button Tag="{Binding Link}" Style="{StaticResource ListButtonStyle}" Click="Button_Click">
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap"/>
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap" TextAlignment="Center"/>
</Button>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</phone:PivotItem>
<phone:PivotItem Header="{Binding Path=LocalizedResources.Degree_Master, Source={StaticResource LocalizedStrings}}">
<phone:PivotItem Name="MasterItem">
<ListBox x:Name="MasterPanel" ItemsSource="{Binding Value}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
@@ -49,14 +64,14 @@
<DataTemplate>
<StackPanel>
<Button Tag="{Binding Link}" Style="{StaticResource ListButtonStyle}" Click="Button_Click">
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap"/>
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap" TextAlignment="Center"/>
</Button>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</phone:PivotItem>
<phone:PivotItem Header="{Binding Path=LocalizedResources.Degree_Diploma, Source={StaticResource LocalizedStrings}}">
<phone:PivotItem Name="DiplomItem">
<ListBox x:Name="DiplomaPanel" ItemsSource="{Binding Value}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
@@ -68,7 +83,7 @@
<DataTemplate>
<StackPanel>
<Button Tag="{Binding Link}" Style="{StaticResource ListButtonStyle}" Click="Button_Click">
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap"/>
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap" TextAlignment="Center"/>
</Button>
</StackPanel>
</DataTemplate>

View File

@@ -38,6 +38,9 @@ namespace CampusAppWP8.Pages.Exams
public Exams()
{
this.InitializeComponent();
this.BachelorItem.Header = CampusAppWPortalLib8.Resources.AppResources.Degree_Bachelor;
this.MasterItem.Header = CampusAppWPortalLib8.Resources.AppResources.Degree_Master;
this.DiplomItem.Header = CampusAppWPortalLib8.Resources.AppResources.Degree_Diploma;
this.InitializeFeed();
}

View File

@@ -7,6 +7,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -22,17 +23,13 @@
</Grid.RowDefinitions>
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
<ProgressBar Name="ProgressBar" Grid.Row="1" Visibility="Collapsed" IsIndeterminate="True"/>
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextTitle2Style}"/>
<StackPanel Grid.Row="0">
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}"/>
</StackPanel>
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
<ScrollViewer Grid.Row="1" Margin="12,0,12,0">
<ScrollViewer Grid.Row="1" Margin="24,0,12,0">
<Grid x:Name="ContentPanel">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -160,7 +157,7 @@
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="5">
<Button Name="SearchButton" Click="SendRequest">
<Button Name="SearchButton" Click="SendRequest" HorizontalAlignment="Center">
<Image Name="SearchButtonImg" Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="60" />
</Button>
</Border>

View File

@@ -6,10 +6,12 @@
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:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
@@ -20,14 +22,12 @@
<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.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_DetailsHeader, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextTitle2Style}"/>
<StackPanel Grid.Row="0">
<header:DefaultHeader HeaderName="{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">
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="24,0,12,0">
<ScrollViewer>
<StackPanel>
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,0,0,0" Padding="0,12,0,12">
@@ -57,7 +57,11 @@
<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"/>
<lui:NavigateButton Url="{Binding Path=Constants.PathDepartment_DepartmentInfoPage, Source={StaticResource Const}}" QuerryStringName="{Binding Path=Constants.ParamName, Source={StaticResource Const}}" QuerryStringValue="{Binding Department}">
<TextBlock Text="{Binding Department}" TextWrapping="Wrap"/>
</lui:NavigateButton>
</StackPanel>
</Border>
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">

View File

@@ -8,6 +8,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -23,11 +24,10 @@
</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.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextTitle2Style}" />
<StackPanel Grid.Row="0">
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}"/>
</StackPanel>
<ListBox x:Name="ResultList" Grid.Row="1">
<ListBox x:Name="ResultList" Grid.Row="1" >
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
@@ -36,7 +36,7 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush="{StaticResource PhoneContrastBackgroundBrush}" Style="{StaticResource ListButtonBorder}">
<Border BorderBrush="{StaticResource PhoneContrastBackgroundBrush}" Style="{StaticResource ListButtonBorder}" Margin="12,0,0,0">
<StackPanel>
<lui:ToggleButton ToggleContentTag="{Binding Path=Constants.ToggleContent, Source={StaticResource Const}}" Style="{StaticResource ListButtonNoneBorder}" HorizontalContentAlignment="Left" >
<Grid HorizontalAlignment="Left">
@@ -52,7 +52,7 @@
<TextBlock Text="{Binding Type}" TextAlignment="Left" HorizontalAlignment="Left" />
<TextBlock Text=" : "/>
</StackPanel>
<Image Source="{Binding IconUrl}" Width="50" />
<Image Source="{Binding IconUrl}" Width="50" HorizontalAlignment="Left"/>
</StackPanel>
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Grid.Column="1" Grid.Row="0"/>
</Grid>

View File

@@ -7,19 +7,35 @@
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 HeaderName="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}"/>
</StackPanel>
<!--Pivotsteuerelement-->
<phone:Pivot Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}">
<phone:Pivot Grid.Row="1">
<!--Pivotelement eins-->
<phone:Pivot.HeaderTemplate>
<DataTemplate>
<Grid Margin="0,-36,0,0">
<TextBlock Text="{Binding}"/>
</Grid>
</DataTemplate>
</phone:Pivot.HeaderTemplate>
<phone:PivotItem Header="{Binding Path=LocalizedResources.LinkApp_CommonLinks, Source={StaticResource LocalizedStrings}}">
<ListBox x:Name="CommonLinkPanel">
<ListBox.ItemContainerStyle>
@@ -50,7 +66,7 @@
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<lui:LinkButton Style="{StaticResource ListButtonStyle}" Content="{Binding Title}" Url="{Binding Link}"/>
<lui:LinkButton Style="{StaticResource ListButtonStyle}" Content="{Binding Title}" Url="{Binding Link}" HorizontalContentAlignment="Center"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>

View File

@@ -208,6 +208,24 @@ namespace CampusAppWP8.Pages.Links
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
}
}
/// <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

View File

@@ -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" >

View File

@@ -230,8 +230,9 @@ 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.SetHolidayCaption(AppResources.MensaApp_CloseMensa);
this.MensaPivot.ItemsSource = this.feed.Model.Menus;
this.MensaPivot.SelectedIndex = this.selectedIndex;
}
@@ -358,6 +359,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

View File

@@ -7,6 +7,7 @@
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -23,10 +24,13 @@
<ProgressBar x:Name="progressBar" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" IsIndeterminate="True"/>
<!-- Title and headline -->
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}"/>
<!--
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
-->
<!-- Content -->
<ListBox x:Name="NewsList" Grid.Row="1">
<ListBox.ItemContainerStyle>
@@ -39,7 +43,15 @@
<DataTemplate>
<Border BorderBrush="{StaticResource PhoneContrastBackgroundBrush}" Style="{StaticResource ListButtonBorder}">
<lui:NavigateButton Name="NewsItem" QuerryStringValue="{Binding Index}" Url="{Binding Path=Constants.PathNews_NewsPage, Source={StaticResource Const}}" QuerryStringName="{Binding Path=Constants.ParamPivotIndex, Source={StaticResource Const}}" Style="{StaticResource ListButtonNoneBorder}" HorizontalContentAlignment="Left">
<TextBlock TextWrapping="Wrap" Text="{Binding Title}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" TextWrapping="NoWrap" Text="{Binding ShortDate}" Margin="-8, 0, 10, 0"/>
<TextBlock Grid.Column="1" TextWrapping="Wrap" Text="{Binding Title}" />
</Grid>
</lui:NavigateButton>
</Border>
</DataTemplate>

View File

@@ -125,6 +125,26 @@ namespace CampusAppWP8.Pages.News
#region private
/// <summary>
/// Methods overrides the OnOrientationChanged-Method.
/// </summary>
/// <param name="e">orientation changed event args.</param>
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
{
if (e.Orientation == PageOrientation.LandscapeRight
|| e.Orientation == PageOrientation.LandscapeLeft
|| e.Orientation == PageOrientation.Landscape)
{
ApplicationBar.Mode = ApplicationBarMode.Default;
}
else
{
ApplicationBar.Mode = ApplicationBarMode.Minimized;
}
base.OnOrientationChanged(e);
}
/// <summary>
/// Is called after the RSS feeds are loaded into the newsFeed model.
/// If there was no feed information set to the UI, the feed list

View File

@@ -33,13 +33,13 @@
<Grid x:Name="NewsTextGrid" Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="Auto" MaxHeight="300"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock x:Name="NewsHeadline" Text="{Binding Path=Title, Mode=OneWay}" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="42"/>
<TextBlock x:Name="NewsHeadline" Text="{Binding Path=Title, Mode=OneWay}" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}"/>
<ScrollViewer Grid.Row="1">
<TextBlock x:Name="NewsText" Text="{Binding Path=Text, Mode=OneWay}" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="24" />
<TextBlock x:Name="NewsText" Text="{Binding Path=Text, Mode=OneWay}" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource PhoneTextNormalStyle}" />
</ScrollViewer>
</Grid>

View File

@@ -150,6 +150,24 @@ namespace CampusAppWP8.Pages.News
}
}
/*
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
{
if (e.Orientation == PageOrientation.Landscape
|| e.Orientation == PageOrientation.LandscapeLeft
|| e.Orientation == PageOrientation.LandscapeRight)
{
ApplicationBar.Mode = ApplicationBarMode.Default;
}
else
{
ApplicationBar.Mode = ApplicationBarMode.Minimized;
}
base.OnOrientationChanged(e);
}
*/
/// <summary>
/// Called when the index of the selected PivotItem is changed.
/// Set the text Grid to visible and the WebBrowser to collapsed.

View File

@@ -7,6 +7,7 @@
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -21,12 +22,10 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ProgressBar Name="ProgressBar" Grid.Row="1" Visibility="Collapsed" IsIndeterminate="True"/>
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=LocalizedResources.PersonApp_Header, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
<StackPanel Grid.Row="0">
<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-->
@@ -46,7 +45,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBox Name="SearchName" AcceptsReturn="False" Grid.Column="0" InputScope="PersonalSurname"/>
<TextBox Name="SearchName" AcceptsReturn="False" KeyDown="SearchName_KeyDown" Grid.Column="0" InputScope="PersonalSurname" VerticalAlignment="Center" />
<Button Grid.Column="1" Click="SendRequest">
<Image Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="50"/>
</Button>
@@ -105,10 +104,10 @@
</StackPanel>
<TextBlock Text="{Binding Building}" Grid.Row="2" Grid.Column="1" TextWrapping="Wrap"/>
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
<lui:EmailButton EmailAddress="{Binding Mail}" Height="100" />
<lui:PhoneButton Number="{Binding Tel1}" Height="100" />
<lui:AddPersonButton Height="100" Click="Button_Click" PersonId="{Binding PersonID}" FunctionIndex="{Binding FunctionIndex}" />
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal" Margin="0,0,0,0">
<lui:EmailButton EmailAddress="{Binding Mail}" Height="100" Margin="0,0,0,0" />
<lui:PhoneButton Number="{Binding Tel1}" Height="100" Margin="0,0,0,0"/>
<lui:AddPersonButton Height="100" Click="Button_Click" PersonId="{Binding PersonID}" FunctionIndex="{Binding FunctionIndex}" Margin="0,0,0,0"/>
</StackPanel>
</Grid>
</Border>

View File

@@ -8,8 +8,8 @@
namespace CampusAppWP8.Pages.Person
{
using System.Collections.Generic;
using System.Windows;
using System.Windows.Input;
using CampusAppWP8.Api.Person;
using CampusAppWP8.Model.Person;
using CampusAppWP8.Resources;
@@ -18,6 +18,7 @@ namespace CampusAppWP8.Pages.Person
using CampusAppWPortalLib8.Model.Utility;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
using System.Collections.Generic;
/// <summary>Person page.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
@@ -97,6 +98,10 @@ namespace CampusAppWP8.Pages.Person
{
this.api.Model.RemoveNonFunctionAndSetIdsPerson();
this.ResultBox.ItemsSource = this.api.Model.Persons;
if (this.api.Model == null || this.api.Model.Persons == null || this.api.Model.Persons.Count < 1)
{
MessageBoxes.ShowMainModelInfoMessageBox(AppResources.MsgBox_NoResult);
}
}
/// <summary>Event handler. Called by Button for click events.</summary>
@@ -138,6 +143,15 @@ namespace CampusAppWP8.Pages.Person
saveContactTask.Show();
}
private void SearchName_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
this.SendRequest(sender,e);
}
}
#endregion
}
}

View File

@@ -7,6 +7,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -22,12 +23,11 @@
</Grid.RowDefinitions>
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
<ProgressBar Name="ProgressBar" Grid.Row="1" Visibility="Collapsed" IsIndeterminate="True"/>
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=LocalizedResources.Setting_User, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextTitle2Style}"/>
<StackPanel Grid.Row="0">
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.Setting_User, Source={StaticResource LocalizedStrings}}"/>
</StackPanel>
<ScrollViewer Grid.Row="1">
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
<Grid x:Name="ContentPanel" Margin="12,0,12,0">

View File

@@ -195,6 +195,24 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Möchten Sie Weiter zur Lehstuhlübersicht? ähnelt.
/// </summary>
public static string DepartmentForwarding {
get {
return ResourceManager.GetString("DepartmentForwarding", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Der angegebene Lehrstuhl konnte nicht gefunden werden. ähnelt.
/// </summary>
public static string DepartmentNotFound {
get {
return ResourceManager.GetString("DepartmentNotFound", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Events ähnelt.
/// </summary>
@@ -456,6 +474,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>

View File

@@ -437,4 +437,13 @@
<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>
<data name="DepartmentForwarding" xml:space="preserve">
<value>Möchten Sie Weiter zur Lehstuhlübersicht?</value>
</data>
<data name="DepartmentNotFound" xml:space="preserve">
<value>Der angegebene Lehrstuhl konnte nicht gefunden werden.</value>
</data>
</root>

View File

@@ -555,4 +555,7 @@
<data name="DeploymentNumber" xml:space="preserve">
<value>3</value>
</data>
<data name="ParamName" xml:space="preserve">
<value>name</value>
</data>
</root>

View File

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

View File

@@ -0,0 +1,12 @@
<UserControl
x:Class="CampusAppWP8.Utility.Lui.Header.DefaultHeader"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<StackPanel Margin="12,17,0,28">
<TextBlock Text="{Binding Path=AppTitle}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=HeaderName}" Margin="9,0,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,66 @@
//-----------------------------------------------------------------------------
// <copyright file="DefaultHeader.xaml.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>07.10.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Utility.Lui.Header
{
using System.Windows;
using System.Windows.Controls;
using CampusAppWP8.Resources;
/// <summary>
/// Default Header Template.
/// </summary>
public partial class DefaultHeader : UserControl
{
/// <summary>AppTitle property object.</summary>
public static readonly DependencyProperty AppTitleProperty = DependencyProperty.Register("AppTitle", typeof(string), typeof(DefaultHeader), new PropertyMetadata(null));
/// <summary>HeaderName property object.</summary>
public static readonly DependencyProperty HeaderNameProperty = DependencyProperty.Register("HeaderName", typeof(string), typeof(DefaultHeader), new PropertyMetadata(null));
/// <summary>
/// Initializes a new instance of the <see cref="DefaultHeader" /> class.
/// </summary>
public DefaultHeader()
{
this.InitializeComponent();
this.AppTitle = AppResources.ApplicationTitle;
}
/// <summary>
/// Gets or sets the AppTitle property.
/// </summary>
public string AppTitle
{
get
{
return (string)this.GetValue(AppTitleProperty);
}
set
{
this.SetValue(AppTitleProperty, value);
}
}
/// <summary>
/// Gets or sets the HeaderName property.
/// </summary>
public string HeaderName
{
get
{
return (string)this.GetValue(HeaderNameProperty);
}
set
{
this.SetValue(HeaderNameProperty, value);
}
}
}
}

View File

@@ -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;
}
}

View File

@@ -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
}
}

View File

@@ -16,7 +16,7 @@ namespace CampusAppWPortalLib8.Model.Person
/// <remarks>Stubbfel, 05.09.2013.</remarks>
/// <typeparam name="T">personModel template</typeparam>
[XmlRoot("Uebersicht")]
public class PersonListModel<T>
public abstract class PersonListModel<T>
{
#region Property
@@ -76,28 +76,8 @@ namespace CampusAppWPortalLib8.Model.Person
/// <summary>Removes the non function person.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
public void RemoveNonFunctionPerson()
{
List<T> removeList = new List<T>();
foreach (T item in this.Persons)
{
IPersonModel<IPersonFunctionModel> tmpPerson = item as IPersonModel<IPersonFunctionModel>;
if (tmpPerson == null)
{
continue;
}
if (tmpPerson.Functions.Count < 1)
{
removeList.Add(item);
}
}
foreach (T removePerson in removeList)
{
this.Persons.Remove(removePerson);
}
}
public abstract void RemoveNonFunctionPerson();
#endregion
}

View File

@@ -135,6 +135,18 @@ namespace CampusAppWPortalLib8.Model.RSS
}
}
/// <summary>
/// Gets the date of the timestamp as string.
/// example: 25.06.
/// </summary>
public string ShortDate
{
get
{
return string.Format("{0:dd.MM.}", this.timestamp);
}
}
/// <summary>
/// Gets the time of the timestamp as string.
/// example: 12:56.

View File

@@ -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>

View File

@@ -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>

View File

@@ -179,6 +179,7 @@
<Content Include="srcImages\listicons\lecture.svg" />
<Content Include="srcImages\listicons\practise.svg" />
<Content Include="srcImages\listicons\seminar.svg" />
<Content Include="srcImages\listicons\speaker.svg" />
<Content Include="srcImages\optionbuttons\add.svg" />
<Content Include="srcImages\optionbuttons\add_contact.svg" />
<Content Include="srcImages\optionbuttons\add_small.svg" />