Ejemplo n.º 1
0
        private void RunButton_Click(object sender, EventArgs e)
        {
            progressBar1.Maximum = Convert.ToInt32(RunTimesValue.Text);
            progressBar1.Step    = 1;
            progressBar1.Update();

            var spinRequest = new SpinRequest(this);

            spinRequest.Method = Verbs.GET;
            var pdata = spinRequest.PostData;

            var betReq = new BetRequest();

            var config = new Configurations
            {
                Export     = export.Checked,
                gameName   = GameValue.Text,
                TokenKey   = KeyValue.Text,
                TimeStamp  = TsValue.Text,
                currency   = currency.Text,
                multiplier = "1",
                GameType   = comboBox1.SelectedIndex.ToString()
            };
            var betRes = betReq.GetBetsRequest(config);

            config.RunTimes = Int32.Parse(RunTimesValue.Text);

            foreach (var bet in betRes)
            {
                config.Bet = bet;
                Console.WriteLine(config.Bet);
                spinRequest.SRequest(config);
            }

            DialogResult dialog = new DialogResult();

            dialog = MessageBox.Show("Do you want to close?", "Alert!", MessageBoxButtons.YesNo);

            if (dialog == DialogResult.Yes)
            {
                System.Environment.Exit(1);
            }
        }
Ejemplo n.º 2
0
        private void RunButton_Click(object sender, EventArgs e)
        {
            progressBar1.Maximum = Convert.ToInt32(RunTimesValue.Text);
            progressBar1.Step    = 1;
            progressBar1.Update();


            var config1     = new Configurations();
            var spinRequest = new SpinRequest(this);
            var authToken   = new AuthenticateToken();

            spinRequest.Method = Verbs.GET;
            var pdata = spinRequest.PostData;

            var betReq = new BetRequest();

            String keysValue = KeyValue.Text;

            config1.TokenNames = KeyValue.Text.Split(',');
            string gamesType = comboBox1.SelectedIndex.ToString();

            var configs = authToken.AuthTokens(config1).Select(t => {
                var result        = new Configurations();
                result.TokenKey   = t;
                result.gameName   = GameValue.Text;
                result.TimeStamp  = TsValue.Text;
                result.multiplier = multiplier.Text;
                result.Bet        = BetValue.Text;
                result.GameType   = gamesType;
                result.RunTimes   = Int32.Parse(RunTimesValue.Text);

                return(result);
            });

            Parallel.ForEach(configs, (conf, state) => {
                spinRequest.SRequest(conf);
                System.Threading.Thread.Sleep(3000);
            }
                             );
        }