private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e) { if (!string.IsNullOrEmpty(webBrowser2.StatusText) && pocetLoad == 0 && !webBrowser2.StatusText.Contains("vesmir.php")) { // Console.WriteLine(DateTime.Now +" "+pocetLoad); listHracov = jadro.parsujHracov(webBrowser2.Document.Window.Document.Body.InnerHtml); textBoxLog.AppendText(DateTime.Now + Environment.NewLine); pocetLoad = 1; if (webBrowser2.Document.Url.AbsolutePath.Contains("vesmir.php")) { dataGridView1.DataSource = null; var datasource = listHracov; dataGridView1.DataSource = datasource; jadro.SkontrolujHracov(datasource, this, listPodm, checkBox1.Checked, 0); if (kontrolaSily) { ZistiMnozstvoSily(kontrolovanyHrac); kontrolaSily = false; kontrolneVlakno.Abort(); } } else { // opatovne prihlasenie //koniec = true; //jadro.aktualnaSchema = listPodm; //jadro.casMedziDohozmi = refreshovaciCas; //jadro.casSpomalenia = casSpomalenia; //jadro.VykonajPrihlasenie(form.username.Text,form.password.Text); //this.Close(); } } }
private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e) { if (!string.IsNullOrEmpty(_webBrowser2.StatusText) && _pocetLoad == 0 && !_webBrowser2.StatusText.Contains("vesmir.php")) { listHracov = _jadro.parsujHracov(_webBrowser2.Document.Window.Document.Body.InnerHtml); var ee = listHracov.Contains(new Hrac(textBoxMenoHraca.Text, "", "")); if (!listHracov.Contains(new Hrac(textBoxMenoHraca.Text, "", ""))) { ZastavRefresh(); MessageBox.Show("Hrac v zadanej rase neexistuje", "Chyba", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { //_pocetLoad = 1; if (_webBrowser2.Document.Url.AbsolutePath.Contains("vesmir.php")) { _jadro.SkontrolujHracov(listHracov, this, _listPodm, false, 2); } } } }