示例#1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            int          index       = clbWordlist.SelectedIndex;
            Word_Manager wordManager = new Word_Manager(true, MyWordList.WordItem[index].OneWord, MyWordList.WordItem[index].Meaning);

            wordManager.ShowDialog();

            if (Word_Manager.isEdited)
            {
                MyWordList.WordItem[index].OneWord = Word_Manager.MyWord.OneWord;
                MyWordList.WordItem[index].Meaning = Word_Manager.MyWord.Meaning;
                MyWordList.WordItem = sortByAlphabet();
                loadListToCLB(MyWordList);
                btnEdit.Enabled = false;
            }
        }
示例#2
0
        private void btnAddWord_Click(object sender, EventArgs e)
        {
            Word_Manager wordManager = new Word_Manager(false, null, null);

            wordManager.ShowDialog();

            if (Word_Manager.MyWord == null)
            {
                return;
            }

            if (!isAvailable(Word_Manager.MyWord))
            {
                MyWordList.WordItem.Add(Word_Manager.MyWord);
                numOfInserts++;
                wordCount();
                MyWordList.WordItem = sortByAlphabet();
                loadListToCLB(MyWordList);
            }

            btnDelAll.Enabled = true;
        }