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(); } }
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)); } } }