Пример #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();
        }
Пример #2
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;
            }
        }