Esempio n. 1
0
        private async void Google_CLicked(Object sender, EventArgs e)
        {
            if (Application.Current.Properties.ContainsKey("google"))
            {
                await DisplayAlert("Successful", "Sign in success.", "Okay");

                var tab = new TabbedPage1();
                Application.Current.MainPage = new NavigationPage(tab);
                NavigationPage.SetHasNavigationBar(tab, false);
            }
            else
            {
                await DisplayAlert("Invalid User", "Google user is not signed up.", "Okay");
            }
        }
Esempio n. 2
0
        private async void Signin_CLicked(Object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(logemail.Text) && !string.IsNullOrEmpty(logpass.Text))
            {
                if (Application.Current.Properties.ContainsKey("email") && Application.Current.Properties.ContainsKey("password") && string.Compare(Application.Current.Properties["email"].ToString(), logemail.Text) == 0 && string.Compare(Application.Current.Properties["password"].ToString(), logpass.Text) == 0)
                {
                    await DisplayAlert("Successful", "Sign in success.", "Okay");

                    var tab = new TabbedPage1();
                    Application.Current.MainPage = new NavigationPage(tab);
                    NavigationPage.SetHasNavigationBar(tab, false);
                }
                else
                {
                    await DisplayAlert("Invalid Data", "Invalid email address or password.", "Okay");
                }
            }
            else
            {
                await DisplayAlert("Missing Fields", "There are missing fields.", "Okay");
            }
        }