/// ------------------------------------------------------------------------------------ /// <summary> /// Replaces contents of a difference list with saved contents. /// </summary> /// ------------------------------------------------------------------------------------ private void ReplaceListContents(DifferenceList diffList, DifferenceList savedList) { diffList.Clear(); foreach (Difference diff in savedList) { diffList.Add(diff.Clone()); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Re-applies (or "re-does") an action. /// </summary> /// <param name="fRefreshPending">Ignored</param> /// ------------------------------------------------------------------------------------ public override bool Redo(bool fRefreshPending) { if (m_fReverted) { int offset = (m_differenceClone.IchLimRev - m_differenceClone.IchMinRev) - (m_differenceClone.IchLimCurr - m_differenceClone.IchMinCurr); m_differenceList.AdjustFollowingDiffsForUndo(m_index, m_differenceClone.HvoCurr, offset); } m_differenceList.Remove(m_differenceClone); m_reviewedList.Add(m_differenceClone); m_differenceRef = m_differenceClone; // This moves to the difference immediately following the difference that was just // removed from the list. This may not be the final design. But, until further // customer comments, this will just have to be. if (m_index < m_differenceList.Count) { m_differenceList.CurrentDifferenceIndex = m_index; } return(true); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Replaces contents of a difference list with saved contents. /// </summary> /// ------------------------------------------------------------------------------------ private void ReplaceListContents(DifferenceList diffList, DifferenceList savedList) { diffList.Clear(); foreach (Difference diff in savedList) diffList.Add(diff.Clone()); }