diff --git a/Coursework1/Coursework1.Android/Coursework1.Android.csproj b/Coursework1/Coursework1.Android/Coursework1.Android.csproj
index 13221e9..1b44436 100644
--- a/Coursework1/Coursework1.Android/Coursework1.Android.csproj
+++ b/Coursework1/Coursework1.Android/Coursework1.Android.csproj
@@ -92,7 +92,7 @@
-
+
@@ -100,5 +100,11 @@
Coursework1
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Coursework1/Coursework1.Android/Resources/Resource.designer.cs b/Coursework1/Coursework1.Android/Resources/Resource.designer.cs
index 41ad5e7..705e483 100644
--- a/Coursework1/Coursework1.Android/Resources/Resource.designer.cs
+++ b/Coursework1/Coursework1.Android/Resources/Resource.designer.cs
@@ -8301,64 +8301,73 @@ namespace Coursework1.Droid
public const int design_snackbar_background = 2131165281;
// aapt resource value: 0x7F070062
- public const int ic_mtrl_chip_checked_black = 2131165282;
+ public const int HomeButton = 2131165282;
// aapt resource value: 0x7F070063
- public const int ic_mtrl_chip_checked_circle = 2131165283;
+ public const int HomeButton1 = 2131165283;
// aapt resource value: 0x7F070064
- public const int ic_mtrl_chip_close_circle = 2131165284;
+ public const int ic_mtrl_chip_checked_black = 2131165284;
// aapt resource value: 0x7F070065
- public const int mtrl_snackbar_background = 2131165285;
+ public const int ic_mtrl_chip_checked_circle = 2131165285;
// aapt resource value: 0x7F070066
- public const int mtrl_tabs_default_indicator = 2131165286;
+ public const int ic_mtrl_chip_close_circle = 2131165286;
// aapt resource value: 0x7F070067
- public const int navigation_empty_icon = 2131165287;
+ public const int logOut = 2131165287;
// aapt resource value: 0x7F070068
- public const int notification_action_background = 2131165288;
+ public const int mtrl_snackbar_background = 2131165288;
// aapt resource value: 0x7F070069
- public const int notification_bg = 2131165289;
+ public const int mtrl_tabs_default_indicator = 2131165289;
// aapt resource value: 0x7F07006A
- public const int notification_bg_low = 2131165290;
+ public const int navigation_empty_icon = 2131165290;
// aapt resource value: 0x7F07006B
- public const int notification_bg_low_normal = 2131165291;
+ public const int notification_action_background = 2131165291;
// aapt resource value: 0x7F07006C
- public const int notification_bg_low_pressed = 2131165292;
+ public const int notification_bg = 2131165292;
// aapt resource value: 0x7F07006D
- public const int notification_bg_normal = 2131165293;
+ public const int notification_bg_low = 2131165293;
// aapt resource value: 0x7F07006E
- public const int notification_bg_normal_pressed = 2131165294;
+ public const int notification_bg_low_normal = 2131165294;
// aapt resource value: 0x7F07006F
- public const int notification_icon_background = 2131165295;
+ public const int notification_bg_low_pressed = 2131165295;
// aapt resource value: 0x7F070070
- public const int notification_template_icon_bg = 2131165296;
+ public const int notification_bg_normal = 2131165296;
// aapt resource value: 0x7F070071
- public const int notification_template_icon_low_bg = 2131165297;
+ public const int notification_bg_normal_pressed = 2131165297;
// aapt resource value: 0x7F070072
- public const int notification_tile_bg = 2131165298;
+ public const int notification_icon_background = 2131165298;
// aapt resource value: 0x7F070073
- public const int notify_panel_notification_icon_bg = 2131165299;
+ public const int notification_template_icon_bg = 2131165299;
// aapt resource value: 0x7F070074
- public const int tooltip_frame_dark = 2131165300;
+ public const int notification_template_icon_low_bg = 2131165300;
// aapt resource value: 0x7F070075
- public const int tooltip_frame_light = 2131165301;
+ public const int notification_tile_bg = 2131165301;
+
+ // aapt resource value: 0x7F070076
+ public const int notify_panel_notification_icon_bg = 2131165302;
+
+ // aapt resource value: 0x7F070077
+ public const int tooltip_frame_dark = 2131165303;
+
+ // aapt resource value: 0x7F070078
+ public const int tooltip_frame_light = 2131165304;
static Drawable()
{
diff --git a/Coursework1/Coursework1.Android/Resources/drawable/HomeButton.png b/Coursework1/Coursework1.Android/Resources/drawable/HomeButton.png
new file mode 100644
index 0000000..0073a90
Binary files /dev/null and b/Coursework1/Coursework1.Android/Resources/drawable/HomeButton.png differ
diff --git a/Coursework1/Coursework1.Android/Resources/drawable/HomeButton1.png b/Coursework1/Coursework1.Android/Resources/drawable/HomeButton1.png
new file mode 100644
index 0000000..1db42e4
Binary files /dev/null and b/Coursework1/Coursework1.Android/Resources/drawable/HomeButton1.png differ
diff --git a/Coursework1/Coursework1.Android/Resources/drawable/logOut.png b/Coursework1/Coursework1.Android/Resources/drawable/logOut.png
new file mode 100644
index 0000000..7b14798
Binary files /dev/null and b/Coursework1/Coursework1.Android/Resources/drawable/logOut.png differ
diff --git a/Coursework1/Coursework1/App.xaml.cs b/Coursework1/Coursework1/App.xaml.cs
index 9d54c93..7a059e6 100644
--- a/Coursework1/Coursework1/App.xaml.cs
+++ b/Coursework1/Coursework1/App.xaml.cs
@@ -11,7 +11,7 @@ namespace Coursework1
{
InitializeComponent();
- MainPage = new RegisterPage();
+ MainPage = new LogInPage();
}
protected override void OnStart()
diff --git a/Coursework1/Coursework1/Views/LogInPage.xaml b/Coursework1/Coursework1/Views/LogInPage.xaml
index 145e48f..4e6bcba 100644
--- a/Coursework1/Coursework1/Views/LogInPage.xaml
+++ b/Coursework1/Coursework1/Views/LogInPage.xaml
@@ -1,5 +1,5 @@
-
@@ -13,10 +13,12 @@
+
-
-
-
+
+
+
+
diff --git a/Coursework1/Coursework1/Views/LogInPage.xaml.cs b/Coursework1/Coursework1/Views/LogInPage.xaml.cs
index 80c4b84..fca832a 100644
--- a/Coursework1/Coursework1/Views/LogInPage.xaml.cs
+++ b/Coursework1/Coursework1/Views/LogInPage.xaml.cs
@@ -43,7 +43,6 @@ namespace Coursework1.Views
var result = await this.DisplayAlert("Log In Failed", "Check both Username and Password", "Okay", "Cancel");
if (result)
await Navigation.PushModalAsync(new LogInPage());
-
});
}
diff --git a/Coursework1/Coursework1/Views/MainPage.xaml b/Coursework1/Coursework1/Views/MainPage.xaml
index 202cfe1..51c2a58 100644
--- a/Coursework1/Coursework1/Views/MainPage.xaml
+++ b/Coursework1/Coursework1/Views/MainPage.xaml
@@ -1,12 +1,14 @@
-
+
+
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/Coursework1/Coursework1/Views/MainPage.xaml.cs b/Coursework1/Coursework1/Views/MainPage.xaml.cs
index 978b165..07bb824 100644
--- a/Coursework1/Coursework1/Views/MainPage.xaml.cs
+++ b/Coursework1/Coursework1/Views/MainPage.xaml.cs
@@ -16,5 +16,16 @@ namespace Coursework1.Views
{
InitializeComponent();
}
+
+ void Button_Clicked(object sender, EventArgs e)
+ {
+ Navigation.PushModalAsync(new LogInPage());
+ }
+
+ private void ImageButton_Clicked(object sender, EventArgs e)
+ {
+ Navigation.PushModalAsync(new MainPage());
+ }
+
}
}
\ No newline at end of file
diff --git a/Coursework1/Coursework1/Views/RegisterPage.xaml b/Coursework1/Coursework1/Views/RegisterPage.xaml
index 1bc2502..95d2f8c 100644
--- a/Coursework1/Coursework1/Views/RegisterPage.xaml
+++ b/Coursework1/Coursework1/Views/RegisterPage.xaml
@@ -11,6 +11,7 @@
+
@@ -23,7 +24,10 @@
-
+
+
+
+
diff --git a/Coursework1/Coursework1/Views/RegisterPage.xaml.cs b/Coursework1/Coursework1/Views/RegisterPage.xaml.cs
index 47f87c0..31ad500 100644
--- a/Coursework1/Coursework1/Views/RegisterPage.xaml.cs
+++ b/Coursework1/Coursework1/Views/RegisterPage.xaml.cs
@@ -32,18 +32,36 @@ namespace Coursework1.Views
Username = EntryUsername.Text,
Password = EntryPassword.Text,
Email = EntryEmail.Text
-
};
-
db.Insert(item);
- Device.BeginInvokeOnMainThread(async () =>
+
+ if (EntryUsername.Text.Equals(null) || EntryPassword.Text.Equals(null) || EntryEmail.Text.Equals(null))
{
- var result = await this.DisplayAlert("Registration Succesful", "Press okay to go to log in page", "Okay", "Cancel");
- if (result)
- await Navigation.PushModalAsync(new LogInPage());
- });
+ Device.BeginInvokeOnMainThread(async () =>
+ {
+ var output = await this.DisplayAlert("Please fill all the fields", "Registration failed", "Okay", "Cancel");
+ if (output)
+ await Navigation.PushModalAsync(new RegisterPage());
+ });
+ }
+ else
+ {
+
+ Device.BeginInvokeOnMainThread(async () =>
+ {
+ var result = await this.DisplayAlert("Registration Succesful", "Press okay to go to log in page", "Okay", "Cancel");
+ if (result)
+ await Navigation.PushModalAsync(new LogInPage());
+ });
+ }
+
+
+ }
+ void Button_Clicked_1(object sender, EventArgs e)
+ {
+ App.Current.MainPage = new NavigationPage(new LogInPage());
}
}
}
\ No newline at end of file