public IEnumerator<object> LoadRange(Pair<int> range)
{
PendingLoadPair = range;
LoadingPanel.Text = "Generating diff...";
LoadingProgress.Value = 0;
LoadingProgress.Style = ProgressBarStyle.Marquee;
MainMenuStrip.Enabled = false;
LoadingPanel.Visible = true;
MainSplit.Visible = false;
UseWaitCursor = true;
var s1 = Instance.Snapshots[range.First];
var s2 = Instance.Snapshots[range.Second];
Timeline.Selection = range;
var f = Start(Instance.DiffSnapshots(s1, s2));
using (f)
yield return f;
var filename = f.Result as string;
if (filename != null) {
f = Start(LoadDiff(filename));
using (f)
yield return f;
} else {
DiffLoaded(f.Result as HeapDiff, "unknown");
}
PendingLoadPair = Pair.New(-1, -1);
CurrentPair = range;
Text = "Diff Viewer - " + String.Format("{0} - {1}", s1.Timestamp.ToLongTimeString(), s2.Timestamp.ToLongTimeString());
}