/
ExtraForm.cs
40 lines (34 loc) · 1.03 KB
/
ExtraForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
namespace robot
{
public partial class ExtraForm : DevComponents.DotNetBar.Metro.MetroForm
{
static public WebBrowser browser;
static public bool isEnd;
public ExtraForm(string url)
{
InitializeComponent();
browser = webBrowser;
browser.Navigate(url);
browser.ScriptErrorsSuppressed = true;
}
private void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (browser.Document.Body.InnerText.IndexOf("Reserving Group study Rooms") != -1)
{
this.Visible = false;
}
}
private void webBrowser_NewWindow(object sender, CancelEventArgs e)
{
e.Cancel = true;
}
}
}