Ejemplo n.º 1
0
 private void bwurl1_TextChanged(object sender, EventArgs e)
 {
     try
     {
         Web1.Navigate(new Uri(bwurl1.Text));
     }
     catch
     {
     }
 }
Ejemplo n.º 2
0
        private void cmGetAll_Click(object sender, EventArgs e)
        {
            var tCnt = default(int);

            lbStatus.BackColor = Color.FromArgb(255, 128, 255, 128);
            OBJ_Enable(false);

            // R4.30 Loop thru all URLs to get the LAST PAGE value from the redirected URL.
            for (int t = 1; t <= 7; t++)
            {
                for (int tt = 1; tt <= 4; tt++)
                {
                    tCnt += 1;
                    if (!string.IsNullOrEmpty(SearchURL[t, tt]) & SearchStop == false)
                    {
                        lbStatus.Text = "Searching " + tCnt + " of 28";
                        Web1.Navigate(SearchURL[t, tt]);
                        WAIT_Time(1);

                        // R4.30 Loop here while DOC COMPLETED task checks status of search.
                        while (SearchFound == false & SearchStop == false)
                        {
                            Application.DoEvents();
                        }

                        // R4.30 Calc APPROX # of players assuming 40 players per page.
                        _LVLs[t, tt] = (SearchPage * 40L).ToString();

                        // R4.30 Reset our search flags.
                        SearchFound = false;
                        SearchPage  = 0L;
                    }
                }
            }

            if (SearchStop == false)
            {
                lbStatus.Text = "Search Complete.";
                DATA_Show();
            }
            else
            {
                lbStatus.Text = "Search Aborted.";
                SearchStop    = false;
            }

            lbStatus.BackColor = Color.FromArgb(255, 128, 128, 128);
            OBJ_Enable(true);
        }
Ejemplo n.º 3
0
 private void cmATAxis_Click(object sender, EventArgs e)
 {
     lbStatus.Text = "";
     Application.DoEvents();
     if (rb2v2.Checked)
     {
         Web1.Navigate("http://www.companyofheroes.com/leaderboards#global/team-of-2/axis/by-rank?page=10000");
     }
     if (rb3v3.Checked)
     {
         Web1.Navigate("http://www.companyofheroes.com/leaderboards#global/team-of-3/axis/by-rank?page=10000");
     }
     if (rb4v4.Checked)
     {
         Web1.Navigate("http://www.companyofheroes.com/leaderboards#global/team-of-4/axis/by-rank?page=10000");
     }
 }
Ejemplo n.º 4
0
 private void cm1v1Okw_Click(object sender, EventArgs e)
 {
     lbStatus.Text = "";
     Application.DoEvents();
     if (rb1v1.Checked)
     {
         Web1.Navigate("http://www.companyofheroes.com/leaderboards#global/1v1/wgerman/by-rank?page=10000");
     }
     if (rb2v2.Checked)
     {
         Web1.Navigate("http://www.companyofheroes.com/leaderboards#global/2v2/wgerman/by-rank?page=10000");
     }
     if (rb3v3.Checked)
     {
         Web1.Navigate("http://www.companyofheroes.com/leaderboards#global/3v3/wgerman/by-rank?page=10000");
     }
     if (rb4v4.Checked)
     {
         Web1.Navigate("http://www.companyofheroes.com/leaderboards#global/4v4/wgerman/by-rank?page=10000");
     }
 }
Ejemplo n.º 5
0
        private void cmGetAllActual_Click(object sender, EventArgs e)
        {
            long TLast   = 0L;
            int  SameCnt = 0;
            int  tCnt    = 0;

            lbStatus.BackColor = Color.FromArgb(255, 128, 255, 128);
            OBJ_Enable(false);

            // R4.30 Loop thru all URLs to get the LAST PAGE value from the redirected URL.
            SearchActual = true;
            for (int t = 1; t <= 7; t++)
            {
                for (int tt = 1; tt <= 4; tt++)
                {
                    tCnt += 1;
                    if (!string.IsNullOrEmpty(SearchURL[t, tt]) & SearchStop == false)
                    {
                        lbStatus.Text = "Searching " + tCnt + " of 28";
                        SearchPage    = 0L;
                        Web1.Navigate(SearchURL[t, tt]);

                        // R4.30 Loop here while DOC COMPLETED task checks status of search.
                        while (SearchFound == false & SearchStop == false)
                        {
                            // WAIT_Time(1)
                            WAIT_TimeMS(500);
                            TLast      = SearchPage;
                            SearchPage = 0L;
                            HTML_Search();
                            if (TLast == SearchPage & 1000L < SearchPage)
                            {
                                SearchFound = true;
                                SameCnt     = 0;
                            }
                        }

                        // R4.30 # of players.
                        _LVLs[t, tt] = SearchPage.ToString();

                        // R4.30 Reset our search flags.
                        SearchFound = false;
                        SearchPage  = 0L;
                    }
                }
            }

            SearchActual = false;
            if (SearchStop == false)
            {
                lbStatus.Text = "Search Complete.";
                DATA_Show();
            }
            else
            {
                lbStatus.Text = "Search Aborted.";
                SearchStop    = false;
            }

            lbStatus.BackColor = Color.FromArgb(255, 128, 128, 128);
            OBJ_Enable(true);
        }