private void addCommonPicturesToListBox() { User selectedFriend = listBoxFriends.SelectedItem as User; LinkedList <Photo> photoList = CommonPhotosLogic.MakeListOfCommonPhotos(LogicApp.UserAlbumsCollection, selectedFriend.Name); foreach (Photo currentPhoto in photoList) { listBoxCommonPhoto.Items.Add(currentPhoto); } }
public List <string> getCommonPhotoNameList(string friendName) { List <string> commonPhotoNameList = new List <string>(); currentSelectedFriendName = friendName; currentCommonPhotoLinkedList = CommonPhotosLogic.MakeListOfCommonPhotos(UserAlbumsCollection, friendName); foreach (Photo currentPhoto in currentCommonPhotoLinkedList) { commonPhotoNameList.Add(currentPhoto.CreatedTime.ToString()); } return(commonPhotoNameList); }
public List <string> getSortedCommonPhotoNameList(string friendName, int sortType) { CreateConcretePopularCriteria(sortType); List <string> commonPhotoNameList = new List <string>(); currentSelectedFriendName = friendName; currentCommonPhotoLinkedList = CommonPhotosLogic.MakeListOfCommonPhotos(UserAlbumsCollection, friendName); List <Photo> currentCommonPhotoList = currentCommonPhotoLinkedList.ToList(); ListPhotoBubbleSort(currentCommonPhotoList); foreach (Photo currentPhoto in currentCommonPhotoList) { String photoName = String.Format("{0}", currentPhoto.CreatedTime.ToString()); commonPhotoNameList.Add(photoName); } return(commonPhotoNameList); }