public override void Done(ParseException e) { if (e == null) { // Show a simple Toast message upon successful registration ThisApp.AlertBox(_context, "SUCCESS!", "Successfully signed up. Please log in."); } else if (e.Code == ParseException.UsernameTaken) { ThisApp.AlertBox(_context, "REMINDER!", "Username taken."); } else { ThisApp.AlertBox(_context, "REMINDER!", "There was an error.\n\n" + e.Message); } }
public override void Done(ParseUser user, ParseException e) { if (e == null) { // If user exist and authenticated //ThisApp.AlertBox(_context, "SUCCESS!", "Successfully logged in!"); Toast.MakeText(_context, "Successfully logged in as " + ParseUser.CurrentUser.Username + "! You can now sync your notes!", ToastLength.Long).Show(); _context.Finish(); } else if (e.Code == ParseException.ObjectNotFound) { ThisApp.AlertBox(_context, "REMINDER!", "Incorrect username or password. Please try again."); } else { ThisApp.AlertBox(_context, "REMINDER!", "Unknown error. Check your connections.\n\n" + e.Message); } }