Ejemplo n.º 1
0
        private void AdminPanelButton_Click(object sender, EventArgs e)
        {
            this.Hide();

            string passwordFormName = "Redaktoriaus apsauga:";
            string expectedPassword = "******";
            var    adminPanelForm   = new AdminPanelForm();

            var passwordConfirmationForm = new PasswordConfirmationForm(passwordFormName, expectedPassword, adminPanelForm);

            passwordConfirmationForm.Closed += (s, args) => this.Close();

            passwordConfirmationForm.Show();
        }
Ejemplo n.º 2
0
        private void AllWordListSelectionButton_Click(object sender, EventArgs e)
        {
            this.Hide();

            if (CreatedAtLimitEnablingCheckBox.Checked)
            {
                var limitCriteria = new QueryCriteria
                {
                    Limit = (int?)CreatedAtLimitNumericUpDown.Value
                };

                _allWords = _wordsService.GetAllWords(limitCriteria);
            }

            SelectedLanguage selectedLanguage = GetSelectedLanguage();

            if (ShouldCheckGrammarCheckBox.Checked)
            {
                var allWordsGrammarTestForm = new AllWordsGrammarTestForm(selectedLanguage, _allWords);
                allWordsGrammarTestForm.Closed += (s, args) => this.Close();

                allWordsGrammarTestForm.Show();
            }
            else
            {
                string passwordFormName       = "Visų žodžių testo (žodžiu) apsauga:";
                string expectedPassword       = "******";
                var    allWordsVerbalTestForm = new AllWordsVerbalTestForm(selectedLanguage, _allWords);

                var passwordConfirmationForm =
                    new PasswordConfirmationForm(passwordFormName, expectedPassword, allWordsVerbalTestForm);
                passwordConfirmationForm.Closed += (s, args) => this.Close();

                passwordConfirmationForm.Show();
            }
        }