示例#1
0
        private async void Do_Register(object sender, RoutedEventArgs e)
        {
            string text = await APIHandle.CheckCredential();

            if (text != "")
            {
                string token = await APIHandle.GetToken();

                if (token != "")
                {
                    ContentDialog noWifiDialog = new ContentDialog()
                    {
                        Title           = "Thông Báo",
                        Content         = "Bạn đã có tài khoản!",
                        CloseButtonText = "Ok"
                    };
                    await noWifiDialog.ShowAsync();
                }
            }
            else
            {
                Debug.WriteLine("name: " + this.Name);
                RegisterDialog register = new RegisterDialog();
                await register.ShowAsync();
            }
        }
示例#2
0
        private async void btnRegister_Tapped(object sender, TappedRoutedEventArgs e)
        {
            var dlg = new RegisterDialog();
            var res = await dlg.ShowAsync();

            if (res == ContentDialogResult.Primary)
            {
                if (App.UserViewModel.IsLogged)
                {
                    AppFrame.Navigate(typeof(BooksPage));
                }
            }
        }