diff --git a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs
index 8800886d..e85a87b6 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs
@@ -67,6 +67,15 @@ namespace CampusAppWP8.Pages.Links
this.clubLinkFeed.LoadData();
}
+ ///
+ /// Override the OnNavigatedTo method
+ ///
+ /// Arguments of navigation
+ protected override void OnNavigatedFrom(NavigationEventArgs e)
+ {
+ this.clubLinkFeed.SaveData();
+ this.commonLinkFeed.SaveData();
+ }
#endregion
#region private
@@ -114,9 +123,9 @@ namespace CampusAppWP8.Pages.Links
if (this.loadingFeeds < 1)
{
- this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
+ this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
}
- this.commonLinkFeed.SaveData();
+
}
///
@@ -129,8 +138,7 @@ namespace CampusAppWP8.Pages.Links
if (this.loadingFeeds < 1)
{
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
- }
- this.clubLinkFeed.SaveData();
+ }
}
///
diff --git a/CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs b/CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs
index ebb30a38..665a004f 100644
--- a/CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs
+++ b/CampusAppWP8/CampusAppWP8/Utility/HttpRequest.cs
@@ -17,13 +17,12 @@ namespace CampusAppWP8.Utility
///
public class HttpRequest
{
- #region Members
+ #region Member
///
- /// the WebClient, which send the requests
+ /// BaseAddress of the webclient
///
- private WebClient client;
-
+ private string baseAddress;
#endregion
#region Constructor
@@ -33,7 +32,6 @@ namespace CampusAppWP8.Utility
///
public HttpRequest()
{
- this.client = new WebClient();
}
///
@@ -42,8 +40,7 @@ namespace CampusAppWP8.Utility
/// the url of the HttpRequest base address
public HttpRequest(Uri apiBaseAddress)
{
- this.client = new WebClient();
- this.client.BaseAddress = apiBaseAddress.AbsoluteUri;
+ baseAddress = apiBaseAddress.AbsoluteUri;
}
#endregion
@@ -58,8 +55,9 @@ namespace CampusAppWP8.Utility
/// callback method
public void HttpGet(Uri url, Action