Beispiel #1
0
        private void gamespage_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmgame ss = new frmgame();

            ss.Show();
        }
Beispiel #2
0
        private void btnlog_Click(object sender, EventArgs e)
        {
            //check the file "txtusername and txtpass.text"
            string username = txtusername.Text;
            string password = txtpass.Text;

            int numberofusers = lstpass.Items.Count;

            //using loop cheeck the files
            for (int count = 0; count < numberofusers; count++)
            {
                if (lstpass.Items[count].ToString() == (username + password))
                {
                    MessageBox.Show("logged in as " + username);
                    this.Hide();
                    frmgame ss = new frmgame();
                    ss.Show();
                    break;
                }
            }
            MessageBox.Show("wrong password or username. please register.");
        }