private void NextQuestion()
 {
     if (_questionsEnumerator.MoveNext())
     {
         _selectedQuestion = _questionsEnumerator.Current;
         RedrawQuestion();
     }
     else
     {
         this.Hide();
         var questionTypePickerForm = new QuestionTypePickerForm();
         questionTypePickerForm.Show();
     }
 }
        private void okButton_Click(object sender, EventArgs e)
        {
            string login    = loginTextBox.Text;
            string password = passwordTextBox.Text;


            var userFound = Dao.GetUserByLogin(login);

            Console.WriteLine(@"userFound: " + userFound);

            if (userFound == null)
            {
                MessageBox.Show(@"Cannot find user: "******"Error",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                if (userFound.Password != password)
                {
                    MessageBox.Show(@"Incorrect password", @"Error",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    if (userFound.Type == UserType.Admin)
                    {
                        this.Hide();
                        var adminForm = new AdminForm();
                        adminForm.Show();
                    }
                    else
                    {
                        this.Hide();
                        var questionTypePickerForm = new QuestionTypePickerForm();
                        questionTypePickerForm.Show();
                    }
                }
            }
        }