Merge branch 'feature/#229' into develop
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -20,12 +21,8 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ProgressBar x:Name="progressBar" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" 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.Favorites, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
|
||||
</StackPanel>
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.Favorites, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<ListBox x:Name="ContentPanel" ItemsSource="{Binding Chairs}" Grid.Row="1" Margin="12,0,12,0">
|
||||
@@ -39,8 +36,8 @@
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<!--chair main button-->
|
||||
<Button Tag="{Binding Url}" Click="ChairTB_Click" HorizontalContentAlignment="Left">
|
||||
<TextBlock Text="{Binding Name}" HorizontalAlignment="Stretch" TextWrapping="Wrap" FontSize="24"/>
|
||||
<Button Tag="{Binding Url}" Click="ChairTB_Click" HorizontalContentAlignment="Left" Style="{StaticResource ListButtonStyle}">
|
||||
<TextBlock Text="{Binding Name}" HorizontalAlignment="Stretch" TextWrapping="Wrap"/>
|
||||
</Button>
|
||||
<StackPanel Visibility="Collapsed">
|
||||
<!--delete button-->
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
if (this.isNewInstance)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
this.isSourceSet = true;
|
||||
}
|
||||
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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}"
|
||||
@@ -18,16 +19,12 @@
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ProgressBar x:Name="progressBar" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" 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.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
|
||||
</StackPanel>
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<ListBox x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
@@ -38,7 +35,7 @@
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<!--favorite button-->
|
||||
<Button x:Name="Favorite" Click="FavoriteBtn_Click" HorizontalContentAlignment="Left">
|
||||
<Button x:Name="Favorite" Click="FavoriteBtn_Click" HorizontalContentAlignment="Left" Style="{StaticResource ListButtonStyle}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="64"/>
|
||||
@@ -61,7 +58,7 @@
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!--faculty button-->
|
||||
<Button Tag="{Binding Id}" Click="FacultyBtn_Click" HorizontalContentAlignment="Left">
|
||||
<Button Tag="{Binding Id}" Click="FacultyBtn_Click" HorizontalContentAlignment="Left" Style="{StaticResource ListButtonStyle}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="64"/>
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
public DepartmentIndexPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
//// init feed objects
|
||||
DepartmentIndexPage.InitFeed(this.SetupFacultyList, this.FeedIsFailedWeb, this.FeedIsFailedFile);
|
||||
@@ -193,7 +193,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
private void SetupFacultyList()
|
||||
{
|
||||
this.FacultyList.ItemsSource = DepartmentIndexPage.feed.Model.Faculties;
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -259,7 +259,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
/// </summary>
|
||||
private void FeedIsFailedFile()
|
||||
{
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
@@ -21,11 +22,8 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--title-->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
<TextBlock x:Name="PageHeadline" Text="Seitenname" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="36" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<!--webbrowser-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
|
||||
if(NavigationContext.QueryString.TryGetValue(Constants.ParamName, out this.chairName))
|
||||
{
|
||||
this.PageHeadline.Text = this.chairName;
|
||||
this.DefHeader.HeaderName = this.chairName;
|
||||
}
|
||||
|
||||
if (NavigationContext.QueryString.TryGetValue(Constants.ParamUrl, out url))
|
||||
@@ -137,7 +137,6 @@ namespace CampusAppWP8.Pages.Departments
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewModel="clr-namespace:CampusAppWP8.Model.Departments"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -17,13 +17,20 @@
|
||||
|
||||
<!-- LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<ProgressBar x:Name="progressBar" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<!-- Pivot -->
|
||||
<phone:Pivot x:Name="DepartmentPivot" Title="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" ItemsSource="{Binding Faculties}">
|
||||
<phone:Pivot x:Name="DepartmentPivot" Grid.Row="1" ItemsSource="{Binding Faculties}">
|
||||
<!-- Pivotitem template -->
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Name, Mode=OneWay}" />
|
||||
<TextBlock Text="{Binding Path=Name, Mode=OneWay}" Margin="0,-36,0,0"/>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
@@ -39,8 +46,8 @@
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<!--chair button-->
|
||||
<Button Tag="{Binding Url}" Click="ChairTB_Click" HorizontalContentAlignment="Left">
|
||||
<TextBlock Text="{Binding Name}" HorizontalAlignment="Stretch" TextWrapping="Wrap" FontSize="24"/>
|
||||
<Button Tag="{Binding Url}" Click="ChairTB_Click" HorizontalContentAlignment="Left" Style="{StaticResource ListButtonStyle}">
|
||||
<TextBlock Text="{Binding Name}" HorizontalAlignment="Stretch" TextWrapping="Wrap"/>
|
||||
</Button>
|
||||
<StackPanel Visibility="Collapsed">
|
||||
<!--add to favorite button-->
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
if (this.isNewInstance)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
}
|
||||
}
|
||||
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -22,9 +22,8 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<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}}" />
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" 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}"/>
|
||||
@@ -32,7 +31,7 @@
|
||||
</StackPanel>
|
||||
-->
|
||||
<!-- Content -->
|
||||
<ListBox x:Name="EventList" Grid.Row="1">
|
||||
<ListBox x:Name="EventList" Grid.Row="1" Margin="12,0,12,0">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
@@ -41,19 +40,9 @@
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<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">
|
||||
<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>
|
||||
<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 ListButtonStyle}" HorizontalContentAlignment="Left">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding Title}"/>
|
||||
</lui:NavigateButton>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CampusAppWP8.Pages.Events
|
||||
public EventIndexPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
ApplicationBarIconButton updateBtn = new ApplicationBarIconButton();
|
||||
updateBtn.IconUri = new Uri(Icons.Update, UriKind.Relative);
|
||||
@@ -156,8 +156,9 @@ namespace CampusAppWP8.Pages.Events
|
||||
/// </summary>
|
||||
private void SetupEventPageList()
|
||||
{
|
||||
EventIndexPage.eventFeed.Model.Channel[0].OrderByDate();
|
||||
this.EventList.ItemsSource = EventIndexPage.eventFeed.Model.Channel[0].Item;
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -168,7 +169,7 @@ namespace CampusAppWP8.Pages.Events
|
||||
/// <param name="e">event args</param>
|
||||
private void EventForceUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
EventIndexPage.eventFeed.ForceWebUpdate();
|
||||
}
|
||||
|
||||
@@ -187,7 +188,7 @@ namespace CampusAppWP8.Pages.Events
|
||||
private void FeedIsFailedFile()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -14,14 +15,20 @@
|
||||
shell:SystemTray.IsVisible="True">
|
||||
<!-- LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<ProgressBar x:Name="progressBar" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<!-- Pivotpage -->
|
||||
<phone:Pivot x:Name="EventPivot" Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" SelectionChanged="OnPivotSelectionChange">
|
||||
<phone:Pivot x:Name="EventPivot" Grid.Row="1" SelectionChanged="OnPivotSelectionChange">
|
||||
<!-- Pivotitem template -->
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Date, Mode=OneWay}" />
|
||||
<TextBlock Text="{Binding Path=Date, Mode=OneWay}" Margin="0,-36,0,0"/>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace CampusAppWP8.Pages.Events
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
if (this.isNewInstance)
|
||||
{
|
||||
@@ -147,7 +147,7 @@ namespace CampusAppWP8.Pages.Events
|
||||
}
|
||||
}
|
||||
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
<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>
|
||||
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<!--Pivotsteuerelement-->
|
||||
<phone:Pivot Grid.Row="1">
|
||||
<!--Pivotelement eins-->
|
||||
|
||||
@@ -65,7 +65,8 @@ namespace CampusAppWP8.Pages.Links
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
this.InitializeFeeds();
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
//this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
this.loadingFeeds = 2;
|
||||
this.commonLinkFeed.LoadData(Utilities.GetLoadModus<CampusAppWPortalLib8.Model.Link.LinkListModel>());
|
||||
this.clubLinkFeed.LoadData(Utilities.GetLoadModus<CampusAppWPortalLib8.Model.Link.LinkListModel>());
|
||||
@@ -165,7 +166,8 @@ namespace CampusAppWP8.Pages.Links
|
||||
private void LinkForceUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.loadingFeeds = 2;
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
//this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
this.commonLinkFeed.ForceWebUpdate();
|
||||
this.clubLinkFeed.ForceWebUpdate();
|
||||
}
|
||||
@@ -205,7 +207,8 @@ namespace CampusAppWP8.Pages.Links
|
||||
this.loadingFeeds--;
|
||||
if (this.loadingFeeds < 1)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
//this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,8 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<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}}"/>
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" 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}"/>
|
||||
@@ -32,7 +31,7 @@
|
||||
</StackPanel>
|
||||
-->
|
||||
<!-- Content -->
|
||||
<ListBox x:Name="NewsList" Grid.Row="1">
|
||||
<ListBox x:Name="NewsList" Grid.Row="1" Margin="12,0,12,0">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
@@ -41,19 +40,17 @@
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<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">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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 ListButtonStyle}" HorizontalContentAlignment="Left">
|
||||
<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>
|
||||
<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>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CampusAppWP8.Pages.News
|
||||
public NewsIndexPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
|
||||
ApplicationBarIconButton updateBtn = new ApplicationBarIconButton();
|
||||
updateBtn.IconUri = new Uri(Icons.Update, UriKind.Relative);
|
||||
@@ -152,8 +152,9 @@ namespace CampusAppWP8.Pages.News
|
||||
/// </summary>
|
||||
private void SetupNewsPageList()
|
||||
{
|
||||
NewsIndexPage.newsFeed.Model.Channel[0].OrderByDate();
|
||||
this.NewsList.ItemsSource = NewsIndexPage.newsFeed.Model.Channel[0].Item;
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -164,7 +165,7 @@ namespace CampusAppWP8.Pages.News
|
||||
/// <param name="e">event args</param>
|
||||
private void NewsForceUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
NewsIndexPage.newsFeed.ForceWebUpdate();
|
||||
}
|
||||
|
||||
@@ -182,7 +183,7 @@ namespace CampusAppWP8.Pages.News
|
||||
/// </summary>
|
||||
private void FeedIsFailFile()
|
||||
{
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -14,14 +15,20 @@
|
||||
shell:SystemTray.IsVisible="True">
|
||||
<!-- LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<!-- Pivotpage -->
|
||||
<ProgressBar x:Name="progressBar" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<phone:Pivot x:Name="NewsPivot" Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" SelectionChanged="OnPivotSelectionChange">
|
||||
<phone:Pivot x:Name="NewsPivot" Grid.Row="1" SelectionChanged="OnPivotSelectionChange">
|
||||
<!-- Pivotitem template -->
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Date, Mode=OneWay}" />
|
||||
<TextBlock Text="{Binding Path=Date, Mode=OneWay}" Margin="0,-36,0,0"/>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace CampusAppWP8.Pages.News
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
if (this.isNewInstance)
|
||||
{
|
||||
@@ -128,7 +128,7 @@ namespace CampusAppWP8.Pages.News
|
||||
}
|
||||
}
|
||||
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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,9 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ProgressBar x:Name="progressBar" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<!-- Title and headline -->
|
||||
<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.OpenHoursApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="64"/>
|
||||
</StackPanel>
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.OpenHoursApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<!-- Content -->
|
||||
<ListBox x:Name="InstitutionPanel" Grid.Row="1">
|
||||
<ListBox.ItemContainerStyle>
|
||||
@@ -37,7 +35,7 @@
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<StackPanel Margin="12,0,12,0">
|
||||
<lui:ToggleButton Content="{Binding Title}" ToggleContentTag="{Binding Path=Constants.ToggleContent, Source={StaticResource Const}}" Style="{StaticResource ListButtonStyle}"/>
|
||||
<StackPanel Visibility="Collapsed" Tag="{Binding Path=Constants.ToggleContent, Source={StaticResource Const}}">
|
||||
<Grid>
|
||||
@@ -114,11 +112,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--mail button-->
|
||||
<lui:EmailButton Grid.Column="0" EmailAddress="{Binding EMail}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisibleEMail}" Padding="0" Margin="-10"/>
|
||||
<lui:EmailButton Grid.Column="0" EmailAddress="{Binding EMail}" Height="100" Visibility="{Binding VisibleEMail}" Padding="0" Margin="-10"/>
|
||||
<!--phone button-->
|
||||
<lui:PhoneButton Grid.Column="1" Number="{Binding Phone}" DisplayName="{Binding Title}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisiblePhone}" Padding="0" Margin="-10"/>
|
||||
<lui:PhoneButton Grid.Column="1" Number="{Binding Phone}" DisplayName="{Binding Title}" Height="100" Visibility="{Binding VisiblePhone}" Padding="0" Margin="-10"/>
|
||||
<!--location button -->
|
||||
<lui:GoToMapButton Grid.Column="2" SearchTerm="{Binding Building}" BorderBrush="Transparent" Background="Transparent" Height="100" Visibility="{Binding VisibleBuilding}" Padding="0" Margin="-10" />
|
||||
<lui:GoToMapButton Grid.Column="2" SearchTerm="{Binding Building}" Height="100" Visibility="{Binding VisibleBuilding}" Padding="0" Margin="-10" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
public OpeninghoursPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
|
||||
if (this.feed == null)
|
||||
{
|
||||
@@ -108,6 +108,31 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTapGrid(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override 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 = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
|
||||
}
|
||||
|
||||
base.OnOrientationChanged(e);
|
||||
}
|
||||
|
||||
// protected
|
||||
#endregion
|
||||
|
||||
@@ -119,7 +144,7 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
private void FeedIsReady()
|
||||
{
|
||||
this.InstitutionPanel.ItemsSource = this.feed.Model.Institutions;
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
|
||||
// this.feed.SaveData(true);
|
||||
}
|
||||
@@ -132,7 +157,7 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
/// <param name="e">event args</param>
|
||||
private void OpenHoursForceUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.progressBar.Visibility = Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Visible;
|
||||
this.feed.ForceWebUpdate();
|
||||
}
|
||||
|
||||
@@ -150,7 +175,7 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
/// </summary>
|
||||
private void FeedIsFailedFile()
|
||||
{
|
||||
this.progressBar.Visibility = Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = Visibility.Collapsed;
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
@@ -16,13 +17,21 @@
|
||||
|
||||
<!--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="StudentCouncilPivot" Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--header-->
|
||||
<header:DefaultHeader x:Name="DefHeader" Grid.Row="0" HeaderName="{Binding Path=LocalizedResources.OSAApp_Title, Source={StaticResource LocalizedStrings}}"/>
|
||||
|
||||
<!--pivot-->
|
||||
<phone:Pivot Name="StudentCouncilPivot" Grid.Row="1">
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Key}" />
|
||||
<TextBlock Text="{Binding Key}" Margin="0,-36,0,0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -39,7 +48,9 @@
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<lui:ToggleButton Content="{Binding Name}" ToggleContentTag="{Binding Path=Constants.ToggleContent, Source={StaticResource Const}}" Style="{StaticResource ListButtonStyle}"/>
|
||||
<lui:ToggleButton ToggleContentTag="{Binding Path=Constants.ToggleContent, Source={StaticResource Const}}" Style="{StaticResource ListButtonStyle}">
|
||||
<TextBlock Text="{Binding Name}" TextWrapping="Wrap"/>
|
||||
</lui:ToggleButton>
|
||||
<StackPanel Tag="{Binding Path=Constants.ToggleContent, Source={StaticResource Const}}" Orientation="Horizontal" HorizontalAlignment="Center" Visibility="Collapsed">
|
||||
<lui:LinkButton Height="75" Url="{Binding Url}" />
|
||||
<lui:EmailButton Height="75" EmailAddress="{Binding Email}"/>
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
this.InitializeFeed();
|
||||
}
|
||||
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = System.Windows.Visibility.Visible;
|
||||
this.feed.LoadData(Utilities.GetLoadModus<CampusAppWPortalLib8.Model.StudentCouncil.StudentCouncilListModel>());
|
||||
}
|
||||
|
||||
@@ -72,6 +72,26 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
this.feed.SaveData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnOrientationChanged method.
|
||||
/// </summary>
|
||||
/// <param name="e">orientation changed args.</param>
|
||||
protected override void OnOrientationChanged(OrientationChangedEventArgs e)
|
||||
{
|
||||
if (e.Orientation == PageOrientation.Landscape
|
||||
|| e.Orientation == PageOrientation.LandscapeLeft
|
||||
|| e.Orientation == PageOrientation.LandscapeRight)
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
|
||||
}
|
||||
|
||||
base.OnOrientationChanged(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region private
|
||||
|
||||
@@ -92,7 +112,7 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
private void FeedIsReady()
|
||||
{
|
||||
this.SetupStudentCouncilPivot();
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -111,7 +131,7 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
/// <param name="e">event args</param>
|
||||
private void StudentForceUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.DefHeader.ProgressVisibility = System.Windows.Visibility.Visible;
|
||||
this.feed.ForceWebUpdate();
|
||||
}
|
||||
|
||||
@@ -130,7 +150,7 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
private void FeedIsFailFile()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
this.DefHeader.ProgressVisibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
<StackPanel Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=AppTitle}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
<Grid Height="6">
|
||||
<ProgressBar Visibility="{Binding Path=ProgressVisibility}" IsIndeterminate="True"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding Path=HeaderName}" Margin="9,0,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -21,7 +21,10 @@ namespace CampusAppWP8.Utility.Lui.Header
|
||||
|
||||
/// <summary>HeaderName property object.</summary>
|
||||
public static readonly DependencyProperty HeaderNameProperty = DependencyProperty.Register("HeaderName", typeof(string), typeof(DefaultHeader), new PropertyMetadata(null));
|
||||
|
||||
|
||||
/// <summary>ProgressVisibility property object.</summary>
|
||||
public static readonly DependencyProperty ProgressVisibilityProperty = DependencyProperty.Register("ProgressVisibility", typeof(Visibility), typeof(DefaultHeader), new PropertyMetadata(null));
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultHeader" /> class.
|
||||
/// </summary>
|
||||
@@ -29,6 +32,7 @@ namespace CampusAppWP8.Utility.Lui.Header
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.AppTitle = AppResources.ApplicationTitle;
|
||||
this.ProgressVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -62,5 +66,18 @@ namespace CampusAppWP8.Utility.Lui.Header
|
||||
this.SetValue(HeaderNameProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility ProgressVisibility
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Visibility)this.GetValue(ProgressVisibilityProperty);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(ProgressVisibilityProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
@@ -60,6 +61,30 @@ namespace CampusAppWPortalLib8.Model.RSS
|
||||
|
||||
#region Method
|
||||
|
||||
public void OrderByDate(bool asc = false)
|
||||
{
|
||||
this.item.CollectionChanged -= this.OnListChanged;
|
||||
|
||||
if (asc == false)
|
||||
{
|
||||
var sortedOC = from elem in this.item
|
||||
orderby elem.DTTimestamp descending
|
||||
select elem;
|
||||
|
||||
this.item = new ObservableCollection<RSSModel>(sortedOC);
|
||||
this.item.CollectionChanged += new NotifyCollectionChangedEventHandler(this.OnListChanged);
|
||||
}
|
||||
else
|
||||
{
|
||||
var sortedOC = from elem in this.item
|
||||
orderby elem.DTTimestamp ascending
|
||||
select elem;
|
||||
|
||||
this.item = new ObservableCollection<RSSModel>(sortedOC);
|
||||
this.item.CollectionChanged += new NotifyCollectionChangedEventHandler(this.OnListChanged);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called when the item list has changed.
|
||||
/// Here used for the add event.
|
||||
|
||||
Reference in New Issue
Block a user