Пример #1
0
 private void btnRight_Click(object sender, EventArgs e)
 {
     if (index < ManageSystem.CountAllFlashCards() - 1)
     {
         index++;
     }
     else
     {
         index = 0;
     }
     curFlashCard = ManageSystem.GetFlashCard(index);
     ChangeFlashCard(curFlashCard.Eng, curFlashCard.IdCard);
 }
Пример #2
0
        private void InitAutoCompleteTextBox()
        {
            AutoCompleteStringCollection data = new AutoCompleteStringCollection();

            for (int i = 0; i < ManageSystem.CountAllFlashCards(); i++)
            {
                data.Add(ManageSystem.GetFlashCard(i).Eng);
                data.Add(ManageSystem.GetFlashCard(i).Viet);
            }
            txtSearching.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            txtSearching.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            txtSearching.AutoCompleteCustomSource = data;
        }
Пример #3
0
 private void btnLeft_Click(object sender, EventArgs e)
 {
     if (index > 0)
     {
         index--;
     }
     else
     {
         index = ManageSystem.CountAllFlashCards() - 1;
     }
     curFlashCard = ManageSystem.GetFlashCard(index);
     ChangeFlashCard(curFlashCard.Eng, curFlashCard.IdCard);
 }
Пример #4
0
        public void UpdateInfoResult()
        {
            string        TK = ManageSystem.TK();
            int           ID = ManageSystem.GetUserID(TK);
            List <string> a  = ManageSystem.UserInfoPersonal(ID);

            lbTotal.Text = a[5];

            //
            lbTotal.Text        = ManageUserAction.GetItemOfAllCollection(0).ListFL.Count().ToString();
            lbLearned.Text      = lbTotal.Text;
            lbToLearn.Text      = (ManageSystem.CountAllFlashCards() - ManageUserAction.GetItemOfAllCollection(0).ListFL.Count()).ToString();
            pbAnimals.Value     = ManageUserAction.CalculateProgress(1, ID);
            pbPlants.Value      = ManageUserAction.CalculateProgress(2, ID);
            pbFruits.Value      = ManageUserAction.CalculateProgress(3, ID);
            pbJob.Value         = ManageUserAction.CalculateProgress(4, ID);
            pbFoodaDrinks.Value = ManageUserAction.CalculateProgress(5, ID);
            pbSport.Value       = ManageUserAction.CalculateProgress(6, ID);
            pbClothing.Value    = ManageUserAction.CalculateProgress(7, ID);
            pbTechnology.Value  = ManageUserAction.CalculateProgress(8, ID);
        }