summaryrefslogtreecommitdiff
path: root/Juick
diff options
context:
space:
mode:
Diffstat (limited to 'Juick')
-rw-r--r--Juick/LoginView.xaml5
-rw-r--r--Juick/LoginView.xaml.cs18
-rw-r--r--Juick/MainPage.xaml.cs3
3 files changed, 9 insertions, 17 deletions
diff --git a/Juick/LoginView.xaml b/Juick/LoginView.xaml
index 6f47b72..db5e193 100644
--- a/Juick/LoginView.xaml
+++ b/Juick/LoginView.xaml
@@ -11,7 +11,7 @@
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
- shell:SystemTray.IsVisible="True">
+ shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
@@ -31,8 +31,7 @@
<TextBlock Height="30" HorizontalAlignment="Left" Margin="37,119,0,0" Name="textBlock1" Text="Username" VerticalAlignment="Top" />
<TextBox Height="72" HorizontalAlignment="Left" Margin="25,155,0,0" Name="textBox1" Text="{Binding Username}" VerticalAlignment="Top" Width="409" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="37,246,0,0" Name="textBlock2" Text="Password" VerticalAlignment="Top" />
- <Button Content="Sign in" Height="72" HorizontalAlignment="Left" Margin="120,360,0,0" Name="button1" VerticalAlignment="Top" Width="160" Click="button1_Click" />
- <Button Content="Skip" Height="72" HorizontalAlignment="Right" Margin="0,360,22,0" Name="button2" VerticalAlignment="Top" Width="160" Click="button2_Click" />
+ <Button Content="Sign in" Height="72" HorizontalAlignment="Left" Margin="274,360,0,0" Name="button1" VerticalAlignment="Top" Width="160" Click="button1_Click" />
<PasswordBox Height="72" HorizontalAlignment="Left" Password="{Binding Password}" Margin="25,282,0,0" Name="textBox2" VerticalAlignment="Top" Width="409" />
</Grid>
</Grid>
diff --git a/Juick/LoginView.xaml.cs b/Juick/LoginView.xaml.cs
index d653932..43aa8f7 100644
--- a/Juick/LoginView.xaml.cs
+++ b/Juick/LoginView.xaml.cs
@@ -1,15 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
+using System.Linq;
using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-using Juick.Classes;
using Microsoft.Phone.Controls;
namespace Juick
@@ -26,10 +16,10 @@ namespace Juick
{
App.Account.SignIn(this, textBox1.Text, textBox2.Password);
}
-
- private void button2_Click(object sender, RoutedEventArgs e)
+ private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
- App.Account.SignOut(this);
+ while (NavigationService.BackStack.Any())
+ NavigationService.RemoveBackEntry();
}
}
} \ No newline at end of file
diff --git a/Juick/MainPage.xaml.cs b/Juick/MainPage.xaml.cs
index a279a83..0cfe351 100644
--- a/Juick/MainPage.xaml.cs
+++ b/Juick/MainPage.xaml.cs
@@ -78,7 +78,10 @@ namespace Juick
if (!App.MyFeedView.IsDataLoaded)
{
if (string.IsNullOrEmpty(App.Account.Credentials.UserName))
+ {
NavigationService.Navigate(new Uri("/LoginView.xaml", UriKind.Relative));
+ }
+
else
{
App.MyFeedView.LoadData();