Ejemplo n.º 1
0
        private void runForm1(object sender, EventArgs e)
        {
            Button b = sender as Button;

            if (Constance.IsIPv4(textBox2.Text))
            {
                Player p = new Player(textBox2.Text, textBox1.Text);
                if (b.Tag == "SRV")
                {
                    isServer = true;
                }


                if (textBox1.Text != "")
                {
                    this.Hide();
                    F1 = new Form1(isServer, p, this.Location, this);

                    pl = p;
                    F1.updatee(isServer, pl, this.Location, this);
                    F1.Update();
                    F1.Show();

                    F1.Visible = true;
                    srv        = new Server(pl);
                }
            }
            else
            {
                textBox2.Text = "No valid IP";
            }
        }
Ejemplo n.º 2
0
        public Form2()
        {
            InitializeComponent();

            textBox2.Text = Constance.GetLocalIPAddress();
        }