Пример #1
0
        async Task CheckBalance()
        {
            var service = CaptchaServiceFactory.GetService(settings.CaptchaSettings);

            try
            {
                var balance = await service.GetBalanceAsync();

                await js.AlertSuccess(Loc["Success"], $"{Loc["Balance"]}: {balance}");
            }
            catch (Exception ex)
            {
                await js.AlertException(ex);
            }
        }
Пример #2
0
 public CaptchaSharpProvider(RuriLibSettingsService settings)
 {
     service = CaptchaServiceFactory.GetService(settings.RuriLibSettings.CaptchaSettings);
     CheckBalanceBeforeSolving = settings.RuriLibSettings.CaptchaSettings.CheckBalanceBeforeSolving;
     ServiceType = settings.RuriLibSettings.CaptchaSettings.CurrentService;
 }