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); } } }
private void frmUserPractice_Load(object sender, EventArgs e) { myWords = _wordPoolDetailController.GetMyActiveWordsByWordPool(wordPool.WordPoolID); rnd = new Random(); TrueScore = 0; FalseScore = 0; timerCount = 0; ChangeWord(); }
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); } }
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); } } }