Ejemplo n.º 1
0
        private async void MoreButton_Tapped(object sender, EventArgs e)
        {
            if (isLoading || !BaseViewModel.hasConnection())
            {
                return;
            }
            isLoading = true;

            MoreButton.Style               = App.Current.Resources["TappedStackStyle"] as Style;
            MoreLabel.IsVisible            = false;
            MoreLoadingAnimation.IsRunning = true;

            var topDatum = await mapsViewModel.GetMapTop(game, map, currentMode, currentZone, list_index);

            topData = topDatum?.data;

            MoreButton.Style = App.Current.Resources["UntappedStackStyle"] as Style;

            if (topData is null || topData.Count < 1)
            {
                MoreFrame.IsVisible = false;
                return;
            }

            LayoutTop(EFilter_ToString.toString(currentMode), currentZoneString);
            MoreLoadingAnimation.IsRunning = false;
            MoreLabel.IsVisible            = true;
            isLoading = false;
        }
Ejemplo n.º 2
0
        // Event Handlers --------------------------------------------------------------------------------------------------------------------------
        #region events

        private async void Apply_Clicked(object sender, System.EventArgs e)
        {
            if (BaseViewModel.hasConnection())
            {
                if (playerSteamID != SteamIdEntry.Text)
                {
                    var steamProfileDatum = await playerViewModel.GetPlayerSteamProfile(SteamIdEntry.Text);

                    if (steamProfileDatum?.response.players.Count == 0)
                    {
                        await DisplayAlert("Could not find player profile!", "Invalid SteamID.", "OK");

                        return;
                    }
                }

                App.Current.Properties["steamid"] = SteamIdEntry.Text;
                App.Current.Properties["game"]    = EFilter_ToString.toString(game);
                App.Current.Properties["mode"]    = EFilter_ToString.toString(mode);
                await App.Current.SavePropertiesAsync();

                await Navigation.PopAsync();
            }
            else
            {
                await DisplayAlert("Could not connect to Steam!", "Please connect to the Internet.", "OK");
            }
        }
Ejemplo n.º 3
0
        // UI -----------------------------------------------------------------------------------------------
        #region UI

        private async Task ChangePR(EFilter_Mode newMode, EFilter_PlayerType newPlayerType, string newPlayerValue)
        {
            if (currentMode == newMode && newPlayerType == playerType && newPlayerValue == playerValue)
            {
                return;
            }

            var prInfoDatum = await mapsViewModel.GetMapPRInfo(game, newMode, map, newPlayerType, newPlayerValue);

            prInfoData = prInfoDatum?.data;
            if (prInfoData is null || prInfoData.basicInfo is null)
            {
                hidePR();
                await DisplayAlert("Could not find player profile!", "Invalid SteamID or rank.", "OK");

                return;
            }

            currentMode       = newMode;
            playerType        = newPlayerType;
            playerValue       = newPlayerValue;
            playerSteamID     = prInfoData.basicInfo.steamID;
            Title             = mapsMapTitle + " " + EFilter_ToString.toString(currentMode) + "]";
            PRTitleLabel.Text = String_Formatter.toEmoji_Country(prInfoData.basicInfo.country) + " " + prInfoData.basicInfo.name;

            if (prInfoData.time is null || prInfoData.time == "0") // no main completion
            {
                hidePR();
                return;
            }
            displayPR();

            playerRank = prInfoData.rank.ToString();
            LayoutPRInfo();
        }
Ejemplo n.º 4
0
        // UI ---------------------------------------------------------------------------------------------------------
        #region UI

        private async Task ChangeRecentRecords(EFilter_Game game, EFilter_RRType type, EFilter_Mode mode)
        {
            if (type == EFilter_RRType.top)
            {
                var recentRecords10Datum = await recordsViewModel.GetRecentRecords10(game, mode);

                recentRecords10Data = recentRecords10Datum?.data;
                if (recentRecords10Data is null)
                {
                    return;
                }
                LayoutRecentRecords10();
            }
            else
            {
                var recentRecordsDatum = await recordsViewModel.GetRecentRecords(game, type, mode);

                recentRecordsData = recentRecordsDatum?.data;
                if (recentRecordsData is null)
                {
                    return;
                }
                LayoutRecentRecords(EFilter_ToString.toString2(type));
            }
            lastRefresh = DateTime.Now;
        }
        private async void WRTypeOptionLabel_Tapped(object sender, EventArgs e)
        {
            List <string> types             = new List <string>();
            string        currentTypeString = EFilter_ToString.toString2(wrsType);

            foreach (string type in EFilter_ToString.wrtype_arr2)
            {
                if (type != currentTypeString)
                {
                    types.Add(type);
                }
            }

            string newTypeString = await DisplayActionSheet("Choose a different type", "Cancel", null, types.ToArray());

            EFilter_PlayerWRsType newType = EFilter_PlayerWRsType.wr;

            switch (newTypeString)
            {
            case "Cancel": return;

            case "WRCP": newType = EFilter_PlayerWRsType.wrcp; break;

            case "WRB": newType = EFilter_PlayerWRsType.wrb; break;
            }

            wrsType    = newType;
            list_index = 1;

            LoadingAnimation.IsRunning = true;
            await ChangeRecords(newType);

            LoadingAnimation.IsRunning = false;
        }
Ejemplo n.º 6
0
        // Loading KSF map list --------------------------------------------------------------------------------------------------------------------
        #region ksf

        private async Task <List <string> > LoadMaps(EFilter_Game game, EFilter_Sort sort, int minTier, int maxTier, EFilter_MapType mapType)
        {
            // minTier options: 1-8
            // maxTier options: 1-8

            maps_list = new List <string>();

            try
            {
                if (game != currentGame || sort != currentSort)
                {
                    DetailedMapsRootObject dmro = await mapsViewModel.GetDetailedMapsList(game, sort);

                    if (dmro == null)
                    {
                        Console.WriteLine("KSF Server Request returned NULL (MapsPage)");

                        MapsCollectionEmptyViewLabel.Text = "Could not reach KSF servers :(";
                        return(maps_list);
                    }
                    MapsCollectionEmptyViewLabel.Text = "No maps matched your filter";
                    MapsTab.Title = "Maps [" + EFilter_ToString.toString2(game) + "]";

                    detailed_mapData = new List <DetailedMapDatum>(dmro.data);
                    currentGame      = game;
                    currentSort      = sort;
                }

                currentMinTier = minTier;
                currentMaxTier = maxTier;
                currentMapType = mapType;

                foreach (DetailedMapDatum datum in detailed_mapData)
                {
                    int tier = int.Parse(datum.tier);
                    int type = int.Parse(datum.maptype);

                    if (mapType != EFilter_MapType.any && type != (int)mapType)
                    {
                        continue;
                    }
                    else if (tier < minTier)
                    {
                        continue;
                    }
                    else if (tier > maxTier)
                    {
                        continue;
                    }
                    maps_list.Add(datum.name);
                }
            }
            catch (FormatException)
            {
                Console.WriteLine("Problem parsing KSFDetailedMapDatum.data field (MapsPage)");
            }

            return(maps_list);
        }
Ejemplo n.º 7
0
        // UI --------------------------------------------------------------------------------------------------------------------------------------
        #region UI

        private async Task LoadMapInfo()
        {
            string mapName = map;

            if (mapName.Length > 18)
            {
                mapName = mapName.Substring(0, 18) + "...";
            }
            MapsMap.Title = mapName + " [" + EFilter_ToString.toString2(game) + "]";

            // running query and assigning to map information objects
            var mapInfoDatum = await mapsViewModel.GetMapInfo(game, map);

            mapInfoData = mapInfoDatum?.data;
            if (mapInfoData is null)
            {
                return;
            }

            var mapPointsDatum = await mapsViewModel.GetMapPoints(game, map);

            pointsData = mapPointsDatum?.data;
            if (pointsData is null)
            {
                return;
            }

            mapSettings = mapInfoData.MapSettings;
            mappers     = mapInfoData.Mappers;
            mapType     = (EFilter_MapType)int.Parse(mapSettings.maptype);

            // filling in UI and setting zone options
            LayoutGeneralMapInfo();
            LayoutMappers();
            LayoutStats();

            stageCount = int.Parse(mapSettings.cp_count);
            bonusCount = int.Parse(mapSettings.b_count);
            if ((int)mapType == 1)
            {
                stageCount = 0;
            }
            else
            {
                for (int i = 1; i <= stageCount; i++)
                {
                    zonePickerList.Add("S" + i);
                }
            }
            for (int i = 1; i <= bonusCount; i++)
            {
                zonePickerList.Add("B" + i);
            }

            LayoutPoints();
        }
Ejemplo n.º 8
0
        // Displaying Changes --------------------------------------------------------------------------

        private void LayoutRecentRecords(string typeString)
        {
            Title = "Records [" + EFilter_ToString.toString2(game) + ", " + EFilter_ToString.toString(mode) + "]";
            RRTypeOptionLabel.Text = "Type: " + typeString;

            RecordsStack.Children.Clear();

            int i      = 0;
            int length = recentRecordsData.Count;

            foreach (RRDatum datum in recentRecordsData)
            {
                RecordsStack.Children.Add(new Label
                {
                    Text  = datum.mapName + " " + EFilter_ToString.zoneFormatter(datum.zoneID, false, false),
                    Style = App.Current.Resources["RRLabelStyle"] as Style
                });
                RecordsStack.Children.Add(new Label
                {
                    Text  = String_Formatter.toEmoji_Country(datum.country) + " " + datum.playerName + " on " + datum.server + " server",
                    Style = App.Current.Resources["RR2LabelStyle"] as Style
                });

                string rrtime = "in " + String_Formatter.toString_RankTime(datum.surfTime) + " (";
                if (datum.wrDiff == "0")
                {
                    if (datum.r2Diff is null)
                    {
                        rrtime += "WR N/A";
                    }
                    else
                    {
                        rrtime += "WR-" + String_Formatter.toString_RankTime(datum.r2Diff.Substring(1));
                    }
                }
                else
                {
                    rrtime += "now WR+" + String_Formatter.toString_RankTime(datum.wrDiff);
                }
                rrtime += ") (" + String_Formatter.toString_LastOnline(datum.date) + ")";
                RecordsStack.Children.Add(new Label
                {
                    Text  = rrtime,
                    Style = App.Current.Resources["TimeLabelStyle"] as Style
                });

                if (++i != length)
                {
                    RecordsStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["SeparatorStyle"] as Style
                    });
                }
            }
        }
Ejemplo n.º 9
0
        private async void StyleOptionLabel_Tapped(object sender, EventArgs e)
        {
            List <string> modes             = new List <string>();
            string        currentModeString = EFilter_ToString.toString(currentMode);

            foreach (string mode in EFilter_ToString.modes_arr)
            {
                if (mode != currentModeString)
                {
                    modes.Add(mode);
                }
            }

            string newStyle = await DisplayActionSheet("Choose a different style", "Cancel", null, modes.ToArray());

            EFilter_Mode newCurrentMode = EFilter_Mode.fw;

            switch (newStyle)
            {
            case "Cancel": return;

            case "HSW": newCurrentMode = EFilter_Mode.hsw; break;

            case "SW": newCurrentMode = EFilter_Mode.sw; break;

            case "BW": newCurrentMode = EFilter_Mode.bw; break;
            }

            LoadingAnimation.IsRunning = true;

            var newTopDatum = await mapsViewModel.GetMapTop(game, map, newCurrentMode, currentZone, 1);

            List <TopDatum> newTopData = newTopDatum?.data;

            if (newTopData is null)
            {
                LoadingAnimation.IsRunning = false;
                await DisplayAlert("No " + newStyle + " " + currentZoneString + " completions.", "Be the first!", "OK");

                return;
            }
            topData     = newTopData;
            currentMode = newCurrentMode;

            list_index = 1;
            ClearTopGrid();


            LayoutTop(newStyle, currentZoneString);
            LoadingAnimation.IsRunning = false;
        }
        public PlayerMapsCompletionPage(string title, PlayerViewModel playerViewModel, EFilter_Game game, EFilter_Mode mode,
                                        EFilter_PlayerCompletionType completionType, EFilter_PlayerType playerType, string playerValue)
        {
            this.playerViewModel = playerViewModel;
            this.game            = game;
            this.mode            = mode;
            this.playerType      = playerType;
            this.playerValue     = playerValue;
            this.completionType  = completionType;

            InitializeComponent();
            Title            = title;
            HeaderLabel.Text = EFilter_ToString.toString2(completionType);
        }
        // UI -----------------------------------------------------------------------------------------------
        #region UI

        private async Task ChangeRecords(EFilter_PlayerWRsType type)
        {
            var worldRecordsDatum = await playerViewModel.GetPlayerWRs(game, mode, type, playerType, playerValue, list_index);

            worldRecordsData = worldRecordsDatum?.data.records;
            if (worldRecordsData is null)
            {
                return;
            }

            WRTypeOptionLabel.Text = "Type: " + EFilter_ToString.toString2(type);
            if (list_index == 1)
            {
                WRsStack.Children.Clear();
            }
            LayoutRecords();
        }
Ejemplo n.º 12
0
        // UI -----------------------------------------------------------------------------------------------
        #region UI

        private async Task ChangeRecords()
        {
            var topDatum = await mapsViewModel.GetMapTop(game, map, currentMode, currentZone, list_index);

            topData = topDatum?.data;
            if (topData is null)
            {
                StyleOptionLabel.Text = "Style: " + EFilter_ToString.toString(currentMode);
                ZoneOptionLabel.Text  = "Zone: " + currentZoneString;
                await DisplayAlert("No " + EFilter_ToString.toString(currentMode) + " Main completions.", "Be the first!", "OK");

                return;
            }
            ;

            LayoutTop(EFilter_ToString.toString(currentMode), "Main");
        }
Ejemplo n.º 13
0
        // UI -----------------------------------------------------------------------------------------------
        #region UI

        private async Task ChangeRecords(EFilter_ORType type)
        {
            var oldRecordDatum = await recordsViewModel.GetOldestRecords(game, type, mode, list_index);

            oldRecordData = oldRecordDatum?.data;
            if (oldRecordData is null)
            {
                return;
            }

            ORTypeOptionLabel.Text = "Type: " + EFilter_ToString.toString2(type);
            if (list_index == 1)
            {
                ORStack.Children.Clear();
            }
            LayoutRecords();
        }
Ejemplo n.º 14
0
        private async void ZonePicker_Unfocused(object sender, FocusEventArgs e)
        {
            string selected = (string)ZonePicker.SelectedItem;

            if (selected == currentZoneString)
            {
                return;
            }
            LoadingAnimation.IsRunning = true;

            int newZoneNum = -1;

            switch (selected[0])
            {
            case 'M': newZoneNum = 0; break;

            case 'S': newZoneNum = int.Parse(selected.Substring(1)); break;

            case 'B': newZoneNum = 30 + int.Parse(selected.Substring(1)); break;
            }

            if (newZoneNum != -1)
            {
                var newTopDatum = await mapsViewModel.GetMapTop(game, map, currentMode, newZoneNum, 1);

                List <TopDatum> newTopData = newTopDatum?.data;
                if (newTopData is null)
                {
                    LoadingAnimation.IsRunning = false;
                    await DisplayAlert("No " + EFilter_ToString.toString(currentMode) + " " + selected + " completions.", "Be the first!", "OK");

                    return;
                }

                topData           = newTopData;
                currentZone       = newZoneNum;
                currentZoneString = selected;

                list_index = 1;
                ClearTopGrid();

                LayoutTop(EFilter_ToString.toString(currentMode), currentZoneString);
                LoadingAnimation.IsRunning = false;
            }
        }
Ejemplo n.º 15
0
        // Displaying Changes -------------------------------------------------------------------------------

        private void LayoutRecords()
        {
            if (list_index != 1)
            {
                ORStack.Children.Add(new BoxView
                {
                    Style = App.Current.Resources["SeparatorStyle"] as Style
                });
            }

            int i      = 0;
            int length = oldRecordData.Count;

            foreach (OldRecord datum in oldRecordData)
            {
                string rrstring = datum.mapName;
                if (datum.zoneID != null)
                {
                    rrstring += " " + EFilter_ToString.zoneFormatter(datum.zoneID, false, false);
                }
                ORStack.Children.Add(new Label
                {
                    Text  = rrstring,
                    Style = App.Current.Resources["RRLabelStyle"] as Style
                });

                ORStack.Children.Add(new Label
                {
                    Text  = String_Formatter.toEmoji_Country(datum.country) + " " + datum.playerName,
                    Style = App.Current.Resources["RR2LabelStyle"] as Style
                });

                string rrtime = "in " + String_Formatter.toString_RankTime(datum.surfTime);
                if (!(datum.r2Diff is null))
                {
                    if (datum.r2Diff != "0")
                    {
                        rrtime += " (WR-" + String_Formatter.toString_RankTime(datum.r2Diff.Substring(1)) + ")";
                    }
                    else
                    {
                        rrtime += " (RETAKEN)";
                    }
                }
Ejemplo n.º 16
0
        // UI -----------------------------------------------------------------------------------------------
        #region UI

        private async Task ChangePlayerInfo(EFilter_Game newGame, EFilter_Mode newMode, EFilter_PlayerType newPlayerType, string newPlayerValue)
        {
            if (newGame == game && newMode == mode && newPlayerValue == playerValue)
            {
                return;
            }

            var playerInfoDatum = await playerViewModel.GetPlayerInfo(newGame, newMode, newPlayerType, newPlayerValue);

            playerInfoData = playerInfoDatum?.data;
            if (playerInfoData is null || playerInfoData.basicInfo is null)
            {
                await DisplayAlert("Could not find player profile!", "Invalid SteamID or rank.", "OK");

                return;
            }

            playerType    = newPlayerType;
            playerValue   = newPlayerValue;
            game          = newGame;
            mode          = newMode;
            playerSteamId = playerInfoData.basicInfo.steamID;
            playerRank    = playerInfoData.SurfRank;

            string playerName = playerInfoData.basicInfo.name;

            if (playerName.Length > 18)
            {
                playerName = playerName.Substring(0, 13) + "...";
            }
            Title = playerName + " [" + EFilter_ToString.toString2(game) + ", " + EFilter_ToString.toString(mode) + "]";

            var PlayerSteamDatum = await playerViewModel.GetPlayerSteamProfile(playerSteamId);

            playerSteamProfile = PlayerSteamDatum?.response.players[0];

            wrsType = EFilter_PlayerWRsType.none;
            LayoutPlayerInfo();
            LayoutPlayerProfile();
        }
Ejemplo n.º 17
0
        private async void RRTypeOptionLabel_Tapped(object sender, EventArgs e)
        {
            List <string> types             = new List <string>();
            string        currentTypeString = EFilter_ToString.toString2(recentRecordsType);

            foreach (string type in EFilter_ToString.rrtype_arr)
            {
                if (type != currentTypeString)
                {
                    types.Add(type);
                }
            }

            string newTypeString = await DisplayActionSheet("Choose a different type", "Cancel", null, types.ToArray());

            EFilter_RRType newType = EFilter_RRType.map;

            switch (newTypeString)
            {
            case "Cancel": return;

            case "Top10": newType = EFilter_RRType.top; break;

            case "Stage": newType = EFilter_RRType.stage; break;

            case "Bonus": newType = EFilter_RRType.bonus; break;

            case "All WRs": newType = EFilter_RRType.all; break;
            }

            recentRecordsType = newType;

            LoadingAnimation.IsRunning = true;
            await ChangeRecentRecords(game, recentRecordsType, mode);

            LoadingAnimation.IsRunning = false;
        }
Ejemplo n.º 18
0
        public MapsMapPRPage(string title, MapsViewModel mapsViewModel, EFilter_Game game, string map, bool hasZones, bool hasStages)
        {
            mapsMapTitle       = title;
            this.mapsViewModel = mapsViewModel;
            this.game          = game;
            this.map           = map;
            this.hasZones      = hasZones;
            this.hasStages     = hasStages;

            playerValue   = meSteamID;
            playerSteamID = meSteamID;
            playerType    = EFilter_PlayerType.me;

            InitializeComponent();
            Title = mapsMapTitle + " " + EFilter_ToString.toString(defaultMode) + "]";
            if (!hasZones)
            {
                ZoneRecordsOption.IsVisible = false;
            }
            if (!hasStages)
            {
                CCPOption.IsVisible = false;
            }
        }
Ejemplo n.º 19
0
        // UI -----------------------------------------------------------------------------------------------
        #region UI

        private async Task ChangeMostByType(EFilter_Game game, EFilter_MostType type, EFilter_Mode mode, bool clearGrid)
        {
            string        rightColString = "Player";
            string        leftColString  = "";
            List <string> players        = new List <string>();
            List <string> values         = new List <string>();

            switch (type)
            {
            case EFilter_MostType.pc:
            {
                var mostPCDatum = await recordsViewModel.GetMostPC(game, mode, list_index);

                mostPCData = mostPCDatum?.data;
                if (mostPCData is null || mostPCData.Count < 1)
                {
                    MoreFrame.IsVisible = false;
                    return;
                }

                leftColString = "Total";
                foreach (MostPCDatum datum in mostPCData)
                {
                    players.Add(String_Formatter.toEmoji_Country(datum.country) + " " + datum.name);
                    values.Add((double.Parse(datum.percentCompletion) * 100).ToString("0.00") + "%");
                }
                break;
            }

            case EFilter_MostType.wr:
            case EFilter_MostType.wrcp:
            case EFilter_MostType.wrb:
            case EFilter_MostType.mostwr:
            case EFilter_MostType.mostwrcp:
            case EFilter_MostType.mostwrb:
            {
                var mostCountDatum = await recordsViewModel.GetMostCount(game, type, mode, list_index);

                mostCountData = mostCountDatum?.data;
                if (mostCountData is null || mostCountData.Count < 1)
                {
                    MoreFrame.IsVisible = false;
                    return;
                }

                leftColString = "Total";
                foreach (MostCountDatum datum in mostCountData)
                {
                    players.Add(String_Formatter.toEmoji_Country(datum.country) + " " + datum.name);
                    values.Add(String_Formatter.toString_Int(datum.total));
                }
                break;
            }

            case EFilter_MostType.top10:
            {
                var mostTopDatum = await recordsViewModel.GetMostTop(game, mode, list_index);

                mostTopData = mostTopDatum?.data;
                if (mostTopData is null || mostTopData.Count < 1)
                {
                    MoreFrame.IsVisible = false;
                    return;
                }

                leftColString = "Points";
                foreach (MostTopDatum datum in mostTopData)
                {
                    players.Add(String_Formatter.toEmoji_Country(datum.country) + " " + datum.name);
                    values.Add(String_Formatter.toString_Points(datum.top10Points));
                }
                break;
            }

            case EFilter_MostType.group:
            {
                var mostGroupDatum = await recordsViewModel.GetMostGroup(game, mode, list_index);

                mostGroupData = mostGroupDatum?.data;
                if (mostGroupData is null || mostGroupData.Count < 1)
                {
                    MoreFrame.IsVisible = false;
                    return;
                }

                leftColString = "Points";
                foreach (MostGroupDatum datum in mostGroupData)
                {
                    players.Add(String_Formatter.toEmoji_Country(datum.country) + " " + datum.name);
                    values.Add(String_Formatter.toString_Points(datum.groupPoints));
                }
                break;
            }

            case EFilter_MostType.mostcontestedwr:
            {
                var mostContWrDatum = await recordsViewModel.GetMostContWr(game, mode, list_index);

                mostContWrData = mostContWrDatum?.data;
                if (mostContWrData is null || mostContWrData.Count < 1)
                {
                    MoreFrame.IsVisible = false;
                    return;
                }

                rightColString = "Map";
                leftColString  = "Beaten";
                foreach (MostContWrDatum datum in mostContWrData)
                {
                    players.Add(datum.mapName);
                    values.Add(String_Formatter.toString_Int(datum.total));
                }
                break;
            }

            case EFilter_MostType.mostcontestedwrcp:
            case EFilter_MostType.mostcontestedwrb:
            {
                var mostContZoneDatum = await recordsViewModel.GetMostContZone(game, type, mode, list_index);

                mostContZoneData = mostContZoneDatum?.data;
                if (mostContZoneData is null || mostContZoneData.Count < 1)
                {
                    MoreFrame.IsVisible = false;
                    return;
                }

                rightColString = "Zone";
                leftColString  = "Beaten";
                foreach (MostContZoneDatum datum in mostContZoneData)
                {
                    string zoneString = EFilter_ToString.zoneFormatter(datum.zoneID, false, false);
                    players.Add(datum.mapName + " " + zoneString);
                    values.Add(String_Formatter.toString_Int(datum.total));
                }
                break;
            }

            case EFilter_MostType.playtimeday:
            case EFilter_MostType.playtimeweek:
            case EFilter_MostType.playtimemonth:
            {
                var mostTimeDatum = await recordsViewModel.GetMostTime(game, type, mode, list_index);

                mostTimeData = mostTimeDatum?.data;
                if (mostTimeData is null || mostTimeData.Count < 1)
                {
                    return;
                }

                rightColString = "Map";
                leftColString  = "Time";
                foreach (MostTimeDatum datum in mostTimeData)
                {
                    players.Add(datum.mapName);
                    values.Add(String_Formatter.toString_PlayTime(datum.totalplaytime.ToString(), true));
                }
                break;
            }

            default: return;
            }

            MostTypeOptionLabel.Text = "Type: " + EFilter_ToString.toString2(type);

            if (clearGrid)
            {
                ClearMostByTypeGrid(rightColString, leftColString);
            }
            LayoutMostByType(type, players, values);
        }
        // Displaying Changes -------------------------------------------------------------------------------

        private void LayoutRecords()
        {
            if (list_index != 1)
            {
                WRsStack.Children.Add(new BoxView
                {
                    Style = App.Current.Resources["SeparatorStyle"] as Style
                });
            }

            int i      = 0;
            int length = worldRecordsData.Count;

            foreach (PlayerWorldRecords datum in worldRecordsData)
            {
                string rrstring = datum.mapName;
                if (wrsType != EFilter_PlayerWRsType.wr)
                {
                    rrstring += " " + EFilter_ToString.zoneFormatter(datum.zoneID, false, false);
                }
                WRsStack.Children.Add(new Label
                {
                    Text  = rrstring,
                    Style = App.Current.Resources["RRLabelStyle"] as Style
                });

                string rrtime = "in " + String_Formatter.toString_RankTime(datum.surfTime) + " (";
                if (datum.r2Diff is null)
                {
                    rrtime += "WR N/A";
                }
                else
                {
                    rrtime += "WR-" + String_Formatter.toString_RankTime(datum.r2Diff.Substring(1));
                }
                rrtime += ") (" + String_Formatter.toString_LastOnline(datum.date) + ")";
                WRsStack.Children.Add(new Label
                {
                    Text  = rrtime,
                    Style = App.Current.Resources["TimeLabelStyle"] as Style
                });

                if (++i != length)
                {
                    WRsStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["SeparatorStyle"] as Style
                    });
                }
            }

            moreRecords         = (i == LIST_LIMIT);
            MoreFrame.IsVisible = moreRecords;

            if (i == 0) // no recently broken records
            {
                WRsStack.Children.Add(new Label
                {
                    Text              = "None! :(",
                    Style             = App.Current.Resources["LeftColStyle"] as Style,
                    HorizontalOptions = LayoutOptions.Center
                });
            }
        }
Ejemplo n.º 21
0
        // Displaying Changes -------------------------------------------------------------------------------

        private void LayoutRecords()
        {
            ClearRecordsStacks();

            int i = 0;

            foreach (RecentPlayerRecords datum in recordsBrokenData)
            {
                string rrstring = datum.mapName + " ";
                if (datum.zoneID != "0")
                {
                    rrstring += EFilter_ToString.zoneFormatter(datum.zoneID, false, false) + " ";
                }
                RecordsBrokenStack.Children.Add(new Label
                {
                    Text  = rrstring,
                    Style = App.Current.Resources["RRLabelStyle"] as Style
                });

                if (datum.recordType.Contains("Top10"))
                {
                    if (datum.prevRank != "10")
                    {
                        datum.recordType = "[R" + datum.prevRank + "]";
                    }
                    else
                    {
                        datum.recordType = "Top10";
                    }
                }
                RecordsBrokenStack.Children.Add(new Label
                {
                    Text  = datum.recordType + " lost on " + datum.server + " server",
                    Style = App.Current.Resources["RR2LabelStyle"] as Style,
                });

                string rrtime = "now [R" + datum.newRank + "] (";
                if (datum.wrDiff == "0")
                {
                    rrtime += "RETAKEN";
                }
                else
                {
                    rrtime += "WR+" + String_Formatter.toString_RankTime(datum.wrDiff);
                }
                rrtime += ") (" + String_Formatter.toString_LastOnline(datum.date) + ")";

                RecordsBrokenStack.Children.Add(new Label
                {
                    Text  = rrtime,
                    Style = App.Current.Resources["TimeLabelStyle"] as Style
                });

                if (++i != recordsBrokenData.Count)
                {
                    RecordsBrokenStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["SeparatorStyle"] as Style
                    });
                }
            }
            if (i == 0) // no recently broken records
            {
                RecordsBrokenStack.Children.Add(new Label
                {
                    Text              = "None! :)",
                    Style             = App.Current.Resources["LeftColStyle"] as Style,
                    HorizontalOptions = LayoutOptions.Center
                });
            }

            i = 0;
            foreach (RecentPlayerRecords datum in recordsSetData)
            {
                string rrstring = datum.mapName + " ";
                if (datum.zoneID != "0")
                {
                    rrstring += EFilter_ToString.zoneFormatter(datum.zoneID, false, false) + " ";
                }
                RecordsSetStack.Children.Add(new Label
                {
                    Text  = rrstring,
                    Style = App.Current.Resources["RRLabelStyle"] as Style
                });
                RecordsSetStack.Children.Add(new Label
                {
                    Text  = datum.recordType + " set on " + datum.server + " server",
                    Style = App.Current.Resources["RR2LabelStyle"] as Style
                });

                string rrtime = "[R" + datum.newRank + "] in " + String_Formatter.toString_RankTime(datum.surfTime) + " (";
                if (datum.wrDiff != "0")
                {
                    if (datum.newRank == "1")
                    {
                        rrtime += "now ";
                    }
                    rrtime += "WR+" + String_Formatter.toString_RankTime(datum.wrDiff) + ") (";
                }
                rrtime += String_Formatter.toString_LastOnline(datum.date) + ")";

                RecordsSetStack.Children.Add(new Label
                {
                    Text  = rrtime,
                    Style = App.Current.Resources["TimeLabelStyle"] as Style
                });

                if (++i != recordsSetData.Count)
                {
                    RecordsSetStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["SeparatorStyle"] as Style
                    });
                }
            }
            if (i == 0) // no recently set records
            {
                RecordsSetStack.Children.Add(new Label
                {
                    Text              = "None! :(",
                    Style             = App.Current.Resources["LeftColStyle"] as Style,
                    HorizontalOptions = LayoutOptions.Center
                });
            }
        }
Ejemplo n.º 22
0
        // Displaying Changes -------------------------------------------------------------------------------

        private void LayoutPlayerProfile()
        {
            if (playerSteamProfile is null)
            {
                PlayerImage.Source = "failed_steam_profile.png";
            }
            else
            {
                PlayerImage.Source = playerSteamProfile.avatarfull;
            }

            PlayerNameLabel.Text    = playerInfoData.basicInfo.name;
            PlayerCountryLabel.Text = String_Formatter.toEmoji_Country(playerInfoData.basicInfo.country) + " " + playerInfoData.basicInfo.country;

            List <string> attributes = new List <string>();

            if (!(playerInfoData.banStatus is bool))
            {
                attributes.Add("BANNED");
            }
            if (playerInfoData.KSFStatus != null)
            {
                attributes.Add("KSF");
            }
            if (playerInfoData.vipStatus != null)
            {
                attributes.Add("VIP");
            }
            if (playerInfoData.adminStatus != null)
            {
                attributes.Add("Admin");
            }
            if (playerInfoData.mapperID != null)
            {
                attributes.Add("Mapper");
            }
            PlayerAttributesLabel.Text = string.Join(" | ", attributes);

            string rankTitle = EFilter_ToString.getRankTitle(playerInfoData.SurfRank, playerInfoData.playerPoints.points);
            Color  rankColor = new Color();

            switch (rankTitle)
            {
            case "MASTER": rankColor = EFilter_ToString.rankColors[0]; break;

            case "ELITE": rankColor = EFilter_ToString.rankColors[1]; break;

            case "VETERAN": rankColor = EFilter_ToString.rankColors[2]; break;

            case "PRO": rankColor = EFilter_ToString.rankColors[3]; break;

            case "EXPERT": rankColor = EFilter_ToString.rankColors[4]; break;

            case "HOTSHOT": rankColor = EFilter_ToString.rankColors[5]; break;

            case "EXCEPTIONAL": rankColor = EFilter_ToString.rankColors[6]; break;

            case "SEASONED": rankColor = EFilter_ToString.rankColors[7]; break;

            case "EXPERIENCED": rankColor = EFilter_ToString.rankColors[8]; break;

            case "PROFICIENT": rankColor = EFilter_ToString.rankColors[9]; break;

            case "SKILLED": rankColor = EFilter_ToString.rankColors[10]; break;

            case "CASUAL": rankColor = EFilter_ToString.rankColors[11]; break;

            case "BEGINNER": rankColor = EFilter_ToString.rankColors[12]; break;

            case "ROOKIE": rankColor = EFilter_ToString.rankColors[13]; break;
            }
            RankTitleLabel.Text          = rankTitle;
            RankTitleLabel.TextColor     = rankColor;
            PlayerImageFrame.BorderColor = rankColor;
        }
        // Displaying Changes -------------------------------------------------------------------------------

        private void LayoutRecords()
        {
            if (list_index != 1)
            {
                ORStack.Children.Add(new BoxView
                {
                    Style = App.Current.Resources["SeparatorStyle"] as Style
                });
            }

            int i      = 0;
            int length = oldRecordData.Count;

            foreach (PlayerOldRecord datum in oldRecordData)
            {
                string rrstring = datum.mapName;
                if (datum.zoneID != null)
                {
                    rrstring += " " + EFilter_ToString.zoneFormatter(datum.zoneID, false, false);
                }
                ORStack.Children.Add(new Label
                {
                    Text  = rrstring,
                    Style = App.Current.Resources["RRLabelStyle"] as Style
                });

                string rrtime = "";
                string rrdiff = "";
                if (oldestType == EFilter_PlayerOldestType.top10)
                {
                    rrtime += "[R" + datum.rank + "] ";
                    if (datum.wrdiff == "0")
                    {
                        rrdiff += " (WR)";
                    }
                    else
                    {
                        rrdiff += " (WR+" + String_Formatter.toString_RankTime(datum.wrdiff) + ")";
                    }
                }
                else if (oldestType == EFilter_PlayerOldestType.map)
                {
                    if (datum.top10Group != "0")
                    {
                        rrtime += "[G" + datum.top10Group.Substring(1) + "] ";
                    }
                }
                else if (oldestType == EFilter_PlayerOldestType.wr ||
                         oldestType == EFilter_PlayerOldestType.wrcp ||
                         oldestType == EFilter_PlayerOldestType.wrb)
                {
                    if (!(datum.r2Diff is null))
                    {
                        if (datum.r2Diff != "0")
                        {
                            rrdiff += " (WR-" + String_Formatter.toString_RankTime(datum.r2Diff.Substring(1)) + ")";
                        }
                        else
                        {
                            rrdiff += " (RETAKEN)";
                        }
                    }
                    else
                    {
                        rrdiff += " (WR N/A)";
                    }
                }

                rrtime += "in " + String_Formatter.toString_RankTime(datum.surfTime) + rrdiff;
                rrtime += " (" + String_Formatter.toString_LastOnline(datum.date) + ")";
                ORStack.Children.Add(new Label
                {
                    Text  = rrtime,
                    Style = App.Current.Resources["TimeLabelStyle"] as Style
                });

                if (++i != length)
                {
                    ORStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["SeparatorStyle"] as Style
                    });
                }
            }
        // Dispaying Changes -------------------------------------------------------------------------------

        private void LayoutRecords()
        {
            if (list_index != 1)
            {
                CompletionStack.Children.Add(new BoxView
                {
                    Style = App.Current.Resources["SeparatorStyle"] as Style
                });
            }

            int i      = 0;
            int length = recordsData.Count;

            foreach (PlayerCompletionRecord datum in recordsData)
            {
                if (datum.completedZones is null)
                {
                    datum.completedZones = "0";
                }
                CompletionStack.Children.Add(new Label
                {
                    Text  = datum.mapName + " (" + datum.completedZones + "/" + datum.totalZones + ")",
                    Style = App.Current.Resources["RRLabelStyle"] as Style
                });

                EFilter_MapType mapType = (EFilter_MapType)int.Parse(datum.mapType);
                string          cptype  = (mapType == EFilter_MapType.linear) ? "CPs" : "Stages";
                string          rrinfo  = datum.cp_count + " " + cptype + ", " + datum.b_count + " Bonus";
                if (datum.b_count != "1")
                {
                    rrinfo += "es";
                }

                CompletionStack.Children.Add(new Label
                {
                    Text  = "Tier " + datum.tier + " " + EFilter_ToString.toString(mapType) + " - " + rrinfo,
                    Style = App.Current.Resources["TimeLabelStyle"] as Style
                });

                if (++i != length)
                {
                    CompletionStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["SeparatorStyle"] as Style
                    });
                }
            }

            moreRecords         = (i == LIST_LIMIT);
            MoreFrame.IsVisible = moreRecords;

            if (i == 0) // no (in)complete maps
            {
                string text = "None ! " + ((completionType == EFilter_PlayerCompletionType.complete) ? ":(" :  ":)");
                CompletionStack.Children.Add(new Label
                {
                    Text              = text,
                    Style             = App.Current.Resources["LeftColStyle"] as Style,
                    HorizontalOptions = LayoutOptions.Center
                });
            }
        }
Ejemplo n.º 25
0
        // Displaying Changes -------------------------------------------------------------------------------

        private void LayoutPRDetails()
        {
            string units = " u/s";
            int    i     = 0;

            foreach (MapPRDetails zonePR in mapPRDetails)
            {
                if (zonePR.zoneID == "0")
                {
                    continue;
                }
                bool noTime = (zonePR.surfTime is null || zonePR.surfTime == "0");

                if (i != 0)
                {
                    ZoneRecordStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["Separator2Style"] as Style
                    });
                }

                ZoneRecordStack.Children.Add(new Label {
                    Text   = EFilter_ToString.zoneFormatter(zonePR.zoneID, false, true),
                    Style  = App.Current.Resources["HeaderLabel"] as Style,
                    Margin = new Thickness(10, 0, 0, 0)
                });

                // Info -----------------------------------------------------------------
                Grid recordGrid = new Grid {
                    ColumnDefinitions =
                    {
                        new ColumnDefinition {
                            Width = 45
                        },
                        new ColumnDefinition {
                            Width = new GridLength(1, GridUnitType.Star)
                        },
                    },
                    Style = App.Current.Resources["ColumnGridStyle"] as Style
                };

                recordGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text  = "Time",
                            Style = App.Current.Resources["LeftColStyle"] as Style
                        },
                        new Label {
                            Text  = "Rank",
                            Style = App.Current.Resources["LeftColStyle"] as Style
                        },
                    }
                }, 0, 0);

                if (noTime)
                {
                    recordGrid.Children.Add(new StackLayout
                    {
                        Children =
                        {
                            new Label {
                                Text  = "None",
                                Style = App.Current.Resources["RightColStyle"] as Style
                            },
                            new Label {
                                Text  = "N/A",
                                Style = App.Current.Resources["RightColStyle"] as Style
                            },
                        }
                    }, 1, 0);
                }
                else
                {
                    string rank = zonePR.rank + "/" + zonePR.totalRanks;
                    if (zonePR.rank == "1")
                    {
                        rank = "[WR] " + rank;
                    }
                    else if (int.Parse(zonePR.rank) <= 10)
                    {
                        rank = "[Top10] " + rank;
                    }

                    recordGrid.Children.Add(new StackLayout
                    {
                        Children =
                        {
                            new Label {
                                Text  = String_Formatter.toString_RankTime(zonePR.surfTime),
                                Style = App.Current.Resources["RightColStyle"] as Style
                            },
                            new Label {
                                Text  = rank,
                                Style = App.Current.Resources["RightColStyle"] as Style
                            },
                        }
                    }, 1, 0);
                }

                ZoneRecordStack.Children.Add(recordGrid);
                if (noTime)
                {
                    i++;
                    continue;
                }

                ZoneRecordStack.Children.Add(new BoxView
                {
                    Style = App.Current.Resources["MiniSeparatorStyle"] as Style
                });

                // Velocity -------------------------------------------------------------
                Grid velGrid = new Grid
                {
                    ColumnDefinitions =
                    {
                        new ColumnDefinition {
                            Width = 95
                        },
                        new ColumnDefinition {
                            Width = new GridLength(1, GridUnitType.Star)
                        },
                    },
                    Style = App.Current.Resources["ColumnGridStyle"] as Style
                };

                velGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text  = "Avg Vel",
                            Style = App.Current.Resources["LeftColStyle"] as Style
                        },
                        new Label {
                            Text  = "Start Vel",
                            Style = App.Current.Resources["LeftColStyle"] as Style
                        },
                        new Label {
                            Text  = "End Vel",
                            Style = App.Current.Resources["LeftColStyle"] as Style
                        },
                    }
                }, 0, 0);

                velGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text  = ((int)double.Parse(zonePR.avgVel)) + units,
                            Style = App.Current.Resources["RightColStyle"] as Style
                        },
                        new Label {
                            Text  = ((int)double.Parse(zonePR.startVel)) + units,
                            Style = App.Current.Resources["RightColStyle"] as Style
                        },
                        new Label {
                            Text  = ((int)double.Parse(zonePR.endVel)) + units,
                            Style = App.Current.Resources["RightColStyle"] as Style
                        },
                    }
                }, 1, 0);

                ZoneRecordStack.Children.Add(velGrid);
                ZoneRecordStack.Children.Add(new BoxView
                {
                    Style = App.Current.Resources["MiniSeparatorStyle"] as Style
                });

                // Completion ------------------------------------------------------------------
                string completion = zonePR.count;
                if (!(zonePR.attempts is null))
                {
                    string percent = String_Formatter.toString_CompletionPercent(zonePR.count, zonePR.attempts);
                    completion += "/" + zonePR.attempts + " (" + percent + ")";
                }

                string time = "";
                if (!(zonePR.totalSurfTime is null))
                {
                    time = String_Formatter.toString_PlayTime(zonePR.totalSurfTime, true);
                }

                Grid compGrid = new Grid
                {
                    ColumnDefinitions =
                    {
                        new ColumnDefinition {
                            Width = 114
                        },
                        new ColumnDefinition {
                            Width = new GridLength(1, GridUnitType.Star)
                        },
                    },
                    Style = App.Current.Resources["ColumnGridStyle"] as Style
                };

                compGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text  = "Completions",
                            Style = App.Current.Resources["LeftColStyle"] as Style
                        },
                        new Label {
                            Text  = "Time in Zone",
                            Style = App.Current.Resources["LeftColStyle"] as Style
                        },
                    }
                }, 0, 0);

                compGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text  = completion,
                            Style = App.Current.Resources["RightColStyle"] as Style
                        },
                        new Label {
                            Text  = time,
                            Style = App.Current.Resources["RightColStyle"] as Style
                        },
                    }
                }, 1, 0);

                ZoneRecordStack.Children.Add(compGrid);
                i++;
            }
        }
Ejemplo n.º 26
0
        // Displaying Changes -------------------------------------------------------------------------------

        private void LayoutPRDetails()
        {
            string units = " u/s";
            int    i     = 0;

            foreach (MapCPRDetails zoneCPR in CPRDetails)
            {
                CPRStack.Children.Add(new Label
                {
                    Text   = EFilter_ToString.CPRZoneFormatter(zoneCPR.zoneID, mapType),
                    Style  = App.Current.Resources["HeaderLabel"] as Style,
                    Margin = new Thickness(10, 0, 0, 0)
                });

                Grid recordGrid = new Grid
                {
                    ColumnDefinitions =
                    {
                        new ColumnDefinition {
                            Width = 102
                        },
                        new ColumnDefinition {
                            Width = 92
                        },
                        new ColumnDefinition {
                            Width = new GridLength(1, GridUnitType.Star)
                        },
                    },
                    Style = App.Current.Resources["ColumnGridStyle"] as Style
                };

                int playerVel = (int)double.Parse(zoneCPR.playerTouchVel);
                int wrVel     = (int)double.Parse(zoneCPR.WRTouchVel);
                int diffVel   = (int)double.Parse(zoneCPR.velDiff);

                recordGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text      = String_Formatter.toString_RankTime(zoneCPR.playerTime),
                            Style     = App.Current.Resources["LeftColStyle"] as Style,
                            FontSize  = GRIDFONT,
                            IsVisible = i != 0
                        },
                        new Label {
                            Text     = playerVel + units,
                            Style    = App.Current.Resources["LeftColStyle"] as Style,
                            FontSize = GRIDFONT
                        },
                    }
                }, 0, 0);

                recordGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text      = String_Formatter.toString_RankTime(zoneCPR.WRTime),
                            Style     = App.Current.Resources["LeftColStyle"] as Style,
                            FontSize  = GRIDFONT,
                            IsVisible = i != 0
                        },
                        new Label {
                            Text     = wrVel + units,
                            Style    = App.Current.Resources["LeftColStyle"] as Style,
                            FontSize = GRIDFONT
                        },
                    }
                }, 1, 0);

                string velPrefix  = (diffVel > 0)? "+" : "";
                string timePrefix = "+";
                if (zoneCPR.timeDiff.Contains("-"))
                {
                    zoneCPR.timeDiff = zoneCPR.timeDiff.Replace("-", "");
                    timePrefix       = "-";
                }

                recordGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text      = "(" + timePrefix + String_Formatter.toString_RankTime(zoneCPR.timeDiff) + ")",
                            Style     = App.Current.Resources["RightColStyle"] as Style,
                            FontSize  = GRIDFONT,
                            IsVisible = i != 0
                        },
                        new Label {
                            Text     = "[" + velPrefix + diffVel + units + "]",
                            Style    = App.Current.Resources["RightColStyle"] as Style,
                            FontSize = GRIDFONT
                        },
                    }
                }, 2, 0);

                CPRStack.Children.Add(recordGrid);

                if (++i != CPRDetails.Count)
                {
                    CPRStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["Separator2Style"] as Style
                    });
                }
            }
        }
Ejemplo n.º 27
0
        // Displaying Changes -------------------------------------------------------------------------------

        private void LayoutPRDetails()
        {
            string units = " u/s";
            int    i     = 0;

            foreach (MapCCPDetails zoneCCP in CCPDetails)
            {
                CCPStack.Children.Add(new Label
                {
                    Text   = EFilter_ToString.zoneFormatter(zoneCCP.zoneID, true, true),
                    Style  = App.Current.Resources["HeaderLabel"] as Style,
                    Margin = new Thickness(10, 0, 0, 0)
                });

                Grid recordGrid = new Grid
                {
                    ColumnDefinitions =
                    {
                        new ColumnDefinition {
                            Width = 102
                        },
                        new ColumnDefinition {
                            Width = 92
                        },
                        new ColumnDefinition {
                            Width = new GridLength(1, GridUnitType.Star)
                        },
                    },
                    Style = App.Current.Resources["ColumnGridStyle"] as Style
                };

                int playerVel = (int)double.Parse(zoneCCP.avgVelPlayer);
                int wrVel     = (int)double.Parse(zoneCCP.avgVelWR);
                int diffVel   = playerVel - wrVel;

                recordGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text     = String_Formatter.toString_RankTime(zoneCCP.cpTimePlayer),
                            Style    = App.Current.Resources["LeftColStyle"] as Style,
                            FontSize = GRIDFONT,
                        },
                        new Label {
                            Text     = playerVel + units,
                            Style    = App.Current.Resources["LeftColStyle"] as Style,
                            FontSize = GRIDFONT
                        },
                    }
                }, 0, 0);

                recordGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text     = String_Formatter.toString_RankTime(zoneCCP.cpTimeWR),
                            Style    = App.Current.Resources["LeftColStyle"] as Style,
                            FontSize = GRIDFONT,
                        },
                        new Label {
                            Text     = wrVel + units,
                            Style    = App.Current.Resources["LeftColStyle"] as Style,
                            FontSize = GRIDFONT
                        },
                    }
                }, 1, 0);

                double playerTime = double.Parse(zoneCCP.cpTimePlayer);
                double wrTime     = double.Parse(zoneCCP.cpTimeWR);
                double timeDiff   = playerTime - wrTime;

                string timePrefix = (timeDiff > 0) ? "+" : "";
                string velPrefix  = (diffVel > 0) ? "+" : "";

                string timeString = String_Formatter.toString_RankTime(timeDiff.ToString());
                if (timeString.Contains("-"))
                {
                    timeString = timeString.Replace("-", "");
                    timePrefix = "-";
                }


                recordGrid.Children.Add(new StackLayout
                {
                    Children =
                    {
                        new Label {
                            Text     = "(" + timePrefix + timeString + ")",
                            Style    = App.Current.Resources["RightColStyle"] as Style,
                            FontSize = GRIDFONT
                        },
                        new Label {
                            Text     = "[" + velPrefix + diffVel + units + "]",
                            Style    = App.Current.Resources["RightColStyle"] as Style,
                            FontSize = GRIDFONT
                        },
                    }
                }, 2, 0);

                CCPStack.Children.Add(recordGrid);

                if (++i != CCPDetails.Count)
                {
                    CCPStack.Children.Add(new BoxView
                    {
                        Style = App.Current.Resources["Separator2Style"] as Style
                    });
                }
            }
        }