diff options
author | vitalyster | 2012-10-15 00:58:48 +0400 |
---|---|---|
committer | vitalyster | 2012-10-15 00:58:48 +0400 |
commit | 1ebf0adc26fd3377b50aacaed798f9866a7ea2eb (patch) | |
tree | 6fc54fe6e62ae68c2bc22c61a41f7b907cbca54f /Juick/Classes | |
parent | 04736e99cac9969bd212bba7a2e8cd35e7ef1cd5 (diff) |
Photos_Extra_Share, attach image in original size, reformat code
Diffstat (limited to 'Juick/Classes')
-rw-r--r-- | Juick/Classes/AccountManager.cs | 15 |
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());
}
}
}
|