// ------------------------------------------------------------------------ // update pending items list by status tracker object // ------------------------------------------------------------------------ public void UpdatePendingList(HGStatusTracker tracker) { Dictionary <string, int> selection; StoreSelection(out selection); if (_previouslySortedColumn == -1) { SortByColumn(0); } // create new pending list .. List <HGLib.HGFileStatusInfo> newList; tracker.CreatePendingFilesList(out newList); newList.Sort(compareInfoItem); // .. and compare it to the current one bool somethingChanged = false; if (_list == null || newList.Count != _list.Count) { somethingChanged = true; } for (int pos = 0; !somethingChanged && pos < _list.Count; ++pos) { if (_list[pos].status != newList[pos].status) { somethingChanged = true; } if (_list[pos].fullPath.CompareTo(newList[pos].fullPath) != 0) { somethingChanged = true; } } // if we found changes between the lists, we now update the view if (somethingChanged) { // set new list into listview _list = newList; _cache = null; this.VirtualListSize = _list.Count; RestoreSelection(selection); this.Invalidate(false); } }
// ------------------------------------------------------------------------ // update pending list with status tracker // ------------------------------------------------------------------------ public void UpdatePendingList(HGStatusTracker tracker) { _pendingItemsListView.UpdatePendingList(tracker); }
// route update pending changes call public void UpdatePendingList(HGStatusTracker tracker) { control.UpdatePendingList(tracker); }