private void SetSharedPrefs() { if (rememberPass.Checked) { UserPreferences.SetString("MySharedPrefs", "rememberPass", "true"); UserPreferences.SetString("MySharedPrefs", "userName", userName.Text); UserPreferences.SetString("MySharedPrefs", "password", password.Text); } else { UserPreferences.DeleteString("MySharedPrefs", "rememberPass"); UserPreferences.DeleteString("MySharedPrefs", "userName"); UserPreferences.DeleteString("MySharedPrefs", "password"); } }
private void ClearLoginToken(string perName) { UserPreferences.DeleteString(perName, "userId"); }