コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ClientStatus.client   = new TcpClient();
            ClientStatus.serverip = IPAddress.Parse(textBox1.Text);;



            try
            {
                ClientStatus.client.Connect(ClientStatus.serverip, 50000);
            }
            catch (Exception ee)
            {
                MessageBox.Show("Server not found\r\n" + "Check the server IP again!");
                return;
            }



            Form_Roomba form_Roomba;

            ClientStatus.Connect();
            form_Roomba = new Form_Roomba(this);
            form_Roomba.Show();
            this.Hide();
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ClientStatus.client   = new TcpClient();
            ClientStatus.serverip = IPAddress.Parse(textBox1.Text);;



            try
            {
                ClientStatus.client.Connect(ClientStatus.serverip, 50000);
            }
            catch (Exception ee)
            {
                MessageBox.Show("Server not found\r\n" + "Check the server IP again!");
                return;
            }



            Form_BOCU form_BOCU;


            try
            {
                ClientStatus.Connect();

                form_BOCU = new Form_BOCU(this);
                form_BOCU.Show();
                this.Hide();
            }
            catch (Exception ee)
            {
                MessageBox.Show("Another <" + ClientStatus.type + " > is already connected to the server.");
                return;
            }
        }