Exemplo n.º 1
0
        internal List <ISpecialCheckin> GetAllCheckins()
        {
            List <ISpecialCheckin> specialCheckin = new List <ISpecialCheckin>();

            foreach (Checkin checkin in FacebookUser.Checkins)
            {
                ISpecialCheckin sp = new SpecialCheckin();
                sp.getSpecialCheckin(checkin);
                specialCheckin.Add(sp);
            }
            return(specialCheckin);
        }
        private void loadCheckins()
        {
            ListViewItem tempItem;

            this.Invoke(new Action(() =>
            {
                List <ISpecialCheckin> specialCheckin        = LoggedInUser.Instance().GetAllCheckins();
                List <ISpecialCheckin> SoretedspecialCheckin = specialCheckin.OrderByDescending(s => s.NumOfLikes).ToList();
                foreach (ISpecialCheckin sp in SoretedspecialCheckin)
                {
                    specificCheckIn = sp as SpecialCheckin;
                    tempItem        = new ListViewItem(sp.Id);
                    tempItem.SubItems.Add(sp.Place);
                    tempItem.SubItems.Add(sp.NumOfLikes.ToString());
                    listViewCheckins.Items.Add(tempItem);
                }
            }));
        }