public Form6()
{
client = new TcpClient();
InitializeComponent();
}
const int BufferSize = 8192;//缓存大小
Regex r = new Regex(@"(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])");
public TcpClient client;
public NetworkStream stream;
// public Thread thread;
public Thread thread1;
IPEndPoint iep;
private void button1_Click(object sender, EventArgs e)
{
if (this.button1.Text != "取消")
{
if (!r.IsMatch(this.textBox1.Text))
{
MessageBox.Show("你输入的IP地址有错,请检查后重新输入", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.textBox1.Focus();
}
else
{
this.button1.Text = "取消";
{
client = new TcpClient();
InitializeComponent();
}
const int BufferSize = 8192;//缓存大小
Regex r = new Regex(@"(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])");
public TcpClient client;
public NetworkStream stream;
// public Thread thread;
public Thread thread1;
IPEndPoint iep;
private void button1_Click(object sender, EventArgs e)
{
if (this.button1.Text != "取消")
{
if (!r.IsMatch(this.textBox1.Text))
{
MessageBox.Show("你输入的IP地址有错,请检查后重新输入", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.textBox1.Focus();
}
else
{
this.button1.Text = "取消";