summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Konstantin2012-10-23 22:33:46 +0400
committerGravatar Konstantin2012-10-23 22:33:46 +0400
commit61d3230b053453c9f8e145341a3def0d1ad8ff32 (patch)
treefaee3b9fe27d845ef5ada4082025f1e2dbf86c85
parent1ebf0adc26fd3377b50aacaed798f9866a7ea2eb (diff)
clean
-rw-r--r--Juick/App.xaml.cs8
-rw-r--r--Juick/Classes/AccountManager.cs23
-rw-r--r--Juick/LoginView.xaml.cs5
-rw-r--r--Juick/MainPage.xaml.cs4
-rw-r--r--Juick/NewPostView.xaml.cs2
5 files changed, 15 insertions, 27 deletions
diff --git a/Juick/App.xaml.cs b/Juick/App.xaml.cs
index 1102a91..e32ae5e 100644
--- a/Juick/App.xaml.cs
+++ b/Juick/App.xaml.cs
@@ -33,7 +33,7 @@ namespace Juick
get
{
return _last ??
- (_last = new MessageListViewModelBase {RestUri = "/messages?1=1"});
+ (_last = new MessageListViewModelBase { RestUri = "/messages?1=1" });
}
}
@@ -47,9 +47,9 @@ namespace Juick
private static RestClient _cl;
public static RestClient Client
{
- get { return _cl ?? (_cl = new RestClient("http://api.juick.com") {UserAgent = "Juick 0.999/Windows Phone " + Environment.OSVersion.Version}); }
+ get { return _cl ?? (_cl = new RestClient("http://api.juick.com") { UserAgent = "Juick 0.999/Windows Phone " + Environment.OSVersion.Version }); }
}
-
+
/// <summary>
/// Provides easy access to the root frame of the Phone Application.
/// </summary>
@@ -96,7 +96,7 @@ namespace Juick
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
-
+
}
// Code to execute when the application is activated (brought to foreground)
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
diff --git a/Juick/LoginView.xaml.cs b/Juick/LoginView.xaml.cs
index 5e86959..4d6114e 100644
--- a/Juick/LoginView.xaml.cs
+++ b/Juick/LoginView.xaml.cs
@@ -17,8 +17,8 @@ namespace Juick
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
- nextUri = NavigationContext.QueryString.ContainsKey("FileId") ?
- new Uri(string.Format("/NewPostView.xaml?FileId={0}", NavigationContext.QueryString["FileId"]), UriKind.Relative)
+ nextUri = NavigationContext.QueryString.ContainsKey("FileId")
+ ? new Uri(string.Format("/NewPostView.xaml?FileId={0}", NavigationContext.QueryString["FileId"]), UriKind.Relative)
: new Uri("/MainPage.xaml", UriKind.Relative);
}
@@ -26,6 +26,7 @@ namespace Juick
{
App.Account.SignIn(this, textBox1.Text, textBox2.Password, nextUri);
}
+
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
while (NavigationService.BackStack.Any())
diff --git a/Juick/MainPage.xaml.cs b/Juick/MainPage.xaml.cs
index 783265e..97f7739 100644
--- a/Juick/MainPage.xaml.cs
+++ b/Juick/MainPage.xaml.cs
@@ -24,10 +24,10 @@ namespace Juick
public MainPage()
{
// Holds the push channel that is created or found.
- HttpNotificationChannel pushChannel;
+ //HttpNotificationChannel pushChannel; // unused variable
// The name of our push channel.
- string channelName = "JuickChannel";
+ //string channelName = "JuickChannel"; // unused variable
InitializeComponent();
diff --git a/Juick/NewPostView.xaml.cs b/Juick/NewPostView.xaml.cs
index e883597..8ad2722 100644
--- a/Juick/NewPostView.xaml.cs
+++ b/Juick/NewPostView.xaml.cs
@@ -79,8 +79,6 @@ namespace Juick
wb.SaveJpeg(ms, _attachedPhoto.PixelWidth, _attachedPhoto.PixelHeight, 0, 100);
request.AddFile("attach", ms.ToArray(), "file.jpg");
}
-
-
}
App.Client.ExecuteAsync(request, response =>
{