This commit is contained in:
16
Form1.cs
16
Form1.cs
@@ -6,15 +6,17 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace WebChecker
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
const int CHECK_PERIOD = 30000;
|
||||
const int CHECK_PERIOD = 1000*30;
|
||||
|
||||
WebBrowser wb = new WebBrowser();
|
||||
string url = "http://me.sayclub.com/profile/home/view/ban8";
|
||||
//string url = "http://me.sayclub.com/profile/home/view/tosvmfks53";
|
||||
Timer m_Timer = new Timer();
|
||||
|
||||
int m_iReqCnt = 0;
|
||||
@@ -37,6 +39,16 @@ namespace WebChecker
|
||||
wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted);
|
||||
}
|
||||
|
||||
void Alert(string message)
|
||||
{
|
||||
this.Show();
|
||||
this.TopMost = true;
|
||||
FlashWindow.Start(this);
|
||||
|
||||
MessageBox.Show(this, message);
|
||||
FlashWindow.Stop(this);
|
||||
}
|
||||
|
||||
void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
|
||||
{
|
||||
if(e.Url.Host != wb.Url.Host)
|
||||
@@ -61,7 +73,7 @@ namespace WebChecker
|
||||
if(attr.IndexOf("login") >= 0)
|
||||
{
|
||||
Process.Checked = false;
|
||||
MessageBox.Show("logged in");
|
||||
Alert("logged in");
|
||||
}
|
||||
|
||||
lbStatus.Text = "상태 : 체크 완료";
|
||||
|
||||
Reference in New Issue
Block a user