Ejemplo n.º 1
0
        //////////////////////////////////////////////////////////////////

        bool RemoveQItem(QListItem <T> foundItem)
        {
            itemQItemDict.Remove(foundItem.Item);

            var prev = foundItem.Prev;
            var next = foundItem.Next;

            if (prev != null)
            {
                prev.Next = next;
            }

            if (next != null)
            {
                next.Prev = prev;
            }

            if (this.qFirst == foundItem)
            {
                this.qFirst = next;
            }

            if (this.qLast == foundItem)
            {
                this.qLast = prev;
            }

            foundItem.Clear();

            return(true);
        }
Ejemplo n.º 2
0
        public void Clear()
        {
            this.itemQItemDict.Clear();

            QListItem <T> qItem = qFirst;

            while (qItem != null)
            {
                qItem.Clear();
                qItem = qItem.Next;
            }

            this.qFirst = null;
            this.qLast  = null;
        }