Пример #1
0
        //与指定主机连接连接
        private void 指定主机SToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ScreenTimer.Enabled = false;
            frm_Connection Connection = new frm_Connection();
            DialogResult   result     = Connection.ShowDialog();

            if (result == DialogResult.OK)
            {
                System.Net.IPAddress serverIP;
                try
                {
                    serverIP = ICanSeeYou.Common.Network.ToIPAddress(Connection.ServerIP);
                }
                catch
                {
                    MessageBox.Show("IP地址错误!", "IP地址错误", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    return;
                }
                GeneralControler.BuiltControler(serverIP);
            }
        }