private void onRemoveAccount(string username, LoginRememberMeListButton button) { rememberedButtons.Remove(button); button.gameObject.SetActive(value: false); Object.Destroy(button.gameObject); RememberMeService rememberMeService = Service.Get <RememberMeService>(); rememberMeService.RemoveUsername(username); MulticoloredList componentInChildren = GetComponentInChildren <MulticoloredList>(); if (componentInChildren != null) { componentInChildren.Refresh(); } }
private void onRemoveAccountPromptButtonClicked(DPrompt.ButtonFlags pressed) { if (pressed == DPrompt.ButtonFlags.YES || pressed == DPrompt.ButtonFlags.OK) { RememberMeService rememberMeService = Service.Get <RememberMeService>(); rememberMeService.RemoveUsername(rememberedData.AccountData.Username); GetComponentInParent <BackButtonStateHandler>().MarkCurrentStateInvalid(); if (!string.IsNullOrEmpty(FSMTarget)) { StateMachineContext componentInParent = GetComponentInParent <StateMachineContext>(); componentInParent.SendEvent(new ExternalEvent(FSMTarget, RemovedEvent)); } else { StateMachine componentInParent2 = GetComponentInParent <StateMachine>(); componentInParent2.SendEvent(RemovedEvent); } } }