Beispiel #1
0
        private void Chk_randomOrderQuestions_CheckedChanged(object sender, EventArgs e)
        {
            Quiz.ProgressData.AskQuestionsInRandomOrder = chk_randomOrderQuestions.Checked;

            CardPicker.NewRound(Quiz);
            Program.frmQuizPractise.SetCard();
            QuizCore.SaveQuizProgress(Quiz);
        }
Beispiel #2
0
        private void Chk_intelligentLearning_CheckedChanged(object sender, EventArgs e)
        {
            Quiz.ProgressData.FullTestInProgress = !chk_intelligentLearning.Checked;

            CardPicker.NewRound(Quiz);
            Program.frmQuizPractise.SetCard();
            Program.frmQuizPractise.UpdateCardSideTypeLabels();
            QuizCore.SaveQuizProgress(Quiz);
        }
Beispiel #3
0
        private void Rdo_answerFront_CheckedChanged(object sender, EventArgs e)
        {
            Quiz.ProgressData.AnswerCardSide = rdo_answerFront.Checked ? QuizProgressData.CardSide.Front : QuizProgressData.CardSide.Back;

            CardPicker.NewRound(Quiz);
            Program.frmQuizPractise.SetCard();
            Program.frmQuizPractise.UpdateCardSideTypeLabels();
            QuizCore.SaveQuizProgress(Quiz);
        }
        private void nud_minAnsTriesSkip_ValueChanged(object sender, EventArgs e)
        {
            Quiz.ProgressData.MinimumTriesCountToConsiderSkippingQuestion = (int)nud_minAnsTriesSkip.Value;

            if (!Quiz.ProgressData.FullTestInProgress)
            {
                CardPicker.NewRound(Quiz);
                Program.frmQuizPractise.SetCard();
                QuizCore.SaveQuizProgress(Quiz);
            }
        }
        private void Rdo_lastNattemptsIntelligentLearning_CheckedChanged(object sender, EventArgs e)
        {
            if (rdo_lastNattemptsIntelligentLearning.Checked)
            {
                Quiz.ProgressData.IntelligentLearningLastAnswersBasisCount = (int)nud_intelligentLearningAttempsCount.Value;

                if (!Quiz.ProgressData.FullTestInProgress)
                {
                    CardPicker.NewRound(Quiz);
                    Program.frmQuizPractise.SetCard();
                    QuizCore.SaveQuizProgress(Quiz);
                }
            }
        }
Beispiel #6
0
        public QuizPractise(Quiz quiz, QuizPractiseMode quizPractiseMode)
        {
            InitializeComponent();

            Quiz         = quiz;
            PractiseMode = quizPractiseMode;

            WindowState = Program.frmDashboard.WindowState;
            if (WindowState == FormWindowState.Normal)
            {
                Size = Program.frmDashboard.Size;
            }
            Location = new Point(Program.frmDashboard.Location.X + (Program.frmDashboard.Size.Width / 2) - (this.Size.Width / 2),
                                 Program.frmDashboard.Location.Y + (Program.frmDashboard.Size.Height / 2) - (this.Size.Height / 2));

            lbl_cardQuestionSideType.Text = Quiz.ProgressData.AnswerCardSide == CardSide.Front ? Quiz.CardBackType : Quiz.CardFrontType;
            lbl_cardAnswerSideType.Text   = Quiz.ProgressData.AnswerCardSide == CardSide.Front ? Quiz.CardFrontType : Quiz.CardBackType;

            this.Text = $"{Path.GetFileNameWithoutExtension(Quiz.QuizIdentity.FindQuizPath())} - SteelQuiz";
            if (MetaData.PRE_RELEASE)
            {
                this.Text += $" v{Application.ProductVersion} PRE-RELEASE";
            }

            if (Quiz.ProgressData.FullTestInProgress)
            {
                lbl_intelligentLearning.Text = "Intelligent Learning: Disabled";
            }
            else
            {
                lbl_intelligentLearning.Text = "Intelligent Learning: Enabled";
            }

            SetTheme(GeneralTheme);

            if ((CurrentCard = CardPicker.GenerateCard(Quiz)) == null)
            {
                // Initiate new round if it hasn't previously been done - for instance if this quiz has never been practised before by the user.
                CardPicker.NewRound(Quiz);
            }

            SetCard();
        }
Beispiel #7
0
        /// <summary>
        /// Generates a card to be shown - or shows the last one from the previous session if it hadn't been answered.
        /// </summary>
        public void SetCard()
        {
            newRoundPending   = false;
            newCardPending    = false;
            userCopyingAnswer = false;

            foreach (var c in lbl_cardSideToAsk.Controls.OfType <CorrectAnswer>())
            {
                lbl_cardSideToAsk.Controls.Remove(c);
                c.Dispose();
            }
            foreach (var c in lbl_cardSideToAsk.Controls.OfType <WrongAnswer>())
            {
                lbl_cardSideToAsk.Controls.Remove(c);
                c.Dispose();
            }
            foreach (var c in lbl_cardSideToAsk.Controls.OfType <RoundCompleted>())
            {
                lbl_cardSideToAsk.Controls.Remove(c);
                c.Dispose();
            }
            foreach (var c in lbl_cardSideToAnswer.Controls.OfType <MultiAnswer>())
            {
                lbl_cardSideToAnswer.Controls.Remove(c);
                c.Dispose();
            }

            llb_overrideIwasRight.Visible = false;
            pnl_knewAnswer.Visible        = false;

            CurrentInput = "";

            CurrentCard = CardPicker.GenerateCard(Quiz);
            if (CurrentCard == null)
            {
                // Round completed

                var roundCompleted = new RoundCompleted(Quiz, PractiseMode, this);
                lbl_cardSideToAsk.Controls.Add(roundCompleted);
                roundCompleted.Show();
                CardPicker.NewRound(Quiz);
                lbl_cardSideToAnswer.Text = "";
                newRoundPending           = true;

                return;
            }

            if (PractiseMode == QuizPractiseMode.Writing)
            {
                if (!IsCurrentCardMultiAnswer())
                {
                    lbl_cardSideToAnswer.Text = "Enter your answer ...";
                }
                else
                {
                    // Multi Answer Card
                    var multiAns = new MultiAnswer();
                    lbl_cardSideToAnswer.Text = "";
                    foreach (var card in CurrentCard.MultiAnswersAlreadyEntered(Quiz))
                    {
                        multiAns.CurrentLabel.Text = card.GetSideToAnswer(Quiz);
                        multiAns.CurrentLabel.Clone();
                    }
                    multiAns.CurrentLabel.Text = "Enter your answers ...";
                    lbl_cardSideToAnswer.Controls.Add(multiAns);
                }
            }
            else
            {
                lbl_cardSideToAnswer.Text = "Click here to reveal";
            }
            cardSideAnswerPromptBeingShown = true;


            if (Quiz.ProgressData.GetLearningProgress() == 1.0)
            {
                if (!Quiz.ProgressData.MasterNoticeShowed)
                {
                    MessageBox.Show("Congratulations! It seems you have learned the whole quiz! Practise until you feel confident - then start a full test, through the " +
                                    "quiz config menu, by clicking the gear button in the bottom right corner", "Quiz Mastered!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Quiz.ProgressData.MasterNoticeShowed = true;
                }
            }
        }