Esempio n. 1
0
        public InGameForm(Player me, ClientConnectionSys connection)
        {
            InitializeComponent();

            this.me = me;

            this.connect = connection;

            this.Show();
        }
Esempio n. 2
0
        public Renderer(GLControl x, Player me, ClientConnectionSys connect)
        {
            this.connect = connect;



            this.me = me;
            display = new mainRenClass(x, 100);
            textureObject.wayToTexturesFolder = Environment.CurrentDirectory + @"/Textures";
        }
Esempio n. 3
0
        private void button1join_Click(object sender, EventArgs e)
        {
            if (connection != null)
            {
                connection.disconnect();
            }

            me.name             = textBox3name.Text;
            me.online           = true;
            me.civSettings      = new CivSettings();
            me.civSettings.name = "Человеки";


            int port = 0;

            try
            {
                port = Convert.ToInt32(textBox2port.Text);


                Tested     = false;
                connection = new ClientConnectionSys(me, textBox1ip.Text, port, textBox4pass.Text);


                while (!Tested)
                {
                    Thread.Sleep(100);
                }

                if (SuccesConnected)
                {
                    game             = new InGameForm(me, connection);
                    game.FormClosed += game_FormClosed;
                    game.addToChat("Сервер", welcomeStr);
                    this.Hide();
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }