From 1ebf0adc26fd3377b50aacaed798f9866a7ea2eb Mon Sep 17 00:00:00 2001 From: vitalyster Date: Mon, 15 Oct 2012 00:58:48 +0400 Subject: Photos_Extra_Share, attach image in original size, reformat code --- Juick/Classes/AccountManager.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Juick/Classes') 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()); } } } -- cgit v1.2.3