public void AddRecentlyUsedFile(string path) { if (_recentlyUsedFiles.Contains(path)) { _recentlyUsedFiles.Remove(path); } if (_recentlyUsedFiles.Count == 10) { _recentlyUsedFiles.RemoveAt(9); } _recentlyUsedFiles.Insert(0, path); }