Exemplo n.º 1
0
        private void btnGrab_Click(object sender, EventArgs e)
        {
            if (ProxyManager.Proxies.Count != 0)
            {
                try
                {
                    GrabberThread = new Thread(() =>
                    {
                        new Grabber(Decimal.ToInt32(MaxThreads.Value), this).Grab();
                    });

                    GrabberThread.Start();

                    btnGrab.Enabled = false;

                    CounterTimer.Start();

                    MessageBox.Show(
                        "Grabber has started. This can take a while... be patient!",
                        "Info",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Information
                        );
                }
                catch
                {
                    ShowErrorMessage("An unknown error occured. Contact Raghav.");
                }
            }
            else
            {
                ShowErrorMessage("You need to import your proxies! Press \"Config...\" on the top left.");
            }
        }
Exemplo n.º 2
0
 public void StartCounter(int index, int repetitionsNumber, int interval)
 {
     this.repetitionsNumber = repetitionsNumber;
     RepetitionsLabel.Text  = "Ilość powtórzeń: " + repetitionsNumber.ToString();
     IntervalLabel.Text     = "Interwał: " + interval.ToString();
     CounterTimer.Interval  = interval;
     CounterTimer.Start();
     CounterTimer.Tick += CounterTimer_Tick;
     ResultLabel.Text   = "0";
 }