You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ClientTest
{
/*
*ServerIPPortInputForm
*
*2010-10-30
*ip
*/
public partial class ServerIPPortInputForm : Form
{
public string sIP;
public int nPort;
public ServerIPPortInputForm()
{
InitializeComponent();
}
/*
*LoadIPPort
*
*2010-10-30
*string sIP ip, string sPort
*void
*ip
*/
public void LoadIPPort(string sIP, string sPort)
{
tbServerIP.Text = sIP;
tbServerPort.Text = sPort;
}
/*
*btnApply_Click
*
*2010-10-30
*object sender , EventArgs e
*void
*
*/
private void btnApply_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("重设目标服务器IP和端口有可能导致采集器不能联网。请确认是否继续",
"注意", MessageBoxButtons.OKCancel,
MessageBoxIcon.Warning);
if (result == DialogResult.OK)
{
this.DialogResult = DialogResult.OK;
sIP = tbServerIP.Text;
nPort = Convert.ToInt32(tbServerPort.Text);
}
else
{
this.DialogResult = DialogResult.Cancel;
}
}
}
}