Example #1
0
        public void AddEntry(System.Collections.Specialized.StringCollection item)
        {
            Entry entry = new FileFolderEntry(item, INDEX.ToString());

            INDEX++;

            if (entries.Contains(entry))
            {
                entries.Remove(entry);
            }

            entries.Add(entry);
        }
Example #2
0
        // add new entry
        public void AddEntry(String content)
        {
            Entry entry = new TextEntry(content, INDEX.ToString());

            INDEX++;

            // if equal content is beeng copied in the past, remove it.
            // this is how we hande duplicates.
            // new content should be last in the list.
            if (entries.Contains(entry))
            {
                entries.Remove(entry);
            }

            if (entries.Count >= maximumEntriesAlowed)
            {
                entries.RemoveAt(1);
            }

            entries.Add(entry);
        }