This commit is contained in:
2014-10-08 11:09:53 +00:00
parent ddc18468dc
commit b2929f0d27
3 changed files with 30 additions and 1 deletions

13
Form1.Designer.cs generated
View File

@@ -36,6 +36,7 @@
this.lbReqCnt = new System.Windows.Forms.Label(); this.lbReqCnt = new System.Windows.Forms.Label();
this.lbRespCnt = new System.Windows.Forms.Label(); this.lbRespCnt = new System.Windows.Forms.Label();
this.lbStatus = new System.Windows.Forms.Label(); this.lbStatus = new System.Windows.Forms.Label();
this.btOpen = new System.Windows.Forms.Button();
this.SuspendLayout(); this.SuspendLayout();
// //
// Process // Process
@@ -91,11 +92,22 @@
this.lbStatus.TabIndex = 4; this.lbStatus.TabIndex = 4;
this.lbStatus.Text = "상태 : 대기"; this.lbStatus.Text = "상태 : 대기";
// //
// btOpen
//
this.btOpen.Location = new System.Drawing.Point(280, 49);
this.btOpen.Name = "btOpen";
this.btOpen.Size = new System.Drawing.Size(75, 23);
this.btOpen.TabIndex = 5;
this.btOpen.Text = "Open";
this.btOpen.UseVisualStyleBackColor = true;
this.btOpen.Click += new System.EventHandler(this.btOpen_Click);
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(367, 212); this.ClientSize = new System.Drawing.Size(367, 212);
this.Controls.Add(this.btOpen);
this.Controls.Add(this.lbStatus); this.Controls.Add(this.lbStatus);
this.Controls.Add(this.lbRespCnt); this.Controls.Add(this.lbRespCnt);
this.Controls.Add(this.lbReqCnt); this.Controls.Add(this.lbReqCnt);
@@ -118,6 +130,7 @@
private System.Windows.Forms.Label lbReqCnt; private System.Windows.Forms.Label lbReqCnt;
private System.Windows.Forms.Label lbRespCnt; private System.Windows.Forms.Label lbRespCnt;
private System.Windows.Forms.Label lbStatus; private System.Windows.Forms.Label lbStatus;
private System.Windows.Forms.Button btOpen;
} }
} }

View File

@@ -19,7 +19,6 @@ namespace WebChecker
int m_iReqCnt = 0; int m_iReqCnt = 0;
int m_iRespCnt = 0; int m_iRespCnt = 0;
string m_strStatus = "";
DateTime m_LastCheckT; DateTime m_LastCheckT;
@@ -143,5 +142,22 @@ namespace WebChecker
this.Show(); this.Show();
this.WindowState = FormWindowState.Normal; this.WindowState = FormWindowState.Normal;
} }
private void btOpen_Click(object sender, EventArgs e)
{
try
{
System.Diagnostics.Process.Start(tbURL.Text);
}
catch(System.ComponentModel.Win32Exception noBrowser)
{
if(noBrowser.ErrorCode == -2147467259)
MessageBox.Show(noBrowser.Message);
}
catch(System.Exception other)
{
MessageBox.Show(other.Message);
}
}
} }
} }

BIN
internet-url-31211.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB