internal static void SelectBranches( BranchesListView listView, List <RepObjectInfo> branchesToSelect, int defaultRow) { if (branchesToSelect == null || branchesToSelect.Count == 0) { TableViewOperations.SelectFirstRow(listView); return; } listView.SelectRepObjectInfos(branchesToSelect); if (listView.HasSelection()) { return; } TableViewOperations.SelectDefaultRow(listView, defaultRow); if (listView.HasSelection()) { return; } TableViewOperations.SelectFirstRow(listView); }
internal static void SelectChangesets( ChangesetsListView listView, List <RepObjectInfo> csetsToSelect, int defaultRow) { if (csetsToSelect == null || csetsToSelect.Count == 0) { TableViewOperations.SelectFirstRow(listView); return; } listView.SelectRepObjectInfos(csetsToSelect); if (listView.HasSelection()) { return; } TableViewOperations.SelectDefaultRow(listView, defaultRow); if (listView.HasSelection()) { return; } TableViewOperations.SelectFirstRow(listView); }