예제 #1
0
 public LearningForm(int currentTopic, CampaignForm campaignForm, FillBlankForm fillBquiz, MultipleChoiceForm multiQuiz)
 {
     InitializeComponent();
     darkMode = ManageUserAction.GetDarkMode();
     if (darkMode)
     {
         UpdateTheme();
     }
     this.KeyPreview   = true;
     this.campaignForm = campaignForm;
     this.fillBQuiz    = fillBquiz;
     this.multiQuiz    = multiQuiz;
     this.currentTopic = currentTopic;
     flList            = ManageUserAction.GetMainFlashCards();
     LoadComboBox();
     ChangeFlashCard(flList[index].Eng, flList[index].IdCard);
 }
예제 #2
0
        private void Start()
        {
            FillBlankForm fillBQuiz = new FillBlankForm(currentTopic, this);

            if (fillBQuiz.result == 0)
            {
                FinalForm f = new FinalForm(pnlTopicSelection);
                f.TopLevel = false;
                pnlTopicSelection.Hide();
                pnlCampaignCate.Controls.Add(f);
                f.FormBorderStyle = FormBorderStyle.None;
                f.Show();
                this.Reset();
                return;
            }

            MultipleChoiceForm multiQuiz = new MultipleChoiceForm(currentTopic, this);
            LearningForm       learning  = new LearningForm(currentTopic, this, fillBQuiz, multiQuiz);

            learning.TopLevel = false;
            pnlTopicSelection.Hide();
            pnlCampaignCate.Controls.Add(learning);
            learning.FormBorderStyle = FormBorderStyle.None;
            learning.Show();
            learning.StartTimerLearning();

            if (type == 0)
            {
                fillBQuiz.TopLevel = false;
                pnlTopicSelection.Hide();
                pnlCampaignCate.Controls.Add(fillBQuiz);
                fillBQuiz.FormBorderStyle = FormBorderStyle.None;
                fillBQuiz.Show();
            }
            else
            {
                multiQuiz.TopLevel = false;
                pnlTopicSelection.Hide();
                pnlCampaignCate.Controls.Add(multiQuiz);
                multiQuiz.FormBorderStyle = FormBorderStyle.None;
                multiQuiz.Show();
            }
        }