Exemplo n.º 1
0
        public NavForm(UserAccessForm userAccess, int currentID)
        {
            this.userAccess = userAccess;
            this.currentID  = currentID;
            InitializeComponent();


            // Update UserID và Connect đến database để load ReFlashCard của User
            ManageUserAction.UpdateUserInfo(currentID);
            darkMode = ManageUserAction.GetDarkMode();
            //
            if (darkMode)
            {
                swDarkMode.Checked = true;
            }
            else
            {
                swDarkMode.Checked = false;
            }
            //
            ManageUserAction.InitAllCollections();
            campaignTab   = new CampaignForm();
            libraryTab    = new LibraryForm();
            collectionTab = new CollectionForm();
            revisionTab   = new RevisionForm();
            statisticTab  = new StatisticForm();

            // Khởi tạo Campaign Tab
            ToCampaignTab();
        }
Exemplo n.º 2
0
 public MultipleChoiceForm(int currentTopic, CampaignForm campaign)
 {
     InitializeComponent();
     darkMode = ManageUserAction.GetDarkMode();
     UpdateTheme();
     this.currentTopic = currentTopic;
     this.campaign     = campaign;
     InitQuiz();
     InitAnswer();
     ChangeFlashCard(questions[currentQuiz].GetFlashCard().Viet, questions[currentQuiz].GetFlashCard().IdCard);
 }
Exemplo n.º 3
0
        private void RefreshTab()
        {
            switch (currentTab)
            {
            case 1:
                campaignTab   = new CampaignForm();
                libraryTab    = new LibraryForm();
                collectionTab = new CollectionForm();
                revisionTab   = new RevisionForm();
                statisticTab  = new StatisticForm();
                ToLibraryTab();
                break;

            case 2:
                campaignTab   = new CampaignForm();
                libraryTab    = new LibraryForm();
                collectionTab = new CollectionForm();
                revisionTab   = new RevisionForm();
                statisticTab  = new StatisticForm();
                ToCollectionTab();
                break;

            case 3:
                campaignTab   = new CampaignForm();
                libraryTab    = new LibraryForm();
                collectionTab = new CollectionForm();
                revisionTab   = new RevisionForm();
                statisticTab  = new StatisticForm();
                ToCampaignTab();
                break;

            case 4:
                campaignTab   = new CampaignForm();
                libraryTab    = new LibraryForm();
                collectionTab = new CollectionForm();
                revisionTab   = new RevisionForm();
                statisticTab  = new StatisticForm();
                ToRevisionTab();
                break;

            case 5:
                campaignTab   = new CampaignForm();
                libraryTab    = new LibraryForm();
                collectionTab = new CollectionForm();
                revisionTab   = new RevisionForm();
                statisticTab  = new StatisticForm();
                ToStatisticTab();
                break;
            }
        }
Exemplo n.º 4
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);
 }
Exemplo n.º 5
0
        public FillBlankForm(int currentTopic, CampaignForm campaignForm)
        {
            InitializeComponent();
            darkMode = ManageUserAction.GetDarkMode();
            UpdateTheme();
            this.currentTopic = currentTopic;
            this.campaignForm = campaignForm;
            this.KeyPreview   = true;
            int res = ManageUserAction.UpdateMainFlashCard(currentTopic);

            if (res == 0)
            {
                result = 0;
                return;
            }
            InitQuiz();
            InitAnswer();
            ChangeFlashCard(questions[currentQuiz].GetFlashCard().Viet, questions[currentQuiz].GetFlashCard().IdCard);
        }