Example #1
0
        public bool AddNewWord(WordPad wordPad, NewWordItem newWord)
        {
            if (wordPad == null)
            {
                return(false);
            }

            if (wordPad.FindWord(newWord.Name) != null)
            {
                MessageBox.Show("you already add this word!");
                return(false);
            }

            bool result = wordPad.AddWord(newWord);

            if (result)
            {
                AddWordItemToList(WordList, newWord);
            }

            return(result);
        }