diff options
Diffstat (limited to 'Juick/Classes')
-rw-r--r-- | Juick/Classes/AccountManager.cs | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/Juick/Classes/AccountManager.cs b/Juick/Classes/AccountManager.cs index 82fc446..8f8e366 100644 --- a/Juick/Classes/AccountManager.cs +++ b/Juick/Classes/AccountManager.cs @@ -1,20 +1,7 @@ using System;
-using System.IO;
using System.IO.IsolatedStorage;
-using System.Linq;
using System.Net;
-using System.Windows;
using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Threading;
-using System.Xml;
-using System.Xml.Serialization;
namespace Juick.Classes
{
@@ -25,12 +12,14 @@ namespace Juick.Classes {
get
{
+ string userName;
+ string password;
+ IsolatedStorageSettings.ApplicationSettings.TryGetValue<string>("user", out userName);
+ IsolatedStorageSettings.ApplicationSettings.TryGetValue<string>("password", out password);
return new NetworkCredential
{
- UserName = IsolatedStorageSettings.ApplicationSettings.Contains("user") ?
- IsolatedStorageSettings.ApplicationSettings["user"] as string : null,
- Password = IsolatedStorageSettings.ApplicationSettings.Contains("password") ?
- IsolatedStorageSettings.ApplicationSettings["password"] as string : null,
+ UserName = userName,
+ Password = password,
};
}
set
|