public static void SelectFirstItemInNextProject(ITreeItem parentParent, int parentIndex) { var parentProject = parentParent.GetItem(parentIndex + 1); if (parentProject.GetItemsCount() > 0) { var item = parentProject.GetItem(0); item.SetSelected(true); item.PushIntoView(); } }
public static void SelectLastItemInPreviousProject(ITreeItem parentParent, int parentIndex) { var parentProject = parentParent.GetItem(parentIndex - 1); int count = parentProject.GetItemsCount(); if (count > 0) { var item = parentProject.GetItem(count - 1); item.SetSelected(true); item.PushIntoView(); } }