Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            WordPoolDetail wordPoolDetail;

            if (lstDictionary.SelectedIndices[0] > -1)
            {
                if (_wordPoolDetailController.GetMyActiveWordsByWordPool(wordPool.WordPoolID).Count > 9 && user.RoleID == 3)
                {
                }
                else
                {
                    dic = (Dictionary)lstDictionary.SelectedItems[0].Tag;

                    wordPoolDetail = new WordPoolDetail()
                    {
                        WordID     = dic.WordID,
                        WordPoolID = wordPool.WordPoolID
                    };

                    _wordPoolDetailController.Add(wordPoolDetail);

                    RefreshListVÄ°ewMyPool(wordPool);
                }
            }
        }
Example #2
0
        private void frmUserPractice_Load(object sender, EventArgs e)
        {
            myWords = _wordPoolDetailController.GetMyActiveWordsByWordPool(wordPool.WordPoolID);

            rnd = new Random();

            TrueScore  = 0;
            FalseScore = 0;
            timerCount = 0;
            ChangeWord();
        }
Example #3
0
        private void RefreshListVÄ°ewMyPool(WordPool wordPool)
        {
            lstViewMyPool.Items.Clear();

            ListViewItem lvi;

            List <Dictionary> myActiveWords = _wordPoolDetailController.GetMyActiveWordsByWordPool(wordPool.WordPoolID);

            foreach (Dictionary item in myActiveWords)
            {
                lvi = new ListViewItem(item.English);
                lvi.SubItems.Add(item.Turkish);
                lvi.Tag = item;
                lstViewMyPool.Items.Add(lvi);
            }
        }
Example #4
0
        void RefreshMyWords()
        {
            lstInWords.Items.Clear();
            if (lstMyPools.SelectedIndex > -1)
            {
                ListViewItem lvi;

                wordPool = (WordPool)lstMyPools.SelectedItem;

                List <Dictionary> activeWords = _wordPoolDetailController.GetMyActiveWordsByWordPool(wordPool.WordPoolID);

                foreach (Dictionary item in activeWords)
                {
                    lvi = new ListViewItem(item.English);
                    lvi.SubItems.Add(item.Turkish);
                    lvi.Tag = item;
                    lstInWords.Items.Add(lvi);
                }
            }
        }