Ejemplo n.º 1
0
        private void CopyWord(VocabularyWord word, VocabularyBook target)
        {
            VocabularyWord cloned = word.Clone(CbKeepResults.Checked);

            for (int i = 0; i < target.Words.Count; i++)
            {
                VocabularyWord comp = target.Words[i];
                if (cloned.MotherTongue == comp.MotherTongue &&
                    cloned.ForeignLang == comp.ForeignLang &&
                    cloned.ForeignLangSynonym == comp.ForeignLangSynonym)
                {
                    if (cloned.PracticeDate > comp.PracticeDate)
                    {
                        target.Words[i] = cloned;
                    }

                    return;
                }
            }

            target.Words.Add(cloned);
        }