1
Soo jive完成了我在c#中的第一個項目之一,但後來我運行upp在這個 「實時事件:斷點命中:Timer1_tick,Forn斷點或跟蹤點被調試器擊中。我不能真的發現任何錯誤白衣我的代碼洙我不真的知道如何解決這裏這是代碼香港專業教育學院一直在努力C#斷點碰到調試器
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
webBrowser1.Navigate("mywebsite.com");
webBrowser1.ScriptErrorsSuppressed = true;
}
private int failed = 0;
string startbet = "250";
string bet2 = "150000";
string bet3 = "300000";
string bet4 = "600000";
string bet5 = "1200000";
string bet6 = "2400000";
string bet7 = "4800000";
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("brukernavn")[0].SetAttribute("value", textBox1.Text);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("passord")[0].SetAttribute("value", textBox2.Text);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("login_buton")[0].InvokeMember("click");
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
webBrowser1.Navigate("mywebsite.com/gamblingsite.php");
webBrowser1.DocumentCompleted += Krigside;
timer1.Enabled = false;
}
private void Krigside(object sender, WebBrowserDocumentCompletedEventArgs e)
{
webBrowser1.DocumentCompleted -= Krigside;
timer2.Enabled = true;
timer2.Interval = 1000;
}
private void timer2_Tick(object sender, EventArgs e)
{
if (webBrowser1.DocumentText.Contains("bokstavene"))
{
MessageBox.Show("Anti-bot! du har 60 sekunder på og fullføre!");
timer2.Enabled = true;
timer2.Interval = 60000; //60 sekunder før den sjekker anti-bot igjen.
}
else
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("bet")[0].SetAttribute("value", startbet);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("start")[0].InvokeMember("click");
timer2.Enabled = false;
webBrowser1.DocumentCompleted += SjekkVinnFeil;
}
}
private void SjekkVinnFeil(object sender, WebBrowserDocumentCompletedEventArgs e)
{
MessageBox.Show("KRIG SIDEN ER KLAR!");
webBrowser1.DocumentCompleted -= SjekkVinnFeil;
if (webBrowser1.DocumentText.Contains("taper"))
{
failed += 1;
}
else
{
failed = 0;
}
timer3.Enabled = true;
}
private void timer3_Tick(object sender, EventArgs e)
{
if (webBrowser1.DocumentText.Contains("bokstavene"))
{
MessageBox.Show("Anti-bot! du har 60 sekunder på og fullføre!");
timer3.Enabled = true;
timer3.Interval = 60000; //60 sekunder før den sjekker anti-bot igjen.
}
else if (failed == 3)
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("bet")[0].SetAttribute("value", bet2);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("start")[0].InvokeMember("click");
timer3.Enabled = false;
webBrowser1.DocumentCompleted += SjekkVinnFeil;
}
else if (failed == 4)
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("bet")[0].SetAttribute("value", bet3);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("start")[0].InvokeMember("click");
timer3.Enabled = false;
webBrowser1.DocumentCompleted += SjekkVinnFeil;
}
else if (failed == 5)
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("bet")[0].SetAttribute("value", bet4);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("start")[0].InvokeMember("click");
timer3.Enabled = false;
webBrowser1.DocumentCompleted += SjekkVinnFeil;
}
else if (failed == 6)
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("bet")[0].SetAttribute("value", bet5);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("start")[0].InvokeMember("click");
timer3.Enabled = false;
webBrowser1.DocumentCompleted += SjekkVinnFeil;
}
else if (failed == 7)
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("bet")[0].SetAttribute("value", bet6);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("start")[0].InvokeMember("click");
timer3.Enabled = false;
webBrowser1.DocumentCompleted += SjekkVinnFeil;
}
else if (failed == 8)
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("bet")[0].SetAttribute("value", bet7);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("start")[0].InvokeMember("click");
timer3.Enabled = false;
webBrowser1.DocumentCompleted += SjekkVinnFeil;
}
else
{
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("bet")[0].SetAttribute("value", startbet);
webBrowser1.Document.GetElementsByTagName("input").GetElementsByName("start")[0].InvokeMember("click");
timer3.Enabled = false;
webBrowser1.DocumentCompleted += SjekkVinnFeil;
}
}
private void button2_Click(object sender, EventArgs e)
{
timer1.Enabled = false;
timer2.Enabled = false;
timer3.Enabled = false;
MessageBox.Show("Stoppet!");
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
}
}
和我一直都在我的代碼一對夫婦的時間,現在whitout理解什麼是錯洙我希望這裏的任何人都能幫助我告訴我做錯了什麼。即時通訊新鮮的C#所以我希望你能幫助我,因爲我已經嘗試搜索問題沒有任何解決它的運氣。
謝謝你幫我解決這個問題我不知道它是那麼容易謝謝主席先生:) –