예제 #1
0
        private UXElement CreateUXElementFromGridItem(object itemObject, object cookie, int position)
        {
            GridDataCookie             gridDataCookie             = (GridDataCookie)cookie;
            SocialTabs                 selectedTab                = gridDataCookie.SelectedTab;
            FactionToggle              selectedFaction            = gridDataCookie.SelectedFaction;
            string                     selectedPlanet             = gridDataCookie.SelectedPlanet;
            AbstractLeaderboardRowView abstractLeaderboardRowView = null;

            if (itemObject is PlayerLBEntity)
            {
                abstractLeaderboardRowView = this.AddPlayerRow((PlayerLBEntity)itemObject, selectedTab, selectedFaction, selectedPlanet, position);
            }
            else if (itemObject is Squad)
            {
                abstractLeaderboardRowView = this.AddSquadRow((Squad)itemObject, selectedTab, selectedFaction, position);
            }
            else if (itemObject is SquadInvite)
            {
                abstractLeaderboardRowView = this.AddSquadInviteRow((SquadInvite)itemObject, selectedTab, selectedFaction, position);
            }
            UXElement result = null;

            if (abstractLeaderboardRowView != null)
            {
                result = abstractLeaderboardRowView.GetItem();
                this.rowViews.Add(abstractLeaderboardRowView);
            }
            return(result);
        }
예제 #2
0
        public void RemoveAndDestroyRow(AbstractLeaderboardRowView rowView)
        {
            UXElement item = rowView.GetItem();

            this.gridLoadHelper.RemoveElement(item);
            base.DestroyElement(item);
            rowView.Destroy();
            this.rowViews.Remove(rowView);
        }