private void SearchForHeapShots()
{
this.heapshotFiles.Clear();
if (Directory.Exists(this.HeapshotPath))
{
string[] files = Directory.GetFiles(this.HeapshotPath, "*.heapshot");
this.selectedHeapshot = -1;
foreach (string str in files)
{
string item = str.Substring(str.LastIndexOf(@"\") + 1);
item = item.Substring(0, item.IndexOf(".heapshot"));
this.heapshotFiles.Add(item);
}
if (this.heapshotFiles.Count > 0)
{
this.selectedHeapshot = this.heapshotFiles.Count - 1;
}
}
}