diff --git a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs
index 337b65d8..72142fa0 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs
@@ -16,6 +16,8 @@ namespace CampusAppWP8.Pages.Exams
using CampusAppWP8.Utility;
using CampusAppWP8.Utility.Lui.MessageBoxes;
using Microsoft.Phone.Controls;
+ using System.Threading;
+ using System;
/// class of ExamsPage.
/// Stubbfel, 02.09.2013.
@@ -63,7 +65,9 @@ namespace CampusAppWP8.Pages.Exams
this.InitializeFeed();
}
- this.feed.LoadData(Utilities.GetLoadModus());
+ Thread thread = new Thread(new ThreadStart(this.LoadingFeed));
+ thread.Start();
+
}
///
@@ -88,6 +92,14 @@ namespace CampusAppWP8.Pages.Exams
#region private
+ /// Loading feed.
+ /// Stubbfel, 14.10.2013.
+ private void LoadingFeed()
+ {
+ this.feed.LoadData(Utilities.GetLoadModus());
+ }
+
+
/// Method initialize the Feed.
/// Stubbfel, 02.09.2013.
private void InitializeFeed()
@@ -102,8 +114,17 @@ namespace CampusAppWP8.Pages.Exams
/// Stubbfel, 02.09.2013.
private void FeedIsReady()
{
- this.SetupExamList();
- this.DefHeader.ProgressVisibility = Visibility.Collapsed;
+ if (this.Dispatcher != null)
+ {
+ this.Dispatcher.BeginInvoke(new Action(() => this.SetupExamList()));
+ this.Dispatcher.BeginInvoke(new Action(() => this.DefHeader.ProgressVisibility = Visibility.Collapsed));
+ }
+ else
+ {
+ this.SetupExamList();
+ this.DefHeader.ProgressVisibility = Visibility.Collapsed;
+
+ }
}
/// Executes the PDF reader operation.
@@ -173,7 +194,14 @@ namespace CampusAppWP8.Pages.Exams
/// Stubbfel, 02.09.2013.
private void FeedIsFailWeb()
{
- MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
+ if (this.Dispatcher != null)
+ {
+ this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb)));
+ }
+ else
+ {
+ MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
+ }
this.feed.ForceReadFile();
}
@@ -181,8 +209,16 @@ namespace CampusAppWP8.Pages.Exams
/// Stubbfel, 02.09.2013.
private void FeedIsFailFile()
{
- MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
- this.DefHeader.ProgressVisibility = Visibility.Collapsed;
+ if (this.Dispatcher != null)
+ {
+ this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile)));
+ this.Dispatcher.BeginInvoke(new Action(() => this.DefHeader.ProgressVisibility = Visibility.Collapsed));
+ }
+ else
+ {
+ MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
+ this.DefHeader.ProgressVisibility = Visibility.Collapsed;
+ }
}
/// Event handler. Called by Button for click events.