Exemple #1
0
 /// <summary>
 /// Event handler for user click on createLabel.
 /// </summary>
 /// <param name="sender">The parameter is not used.</param>
 /// <param name="e">The parameter is not used.</param>
 private void CreateLabelClick(object sender, EventArgs e)
 {
     // Logic for creating a lobby.
     this.Hide();
     Lobby lobby = new Lobby();
     lobby.ShowDialog();
 }
Exemple #2
0
        /// <summary>
        /// Event handler for user click on createLabel.
        /// </summary>
        /// <param name="sender">The parameter is not used.</param>
        /// <param name="e">The parameter is not used.</param>
        private void CreateLabelClick(object sender, EventArgs e)
        {
            // Logic for creating a lobby.
            this.Hide();
            Lobby lobby = new Lobby();

            lobby.ShowDialog();
        }
Exemple #3
0
        private void SinglePlayerLabel_Click(object sender, EventArgs e)
        {
            // hide the main menu
            this.Hide();

            // send user to the lobby
            Lobby lobby = new Lobby();

            lobby.ShowDialog();
            this.Show();
        }
Exemple #4
0
        private void SinglePlayerLabel_Click(object sender, EventArgs e)
        {
            TestPingAndRam ramTest = new TestPingAndRam();
            var ramC = new PerformanceCounter("Memory", "Available MBytes");

            if (ramTest.CheckRam(ramC.NextValue()) == true)
            {
                // hide the main menu
                this.Hide();

                // send user to the lobby
                Lobby lobby = new Lobby();
                lobby.ShowDialog();
                this.Show();
            }
            else
            {
                MessageBox.Show("NOT ENOUGH AVAILABLE RAM MEMORY!!!");
            }
        }