private static bool CheckChanges(Worksheet worksheet, UndoItem x) { object currentValue = ((Range)worksheet.Cells[x.RowIndex, x.ColumnIndex]).Value; if (currentValue.GetType() != x.NewValue.GetType()) { return(true); } return(!x.NewValue.Equals(currentValue)); }
public void PushUndoItem(UndoItem undoItem) { undoItems.Add(undoItem); }