void CreateUser() { ParseUser.LogOut(); var user = new ParseUser() { Username = usuario, Password = pwd, Email = email }; // other fields can be set just like with ParseObject user["pontuacao"] = (int)scoreInicial; user.SignUpAsync().ContinueWith(t => { if (t.IsFaulted || t.IsCanceled) { foreach (var e in t.Exception.InnerExceptions) { ParseException parseException = (ParseException)e; Debug.Log("Error message " + parseException.Message); Debug.Log("Error code: " + parseException.Code); } } else { //SignUpAsync(); //DONE Debug.Log("Usuário criado com sucesso"); } }); ParseUser.LogOut(); }
// Use this for initialization void Start() { ParseUser user; // ParseUser.LogOut(); ParseUser.LogInAsync(nome, pwd).ContinueWith(t => { if (t.IsFaulted || t.IsCanceled) { foreach (var e in t.Exception.InnerExceptions) { ParseException parseException = (ParseException)e; Debug.Log("Error message " + parseException.Message); Debug.Log("Error code: " + parseException.Code); } } else { // Login was successful user = t.Result; Debug.Log(user.Username); user.DeleteAsync(); ParseUser.LogOut(); } }); }
public static void Logout() { if (ParseUser.CurrentUser != null) { ParseUser.LogOut(); } }
private void seleccionMenu(object sender, SelectionChangedEventArgs e) { switch (menu.SelectedIndex) { case 0: Contenido.Navigate(typeof(MascotasPage), this); paginaPrincipal.BottomAppBar = null; break; case 1: Contenido.Navigate(typeof(MisMascotasPage), this); CommandBar commandBar = new CommandBar(); AppBarButton appBarButton = new AppBarButton(); appBarButton.Icon = new SymbolIcon(Symbol.Add); appBarButton.Label = "Agregar"; commandBar.PrimaryCommands.Add(appBarButton); paginaPrincipal.BottomAppBar = commandBar; break; case 4: ParseUser.LogOut(); rootFrame.Navigate(typeof(MainPage)); break; } }
public void ParseFBLogout() { Events.ResetApp(); FB.LogOut(); // FB.Logout(); ParseUser.LogOut(); }
private void OnSignOutButtonClick(object sender, RoutedEventArgs e) { ParseUser.LogOut(); if (this.SignOut != null) { this.SignOut(this, null); } }
public void LogoutUser() { try { ParseUser.LogOut(); } catch (ParseException e) { Console.WriteLine(e.Message); } }
private void logout(object sender, RoutedEventArgs e) { ParseUser.LogOut(); var currentUser = ParseUser.CurrentUser; // this will now be null Frame rootFrame = Window.Current.Content as Frame; rootFrame.Navigate(typeof(LoginPage)); }
public void Button_SignOut_Clicked() { try{ ParseUser.LogOut(); } catch (UnityException e) { Debug.Log("Error logging out: " + e); } }
void OnClick() { ParseUser.LogOut(); var currentUser = ParseUser.CurrentUser; SettingPage.SetActive(false); Profile.SetActive(false); LoginPage.SetActive(true); }
private static void HandleInvalidSessionToken() { ParseUser.LogOut(); Device.BeginInvokeOnMainThread(() => { var pageFactory = AutofacContainer.Container.Resolve <IPageFactory>(); Xamarin.Forms.Application.Current.MainPage = new NavigationPage(pageFactory.CreatePage <LoadingPage, LoadingViewModel>()); }); }
public void LogOut() { ParseUser.LogOut(); ParseUser currentUser = ParseUser.CurrentUser; // this will now be null if (currentUser != null) { throw new UnityException("LogOut failed. Current user not null."); } }
public override void WillTerminate(UIApplication application) { try { ParseUser.LogOut(); } catch (ParseException e) { Debug.WriteLine(e.StackTrace); } }
public static void InitializeParse(string applicationId, string dotNetKey) { ParseClient.Initialize(applicationId, dotNetKey); if (ParseUser.CurrentUser != null) { try { ParseUser.LogOut(); } catch (Exception) { } } }
public void ReturnToLoginScreen() { if (ParseUser.CurrentUser != null) { Debug.Log("Trying to log out of current user..."); ParseUser.LogOut(); } else { Debug.LogError("Error: trying to log out of a user that isn't even logged in."); } Application.LoadLevel("scnMainMenu"); }
static void InitializeParse(string applicationId, string dotNetKey) { ParseClient.Initialize(applicationId, dotNetKey); Logging.GetLogging().Info("InitializeParse: done"); if (ParseUser.CurrentUser != null) { Logging.GetLogging().Info("InitializeParse: user -> " + ParseUser.CurrentUser.Username); try { ParseUser.LogOut(); } catch (Exception) { Logging.GetLogging().Info("InitializeParse: something fishy"); } } }
void Update() { if (testNetwork.isConnect && PlayerPrefs.GetString("account") == "") { if (!isCallCreateAccount) { isCallCreateAccount = true; if (ParseUser.CurrentUser != null) { ParseUser.LogOut(); } myParse.CreateAccount(); } } }
private void button_Tapped(object sender, TappedRoutedEventArgs e) { var button = (sender as Grid).Name; if (button == "acceptButton") { ParseUser.LogOut(); Application.Current.Exit(); } else if (button == "exitButtonForLogOutPanel") { backgroundPanel.Visibility = Visibility.Collapsed; logOutPanel.Visibility = Visibility.Collapsed; } }
void OnGUI() { if (GUI.Button(new Rect(width / 2 - 100, height / 2 - 60, 200, 50), "Jogar")) { Application.LoadLevel("Game"); } if (GUI.Button(new Rect(width / 2 - 100, height / 2, 200, 50), "Recordes")) { Application.LoadLevel("GameOver"); } if (GUI.Button(new Rect(width / 2 - 100, height / 2 + 60, 200, 50), "Deslogar")) { ParseUser.LogOut(); Application.LoadLevel("Login"); } }
public AlertDialog UserSyncDialog(Context context) { ContextThemeWrapper wrapper = new ContextThemeWrapper(context, GetDialogTheme()); StorehouseSuperDialog dialog = new StorehouseSuperDialog(wrapper); LayoutInflater inflater = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService); View layout = inflater.Inflate(Resource.Layout.DialogUserSyncView, null); TextView username = layout.FindViewById <TextView>(Resource.Id.parseUserName); TextView password = layout.FindViewById <TextView>(Resource.Id.parsePassword); dialog.SetTitleTextColor(Color.White); dialog.SetTitleBackgroundColor(Android.Resource.Color.Transparent); dialog.SetTitle("User Sync"); dialog.SetMessageTextSize(22); if (ParseUser.CurrentUser != null) { dialog.SetView(null); dialog.SetNeutralButton("Log Out", (o, e) => { ParseUser.LogOut(); }); } else { dialog.SetView(layout); } dialog.SetPositiveButton("Sync Up", (o, e) => { ParseUserSync(username.Text, password.Text, "up"); }); dialog.SetNegativeButton("Sync Down", (o, e) => { ParseUserSync(username.Text, password.Text, "down"); }); return(dialog.Show()); }
private void FBAPICallback(FBResult result) { if (!String.IsNullOrEmpty(result.Error)) { Debug.Log("FBAPICallback: Error getting user info: + " + result.Error); ParseUser.LogOut(); } else { //got user profile info, extract name var resultObject = Json.Deserialize(result.Text) as Dictionary <string, object>; string name; object objectForKey; if (resultObject.TryGetValue("name", out objectForKey)) { name = (string)objectForKey; } else { name = "anonymous"; } StartCoroutine("saveUserProfile", name); } }
public override void OnEnter() { ParseUser.LogOut(); }
void SignOut_QuestionPanel_Yes() { ParseUser.LogOut(); Application.LoadLevel("Login"); }
async void OnWizardComplete() { ParseUser.LogOut(); //clear any sessions try { string jsonObj = null; string selectedAccountType = null; bool successFull = false; //sequential checking if (DealerProfile != null && DealerProfile.userProfile != null && DealerProfile.userProfile.userType != null) { selectedAccountType = DealerProfile.userProfile.userType; } else if (UserProfile != null && UserProfile.userType != null) { selectedAccountType = UserProfile.userType; } if (!_alreadyRun) { _alreadyRun = true; //now we can post to parse and tell the user that the sign up is successfull if (selectedAccountType == "Dealer") { if (DealerProfile != null) { var licensePath = DealerProfile.dealerLicense; //save the dealer successFull = await _dataManager.signUpDealer(DealerProfile, licensePath); jsonObj = Newtonsoft.Json.JsonConvert.SerializeObject(DealerProfile); } } else if (selectedAccountType == "Private Party") { //save the regular user successFull = await _dataManager.signUpPrivateParty(UserProfile); jsonObj = Newtonsoft.Json.JsonConvert.SerializeObject(UserProfile); } if (successFull) { _message = "Signup Successfull"; } } Android.Util.Log.Info("CustomerWizard", jsonObj); Android.Widget.Toast.MakeText(Application.Context, _message, Android.Widget.ToastLength.Long) .Show(); Activity.Finish(); } catch (ParseException ex) { var message = "Error saving to parse " + ex.Message + ex.StackTrace; Console.WriteLine(message); MetricsManager.TrackEvent(message); } catch (Exception ex) { var message = "Error saving to profile data " + ex.Message + ex.StackTrace; Console.WriteLine(message); MetricsManager.TrackEvent(message); } }
private void OnLogOutButtonClick(object sender, RoutedEventArgs e) { ParseUser.LogOut(); (Window.Current.Content as Frame).Navigate(typeof(LogInPage)); }
public void Logout() { ParseUser.LogOut(); var currentUser = ParseUser.CurrentUser; //This is null }
private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { ParseUser.LogOut(); VisualStateManager.GoToState(this, "LoginState", true); }
void LogoutButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { LogoutScript.Logout(); ParseUser.LogOut(); Application.LoadLevel("DFGUI Login"); }
public void LogOutAsync() { ParseUser.LogOut(); }
public async void Init() { TestingHelpers.InitParse(); ParseUser.LogOut(); }