Exemple #1
0
        public void ClickCreateProfileName()
        {
            if (string.IsNullOrEmpty(_profileInput.text))
            {
                var msg = DialogBoxData.CreateInfo("Profile name cant be empty");
                UiDialogBox.Instance.ShowDialog(msg);
                return;
            }

            _profileSelection.TryCreateProfile(_profileInput.text);
        }
Exemple #2
0
        public void CheckCanCreateProfile()
        {
            if (_profileDataHandler.CachedProfileData.CanAddProfile() == false)
            {
                var msg = DialogBoxData.CreateInfo("Max profile reached. \n Delete one first.");
                UiDialogBox.Instance.ShowDialog(msg);
                return;
            }

            _profileUi.OpenProfileCreation();
        }
Exemple #3
0
 public void TryCreateProfile(string profileName)
 {
     if (_profileDataHandler.CachedProfileData.ProfileExist(profileName))
     {
         var msg = DialogBoxData.CreateInfo("You already have a profile \n with this name.");
         UiDialogBox.Instance.ShowDialog(msg);
         return;
     }
     _profileDataHandler.CachedProfileData.AddNewProfile(profileName);
     _profileDataHandler.SaveData();
     OpenProfileList();
 }
    public void OnConfirmClick()
    {
        Msf.Client.Auth.ConfirmEmail(Code.text, (successful, error) => {
            if (!successful)
            {
                Msf.Events.Fire(Msf.EventNames.ShowDialogBox,
                                DialogBoxData.CreateError("Confirmation failed: " + error));
                Logs.Error("Confirmation failed: " + error);
                return;
            }

            Msf.Events.Fire(Msf.EventNames.ShowDialogBox,
                            DialogBoxData.CreateInfo("Email confirmed successfully"));

            // Hide the window
            gameObject.SetActive(false);
        });
    }
    public void OnResendClick()
    {
        ResendButton.interactable = false;

        Msf.Client.Auth.RequestEmailConfirmationCode((successful, error) => {
            if (!successful)
            {
                Msf.Events.Fire(Msf.EventNames.ShowDialogBox,
                                DialogBoxData.CreateError("Confirmation code request failed: " + error));

                Logs.Error("Confirmation code request failed: " + error);

                ResendButton.interactable = true;
                return;
            }

            Msf.Events.Fire(Msf.EventNames.ShowDialogBox,
                            DialogBoxData.CreateInfo("Confirmation code was sent to your e-mail. " +
                                                     "It should arrive within few minutes"));
        });
    }