Example #1
0
        public async Task GetStudiosList()
        {
            if (string.IsNullOrEmpty(_devAccountToken))
            {
                return;
            }

            if (StudioList != null)
            {
                StudioList.Clear();
            }
            await UserAuthenticateApiService.GetStudios(new GetStudiosRequest(), (getStudioResult) =>
            {
                if (StudioList == null)
                {
                    StudioList = new List <Studio>();
                }

                StudioList = getStudioResult.Studios
                             .Select(e => { return(e); })
                             .ToList();

                StudioList.Add(Studio.OVERRIDE);
            }, _devAccountToken);
        }
Example #2
0
        private async void Login(object sender)
        {
            if (EmailValidation(Username))
            {
                var passwordBox = sender as PasswordBox;
                var password    = passwordBox.Password;
                LoginButtonEnable = false;
                await UserAuthenticateApiService.Login(new LoginRequest()
                {
                    DeveloperToolProductName    = "PlayFab_EditorExtensions",
                    DeveloperToolProductVersion = "2.53.181001",
                    Email    = Username,
                    Password = password
                }, async (result) =>
                {
                    _devAccountToken = result.DeveloperClientToken;
                    ComboboxEnbale   = false;
                    await GetStudiosList();
                    ComboboxEnbale = true;
                });

                LoginButtonEnable = true;

                try
                {
                    UsersDBApiService.InsertNewUser(new User()
                    {
                        Email = Username, Password = password
                    });
                }
                catch (Exception)
                {
                }
            }
            else
            {
                MessageBox.Show("Input string not match Email Format");
            }
            CurrentPage = new TitleSettingPage(this);
        }