private StepInfo findNextInstanze(StepInfo child)
{
//if (child.IsInstanze)
//{
StepInfo parent = child.Parent;
int index = parent.Children.IndexOf(child);
if (index + 1 < parent.Children.Count)
{
// return next child
return parent.Children.ElementAt(index + 1);
}
else
{
if (IsRoot(parent)) return new StepInfo("");
else
{
return findNextInstanze(parent);
}
}
//}
//else
//{
// return findNextInstanze(child.Parent);
//}
}