コード例 #1
0
        private void UpdateCard(UISwipeableCard <TData, TContext> card, int dataIndex)
        {
            // if data doesn't exist hide card
            if (dataIndex < 0 || dataIndex > data.Count - 1)
            {
                card.SetVisible(false);
                return;
            }

            card.SetVisible(true);
            card.DataIndex = dataIndex;
            card.UpdateContent(data[dataIndex]);
        }
コード例 #2
0
        void UpdateCard(UISwipeableCard <TData, TContext> card, int dataIndex)
        {
            IsAutoSwiping = false;
            ExistsCard    = dataIndex != _data.Count + 1;
            // if data doesn't exist hide card
            if (dataIndex < 0 || dataIndex > _data.Count - 1)
            {
                card.SetVisible(false);
                return;
            }

            card.SetVisible(true);
            card.DataIndex = dataIndex;
            card.UpdateContent(_data[dataIndex]);
        }