Esempio n. 1
0
 private void ConnectCheck()
 {
     connectCheck = true;
     WB_Main.Navigate("https://heroes-wow.com/wotlk/index.php?page=login");
     Log("Checking if user is online...");
     LBL_Status.Text = "Checking if user is online...";
 }
Esempio n. 2
0
 private void disconnectMeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!enabled && !connectCheck && !needConnect)
     {
         Log("User wants to be disconnected. Redirecting...");
         disconnecting = true;
         WB_Main.Navigate("https://heroes-wow.com/");
     }
 }
Esempio n. 3
0
 private void refreshToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!voting && !needConnect)
     {
         Log("Refreshing current page.");
         WB_Main.Navigate("https://heroes-wow.com/wotlk/");
     }
     else
     {
         MessageBox.Show("Please wait until your current task is done.");
     }
 }
Esempio n. 4
0
 private void TM_ConnectedCheck_Tick(object sender, EventArgs e)
 {
     TM_ConnectedCheck.Stop();
     Log("He isn't. Prompting user to log in.");
     if (WindowState == FormWindowState.Minimized)
     {
         NTI_Main.Visible = false;
         Show();
         WindowState = FormWindowState.Normal;
     }
     MessageBox.Show("Please connect to Heroes-WoW's website.");
     LBL_Status.Text            = "Waiting for connection...";
     needConnect                = true;
     ((Control)WB_Main).Enabled = true;
     WB_Main.Navigate("https://heroes-wow.com/wotlk/index.php?page=login");
 }
Esempio n. 5
0
 private void Disconnect()
 {
     if (disconnecting)
     {
         if (WB_Main.Url.ToString() == "https://heroes-wow.com/")
         {
             WB_Main.Navigate("https://heroes-wow.com/wotlk/logout.php");
         }
         else if (WB_Main.Url.ToString() == "https://heroes-wow.com/wotlk/")
         {
             disconnecting = false;
             Log("Done ! Now closing.");
             MessageBox.Show("Done !");
             Application.Exit();
         }
     }
 }
Esempio n. 6
0
 private void Vote(bool online)
 {
     voting = true;
     if (!online)
     {
         ConnectCheck();
     }
     else
     {
         Log("Voting...");
         LBL_Status.Text = "Voting...";
         currentSite++;
         if (!InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Fwww.xtremetop100.com%2Fout.php%3Fsite%3D1132349385"))
         {
             MessageBox.Show("An error occurred. Please open a bug report on Github with this error code : " + GetLastError());
         }
         WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=1");
     }
 }
Esempio n. 7
0
 private void EnableDisable()
 {
     if (!enabled)
     {
         Log("Enabling.");
         enabled = true;
         BT_EnableDisable.Text = "Disable";
         TM_VoteCheck.Interval = 10;
         TM_VoteCheck.Start();
     }
     else
     {
         Log("Disabling.");
         enabled = false;
         if (voting)
         {
             WB_Main.Navigate("https://heroes-wow.com/wotlk/");
         }
         currentSite           = 0;
         BT_EnableDisable.Text = "Enable";
         LBL_Status.Text       = "Ready !";
         TM_VoteCheck.Stop();
     }
 }
Esempio n. 8
0
 private void OnClick_OpenUrl(Object sender, RoutedEventArgs e)
 {
     WB_Main.Navigate(TB_BrowserURL.Text);
 }
Esempio n. 9
0
        private void TM_VoteProcess_Tick(object sender, EventArgs e)
        {
            TM_VoteProcess.Stop();
            WB_Main.AllowNavigation = true;
            switch (currentSite)
            {
            case 1:
                currentSite++;
                InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Fwww.top100arena.com%2Fout.asp%3Fid%3D44752");
                WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=2");
                break;

            case 2:
                currentSite++;
                InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Fwww.openwow.com%2Fvisit%3D2125");
                WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=3");
                break;

            case 3:
                currentSite++;
                InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Fwww.rpg-paradize.com%2Fsite-Heroes%2BWoW%2B548%2Band%2B335a%2B255%2BLevel-22237");
                WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=4");
                break;

            case 4:
                currentSite++;
                InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Ftopg.org%2Fserver-heroes-wow-id347987");
                WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=5");
                break;

            case 5:
                currentSite++;
                InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Fwww.wowstatus.net%2F%7Ewowstatus%2Fserverlist%2Fout%2Fid%2F725206%2Flink%2Fhomepage");
                WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=6");
                break;

            case 6:
                currentSite += 2;
                InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Ftopwow.ru%2Findex.php");
                WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=8");
                break;

            case 8:
                currentSite += 2;
                InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Fwww.wowtop.es%2Findex.php");
                WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=10");
                break;

            case 10:
                currentSite++;
                InternetSetCookie("http://heroes-wow.com", "HTTP_REFERER", "http%3A%2F%2Fwww.gowonda.com%2Fserveur-wow-4956-Heroes-WoW-5.4.8-and-3.3.5a-255-Level.htm");
                WB_Main.Navigate("https://heroes-wow.com/wotlk/execute.php?take=vote&site=11");
                break;

            case 11:
                Log("Successfully voted !");
                LBL_Status.Text = "Successfully voted !";
                voting          = false;
                currentSite     = 0;
                if (!File.Exists("LastVote"))
                {
                    File.Create("LastVote").Close();
                }
                StreamWriter writer = new StreamWriter("LastVote");
                writer.Write(DateTime.Now);
                writer.Close();
                TM_VoteCheck.Start();
                WB_Main.Navigate("http://heroes-wow.com/wotlk/");
                break;
            }
        }