public void GoTo(string address, Bookmaker bookmaker) { bookmakerSettings = BookmakersSettingsCollection.Get(bookmaker); if (bookmakerSettings.UseProxy) { SetProxy(); } GoTo(address); }
public static BookmakerSettings Get(Bookmaker bookmaker) { if (!settingsDict.TryGetValue(bookmaker, out BookmakerSettings settings)) { settings = new BookmakerSettings(); settingsDict.Add(bookmaker, settings); } return(settings); }
public void FillControl(BookmakerSettings settings) { Login.Text = settings.Login; Password.Password = settings.Password; ProxyIP.Text = settings.IP; ProxyPort.Text = settings.Port; ProxyLogin.Text = settings.ProxyLogin; ProxyPassword.Password = settings.ProxyPassword; UseProxy.IsChecked = settings.UseProxy; BetSize.Text = settings.BetSize; AutoBet.IsChecked = settings.AutoSelect; }
public void Save(BetsLibrary.Bookmaker bookmaker) { BookmakerSettings settings = BookmakersSettingsCollection.Get(bookmaker); settings.Login = Login.Text; settings.Password = Password.Password; settings.IP = ProxyIP.Text; settings.Port = ProxyPort.Text; settings.ProxyLogin = ProxyLogin.Text; settings.ProxyPassword = ProxyPassword.Password; settings.UseProxy = UseProxy.IsChecked == true; settings.BetSize = BetSize.Text; settings.AutoSelect = AutoBet.IsChecked == true; BookmakersSettingsCollection.Save(); }
private void InitializeTitan() { BookmakerSettings settings = BookmakersSettingsCollection.Get(BetsLibrary.Bookmaker.Titanbet); TitanbetControl.FillControl(settings); }
private void InitializeLeon() { BookmakerSettings settings = BookmakersSettingsCollection.Get(BetsLibrary.Bookmaker.Leon); LeonControl.FillControl(settings); }
private void InitializeOlimp() { BookmakerSettings settings = BookmakersSettingsCollection.Get(BetsLibrary.Bookmaker.Olimp); OlimpControl.FillControl(settings); }
private void InitializeMarathon() { BookmakerSettings settings = BookmakersSettingsCollection.Get(BetsLibrary.Bookmaker.Marathonbet); MarathonControl.FillControl(settings); }