|
@@ -42,14 +42,14 @@ namespace WinBox
|
|
|
this.webBrowser1.Url = new System.Uri("http://tt-web.api.ai160.com/debug/build/stage/index/index.html", System.UriKind.Absolute);
|
|
|
this.Controls.Add(this.webBrowser1);
|
|
|
|
|
|
- // RunBat("C:\\Lingjiao\\winBoxNode\\start.bat");
|
|
|
+ RunBat("C:\\Lingjiao\\winBoxNode\\start.bat");
|
|
|
+
|
|
|
+ //检测端口
|
|
|
+ detectionPort();
|
|
|
}
|
|
|
|
|
|
- private void Form1_Activated(object sender, System.EventArgs e)
|
|
|
+ private void detectionPort()
|
|
|
{
|
|
|
- // Label1.Text = "x: " + x + " y: " + y;
|
|
|
- // Label2.Text = "Number of forms currently open: " + count;
|
|
|
-
|
|
|
string tcpPort = "9191";
|
|
|
try
|
|
|
{
|
|
@@ -78,11 +78,11 @@ namespace WinBox
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- MessageBox.Show("TCP:" + tcpPort + "端口没有被占用!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
|
|
|
+ //MessageBox.Show("TCP:" + tcpPort + "端口没有被占用!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
reader.Close();
|
|
|
process.Close();
|
|
|
}
|
|
@@ -92,8 +92,12 @@ namespace WinBox
|
|
|
MessageBox.Show("检测TCP端口:" + tcpPort + "失败!" + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
+ private void Form1_Activated(object sender, System.EventArgs e)
|
|
|
+ {
|
|
|
+ // Label1.Text = "x: " + x + " y: " + y;
|
|
|
+ // Label2.Text = "Number of forms currently open: " + count;
|
|
|
}
|
|
|
|
|
|
private void RunBat(string batPath)
|