/// <summary>
        /// Event handler for the undo button
        /// Will undo the last add or delete action
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void undoBtn_Click(object sender, EventArgs e)
        {
            invoker.undo();
            recordListView.Items.Clear();
            populateList(controller.getRecordList().getList());
            controller.readRecordListToFile();
            if (invoker.checkUndoStack() == false)
            {
                undoBtn.Enabled = false;
            }
            else
            {
                undoBtn.Enabled = true;
            }
            if (invoker.checkRedoStack() == false)
            {
                redoBtn.Enabled = false;
            }
            else
            {
                redoBtn.Enabled = true;
            }

            SetCollectionInfo();
        }
Beispiel #2
0
 public void checkUndo()
 {
     r.undo();
     Assert.IsTrue(list.getList().Count < 1);
 }