summaryrefslogtreecommitdiff
path: root/Juick/Classes/AccountManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Classes/AccountManager.cs')
-rw-r--r--Juick/Classes/AccountManager.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/Juick/Classes/AccountManager.cs b/Juick/Classes/AccountManager.cs
index f7fcc75..82fc446 100644
--- a/Juick/Classes/AccountManager.cs
+++ b/Juick/Classes/AccountManager.cs
@@ -27,7 +27,7 @@ namespace Juick.Classes
{
return new NetworkCredential
{
- UserName = IsolatedStorageSettings.ApplicationSettings.Contains("user") ?
+ UserName = IsolatedStorageSettings.ApplicationSettings.Contains("user") ?
IsolatedStorageSettings.ApplicationSettings["user"] as string : null,
Password = IsolatedStorageSettings.ApplicationSettings.Contains("password") ?
IsolatedStorageSettings.ApplicationSettings["password"] as string : null,
@@ -40,26 +40,27 @@ namespace Juick.Classes
{
IsolatedStorageSettings.ApplicationSettings["user"] = value.UserName;
IsolatedStorageSettings.ApplicationSettings["password"] = value.Password;
- } else
+ }
+ else
{
IsolatedStorageSettings.ApplicationSettings["user"] = null;
IsolatedStorageSettings.ApplicationSettings["password"] = null;
- }
+ }
}
}
- public void SignIn(Page page, string login, string pass)
+ public void SignIn(Page page, string login, string pass, Uri nextUri)
{
Credentials = new NetworkCredential(login, pass);
- page.NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
- page.Dispatcher.BeginInvoke(() => page.NavigationService.RemoveBackEntry());
+ page.NavigationService.Navigate(nextUri);
+ page.Dispatcher.BeginInvoke(() => page.NavigationService.RemoveBackEntry());
}
public void SignOut(Page page)
{
Credentials = null;
page.NavigationService.Navigate(new Uri("/LoginView.xaml", UriKind.Relative));
- page.Dispatcher.BeginInvoke(() => page.NavigationService.RemoveBackEntry());
+ page.Dispatcher.BeginInvoke(() => page.NavigationService.RemoveBackEntry());
}
}
}