public MementoCard popOutMememtoCard()
        {
            MementoCard mementoCard = new MementoCard(new List <ListViewItem>());

            if (saveCardStorage.Count > 0)
            {
                int lastIndex = saveCardStorage.Count - 1;
                mementoCard = saveCardStorage[lastIndex];
                saveCardStorage.RemoveAt(lastIndex);
            }
            return(mementoCard);
        }
 public void saveMememtoCard(MementoCard item)
 {
     saveCardStorage.Add(item);
 }
Пример #3
0
 public void undo(MementoCard mem)
 {
     this.items = mem.items;
 }