Ejemplo n.º 1
0
        private void MultiPlayerLabel_Click(object sender, EventArgs e)
        {
            // Test Ping and Ram. If both pass, hide main menu and make lobby finder form.
            TestPingAndRam pingRamTest = new TestPingAndRam();
            long max_ping = 300;
            string ip = "www.google.com";
            var ramC = new PerformanceCounter("Memory", "Available MBytes");

            if (pingRamTest.CheckPing(max_ping, ip) == true)
            {
                if (pingRamTest.CheckRam(ramC.NextValue()) == true)
                {
                    // hide main menu
                    this.Hide();

                    // make lobby finder form.
                    LobbyFinder lobbyFinder = new LobbyFinder();
                    lobbyFinder.ShowDialog();
                    this.Show();
                }
                else
                {
                    MessageBox.Show("NOT ENOUGH AVAILABLE RAM MEMORY!!!");
                }
            }
            else
            {
                MessageBox.Show("NETWORK CONNECTION FAILED!!! ERROR(Ping Test)");
            }
        }
Ejemplo n.º 2
0
        private void MultiPlayerLabel_Click(object sender, EventArgs e)
        {
            // hide main menu
            this.Hide();

            // make lobby finder form.
            LobbyFinder lobbyFinder = new LobbyFinder();

            lobbyFinder.ShowDialog();
            this.Show();
        }