public void SetFrequentFiles(IEnumerable <FileFrequency> frequencies) { if (frequencies != null) { foreach (var frequency in frequencies) { _fileFrequency[frequency.Id] = frequency; FrequentFileContainer.Select(frequency.Id); } } }
private void UpdateFrequency(TreeNodeContainer n) { var f = (IGoogleDriveFile)n.DataItem; FileFrequency frequency; if (_fileFrequency.TryGetValue(f.Id, out frequency)) { frequency.Frequency++; } else { _fileFrequency[f.Id] = new FileFrequency(f.Id, 1); } FrequentFileContainer.Select(f.Id); }