Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (checkIP(textBox1.Text))
            {
                IPAddress.TryParse(textBox1.Text, out Singleton.Instance.ipAdress);

                //Server ser = new Server();
                Net.ConnectionBase b = new Net.ConnectionBase(Singleton.Instance.ipAdress, false, OpenGameForm);
                //Net.Client client = new Net.Client(textBox1.Text);
            }
        }
Ejemplo n.º 2
0
        private void CreateServer_Shown(Object sender, EventArgs e)
        {
            string ip = "";

            if (NetConnection.GetIP(ref ip))
            {
                IPAddress.TryParse(ip, out Singleton.Instance.ipAdress);
                label1.Text = "Your ip: " + ip;

                Net.ConnectionBase b = new Net.ConnectionBase(Singleton.Instance.ipAdress, true, OpenGameForm);
            }
        }