catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
private static string getLocalIPAddress()
{
System.Net.IPAddress addr;
// 获得本机局域网IP地址
addr = new System.Net.IPAddress(Dns.GetHostEntry(Dns.GetHostName()).AddressList[0].GetAddressBytes());
return addr.ToString();
}
public void stop()
{
rev_data_thread.Abort();
rev_data_udp.Close();
}
}
}
private void button1_Click(object sender, EventArgs e)//屏幕监控按钮
{
if (textBox1.Text.Length < 5)
{
MessageBox.Show("被监控的客户端IP地址不允许空", "确信正确", MessageBoxButtons.OK);
return;
}
Program.order_string = "";//命令串,代表发送指令内容,为空则不操作客户端
rev_thread.send_monitor_to_client(comboBox1.Text, textBox1.Text);
}
|