示例#1
0
 public void GoTo(string address, Bookmaker bookmaker)
 {
     bookmakerSettings = BookmakersSettingsCollection.Get(bookmaker);
     if (bookmakerSettings.UseProxy)
     {
         SetProxy();
     }
     GoTo(address);
 }
示例#2
0
 public static BookmakerSettings Get(Bookmaker bookmaker)
 {
     if (!settingsDict.TryGetValue(bookmaker, out BookmakerSettings settings))
     {
         settings = new BookmakerSettings();
         settingsDict.Add(bookmaker, settings);
     }
     return(settings);
 }
示例#3
0
 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;
 }
示例#4
0
        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();
        }
示例#5
0
        private void InitializeTitan()
        {
            BookmakerSettings settings = BookmakersSettingsCollection.Get(BetsLibrary.Bookmaker.Titanbet);

            TitanbetControl.FillControl(settings);
        }
示例#6
0
        private void InitializeLeon()
        {
            BookmakerSettings settings = BookmakersSettingsCollection.Get(BetsLibrary.Bookmaker.Leon);

            LeonControl.FillControl(settings);
        }
示例#7
0
        private void InitializeOlimp()
        {
            BookmakerSettings settings = BookmakersSettingsCollection.Get(BetsLibrary.Bookmaker.Olimp);

            OlimpControl.FillControl(settings);
        }
示例#8
0
        private void InitializeMarathon()
        {
            BookmakerSettings settings = BookmakersSettingsCollection.Get(BetsLibrary.Bookmaker.Marathonbet);

            MarathonControl.FillControl(settings);
        }