mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Fixed compile time issues.
This commit is contained in:
@@ -16,7 +16,7 @@ namespace OpenBullet
|
||||
InitializeComponent();
|
||||
DataContext = Globals.rlSettings.Captchas;
|
||||
|
||||
foreach (string i in Enum.GetNames(typeof(BlockCaptcha.CaptchaService)))
|
||||
foreach (string i in Enum.GetNames(typeof(ServiceType)))
|
||||
currentServiceCombobox.Items.Add(i);
|
||||
|
||||
currentServiceCombobox.SelectedIndex = (int)Globals.rlSettings.Captchas.CurrentService;
|
||||
@@ -24,7 +24,7 @@ namespace OpenBullet
|
||||
|
||||
private void currentServiceCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
Globals.rlSettings.Captchas.CurrentService = (BlockCaptcha.CaptchaService)currentServiceCombobox.SelectedIndex;
|
||||
Globals.rlSettings.Captchas.CurrentService = (ServiceType)currentServiceCombobox.SelectedIndex;
|
||||
}
|
||||
|
||||
private void checkBalanceButton_Click(object sender, RoutedEventArgs e)
|
||||
@@ -36,53 +36,7 @@ namespace OpenBullet
|
||||
|
||||
try
|
||||
{
|
||||
var cs = Globals.rlSettings.Captchas;
|
||||
switch (cs.CurrentService)
|
||||
{
|
||||
case BlockCaptcha.CaptchaService.AntiCaptcha:
|
||||
balance = new AntiCaptcha(cs.AntiCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.DBC:
|
||||
balance = new DeathByCaptcha(cs.DBCUser, cs.DBCPass, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.DeCaptcher:
|
||||
balance = new DeCaptcher(cs.DCUser, cs.DCPass, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.ImageTypers:
|
||||
balance = new ImageTyperz(cs.ImageTypToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.TwoCaptcha:
|
||||
balance = new TwoCaptcha(cs.TwoCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.RuCaptcha:
|
||||
balance = new RuCaptcha(cs.RuCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.AZCaptcha:
|
||||
balance = new AZCaptcha(cs.AZCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.SolveRecaptcha:
|
||||
balance = new SolveReCaptcha(cs.SRUserId, cs.SRToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.CaptchasIO:
|
||||
balance = new CaptchasIO(cs.CIOToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.CustomTwoCaptcha:
|
||||
balance = new CustomTwoCaptcha(cs.CustomTwoCapToken, cs.CustomTwoCapDomain, cs.CustomTwoCapPort, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
default:
|
||||
balance = 999;
|
||||
break;
|
||||
}
|
||||
balance = Service.Initialize(Globals.rlSettings.Captchas).GetBalance();
|
||||
}
|
||||
catch { balanceLabel.Content = "WRONG TOKEN / CREDENTIALS"; balanceLabel.Foreground = Globals.GetBrush("ForegroundBad"); return; }
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using RuriLib.CaptchaServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace RuriLib.ViewModels
|
||||
@@ -8,9 +9,9 @@ namespace RuriLib.ViewModels
|
||||
/// </summary>
|
||||
public class SettingsCaptchas : ViewModelBase
|
||||
{
|
||||
private BlockCaptcha.CaptchaService currentService = BlockCaptcha.CaptchaService.AntiCaptcha;
|
||||
private ServiceType currentService = ServiceType.AntiCaptcha;
|
||||
/// <summary>Which Captcha Service is currently selected for solving captcha challenges.</summary>
|
||||
public BlockCaptcha.CaptchaService CurrentService { get { return currentService; } set { currentService = value; OnPropertyChanged(); } }
|
||||
public ServiceType CurrentService { get { return currentService; } set { currentService = value; OnPropertyChanged(); } }
|
||||
|
||||
private string antiCapToken = "";
|
||||
/// <summary>The AntiCaptcha API Token.</summary>
|
||||
|
||||
Reference in New Issue
Block a user