public void ClearFirstMode() { if (FirstMode != null) { FirstMode.Clear(); } FirstMode = null; if (diffMode != null) { ClearDiffMode(); } if (CurrentViewMode == ViewMode.ShowFirst) { history.Clear(); if (SecondMode != null) { CurrentViewMode = ViewMode.ShowSecond; } else { CurrentViewMode = ViewMode.ShowNone; } } }
public void ClearAllOpenModes() { if (SecondMode != null) { SecondMode.Clear(); } SecondMode = null; if (FirstMode != null) { FirstMode.Clear(); } FirstMode = null; CurrentViewMode = ViewMode.ShowNone; diffMode = null; history.Clear(); }