Exemplo n.º 1
0
        /// <summary>
        /// Opens a new MainWindow with the last hostname and name that the client used.
        /// </summary>
        public MainWindow(string hostname, string name)
        {
            InitializeComponent();
            Play_Button.Focus();

            IPAddress_Text_Box.Text = hostname;
            Name_Text_Box.Text      = name;

            model = new BoggleClientModel();
        }
Exemplo n.º 2
0
 private void Nickname_Tb_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         Play_Button.PerformClick();
         // these last two lines will stop the beep sound
         e.SuppressKeyPress = true;
         e.Handled          = true;
     }
 }
Exemplo n.º 3
0
 //Purpose: When Clicked it will output the instructions for the game
 //and show and hide any components that is needed
 //Requires: Nothing
 //Returns: Nothing
 private void Play_Button_Click(object sender, EventArgs e)
 {
     Question_Box.Show();
     Question_Box.Font = new Font("Arial", 15, FontStyle.Regular);
     Question_Box.AppendText(string.Format("Welcome to the Press Your Luck Game!"));
     Question_Box.AppendText(string.Format(" This is a Game Played with Three Players!"));
     Question_Box.AppendText(string.Format(" You will first answer four trivia questions."));
     Question_Box.AppendText(string.Format(" After that starting with player."));
     Question_Box.AppendText(string.Format(" earn money"));
     Question_Box.AppendText(string.Format(" by spinning a randomly moving board."));
     Question_Box.AppendText(string.Format(" Watch out though hit a whammy and lose it all."));
     Question_Box.AppendText(string.Format("Once all names are entered please"));
     Question_Box.AppendText(string.Format(" hit Start Game to continue!\n"));
     Question_Box.AppendText(string.Format("Now, will you please enter in your name's"));
     Play_Button.Hide();
     Set_Name.Show();
     Player1_textBox.Show();
     playertwo_TextBox.Show();
     Playerthree_textBox.Show();
     Playerthree_label.Show();
     Playertwo_Label.Show();
     Playerone_Label.Show();
 }