Exemple #1
0
        private void BindListViewItem(int index, SideResultsListItem listItem)
        {
            var item = results[index];

            listItem.rankText.text           = $"{item.rank}";
            listItem.nameText.text           = item.name;
            listItem.countryFlagText.text    = item.countryCode;
            listItem.countryFlagImage.sprite = flagsData.GetFlag(item.countryCode);
            listItem.resultText.text         = $"{item.value.ToString("F1", CultureInfo.InvariantCulture)}";
        }
        private void BindListViewItem(int index, JumpersListItem listItem)
        {
            var item = jumpers[index];

            listItem.nameText.text           = $"{item.competitor.firstName} {item.competitor.lastName.ToUpper()}";
            listItem.countryFlagText.text    = item.competitor.countryCode;
            listItem.countryFlagImage.sprite = flagsData.GetFlag(item.competitor.countryCode);
            listItem.genderIconImage.sprite  = iconsData.GetGenderIcon(item.competitor.gender);

            listItem.toggleExtension.SetElementId(index);
            listItem.toggleExtension.Toggle.SetIsOnWithoutNotify(item.registered);
        }
        private void BindListViewItem(int index, SideResultsListItem listItem)
        {
            var localId  = resultsManager.Value.GetIdByRank(index);
            var globalId = resultsManager.Value.OrderedParticipants[localId].id;
            var item     = resultsManager.Value.Results[localId];

            listItem.rankText.text           = $"{item.Rank}";
            listItem.nameText.text           = $"{GetNameById(globalId)}";
            listItem.countryFlagText.text    = $"{GetCountryCodeById(globalId)}";
            listItem.countryFlagImage.sprite = flagsData.GetFlag(GetCountryCodeById(globalId));
            listItem.resultText.text         = $"{item.TotalPoints.ToString("F1", CultureInfo.InvariantCulture)}";
        }
Exemple #4
0
        private void BindListViewItem(int index, TeamsSelectionListItem listItem)
        {
            var item = teams[index];

            var it = 0;

            foreach (var jumper in item.GetTeamMembers())
            {
                listItem.nameText[it].text = $"{jumper.firstName} {jumper.lastName.ToUpper()}";
                it++;
            }

            listItem.countryFlagText.text    = item.team.countryCode;
            listItem.countryFlagImage.sprite = flagsData.GetFlag(item.team.countryCode);

            listItem.toggleExtension.SetElementId(index);
            listItem.toggleExtension.Toggle.SetIsOnWithoutNotify(item.registered);
        }