コード例 #1
0
        internal async void ClaimAccount()
        {
            ButtonClaimAccount.Content   = ButtonTextWaiting;
            ButtonClaimAccount.IsEnabled = false;
            var url = await ApiWrapper.GetClaimAccountUrl();

            if (url == null)
            {
                return;
            }
            if (!Helper.TryOpenUrl(url))
            {
                _claimUrl = url;
                OnPropertyChanged(nameof(ClaimErrorVisibility));
            }
            await Task.Delay(3000);

            ButtonClaimAccount.IsEnabled = true;
            await CheckForAccountUpdateAsync(Registered);

            ButtonClaimAccount.Content = ButtonTextClaim;
        }