Esempio n. 1
0
        public static ITopWantedItem Build(string i_WantedItem)
        {
            ITopWantedItem res = null;

            switch (i_WantedItem)
            {
            case "Top best friends":
                res = new TopFriendsForUser(new FriendsSorter(new BestFriendsSorterStartegy()));
                break;

            case "Top events":
                res = new TopEventsForUser();
                break;

            case "Top pages":
                res = new TopPagesForUser();
                break;

            case "Top famous friends":
                res = new TopFriendsForUser(new FriendsSorter(new TopFamousFriendsStartegy()));
                break;

            default:
                break;
            }

            return(res);
        }
Esempio n. 2
0
        private void buttonTopEvents_Click(object sender, EventArgs e)
        {
            TopEventsForUser top = TopWantedItemFactory.Build("Top events", m_UserData, m_AppLogic) as TopEventsForUser;

            listBoxTops.DisplayMember = "Name";
            listBoxTops.DataSource    = top.TopList;
            labelTopTitle.Text        = "Top events";
        }
Esempio n. 3
0
        public static ITopWantedItem Build(string i_WantedItem, UserData i_UserData, AppLogic i_AppLogic)
        {
            ITopWantedItem res = null;

            switch (i_WantedItem)
            {
            case "Top friends":
                res = new TopFriendsForUser();
                break;

            case "Top events":
                res = new TopEventsForUser();
                break;

            case "Top pages":
                res = new TopPagesForUser();
                break;

            default:
                break;
            }

            return(res);
        }