// 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 }); } } }
private void LayoutRecentRecords10() { RRTypeOptionLabel.Text = "Type: Top10"; RecordsStack.Children.Clear(); int i = 0; int length = recentRecords10Data.Count; foreach (RR10Datum datum in recentRecords10Data) { int rank = int.Parse(datum.newRank); RecordsStack.Children.Add(new Label { Text = datum.mapName + " [R" + rank + "]", 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") { rrtime += "WR"; } else { rrtime += "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 }); } } }
// 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 }); } }
// 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 }); } }
private void LayoutPlayerInfo() { // Info ----------------------------------------------------------- RankLabel.Text = String_Formatter.toString_Int(playerInfoData.SurfRank); PointsLabel.Text = String_Formatter.toString_Points(playerInfoData.playerPoints.points); CompletionLabel.Text = playerInfoData.percentCompletion + "%"; WRsLabel.Text = playerInfoData.WRZones.wr; WRCPsLabel.Text = String_Formatter.toString_Int(playerInfoData.WRZones.wrcp); WRBsLabel.Text = String_Formatter.toString_Points(playerInfoData.WRZones.wrb); if (int.Parse(playerInfoData.WRZones.wr) > 0) { wrsType = EFilter_PlayerWRsType.wr; } else if (int.Parse(playerInfoData.WRZones.wrcp) > 0) { wrsType = EFilter_PlayerWRsType.wrcp; } else if (int.Parse(playerInfoData.WRZones.wrb) > 0) { wrsType = EFilter_PlayerWRsType.wrb; } WRsFrame.IsVisible = (wrsType != EFilter_PlayerWRsType.none); FirstOnlineLabel.Text = String_Formatter.toString_KSFDate(playerInfoData.basicInfo.firstOnline); LastSeenLabel.Text = String_Formatter.toString_LastOnline(playerInfoData.basicInfo.lastOnline); SurfTimeLabel.Text = String_Formatter.toString_PlayTime(playerInfoData.basicInfo.aliveTime, true); SpecTimeLabel.Text = String_Formatter.toString_PlayTime(playerInfoData.basicInfo.deadTime, true); // Completion ----------------------------------------------------- MapsValueLabel.Text = playerInfoData.CompletedZones.map + "/" + playerInfoData.TotalZones.TotalMaps; MapsValueLabel.Text += " (" + String_Formatter.toString_CompletionPercent(playerInfoData.CompletedZones.map, playerInfoData.TotalZones.TotalMaps) + ")"; StagesValueLabel.Text = String_Formatter.toString_Points(playerInfoData.CompletedZones.stage) + "/" + String_Formatter.toString_Points(playerInfoData.TotalZones.TotalStages); StagesValueLabel.Text += " (" + String_Formatter.toString_CompletionPercent(playerInfoData.CompletedZones.stage, playerInfoData.TotalZones.TotalStages) + ")"; BonusesValueLabel.Text = String_Formatter.toString_Points(playerInfoData.CompletedZones.bonus) + "/" + String_Formatter.toString_Points(playerInfoData.TotalZones.TotalBonuses); BonusesValueLabel.Text += " (" + String_Formatter.toString_CompletionPercent(playerInfoData.CompletedZones.bonus, playerInfoData.TotalZones.TotalBonuses) + ")"; // Groups --------------------------------------------------------- Top10sLabel.Text = playerInfoData.Top10Groups.top10; hasTop = (playerInfoData.Top10Groups.top10 != "0"); if (hasTop) { if (playerInfoData.Top10Groups.rank1 != "0") { R1GroupLabel.IsVisible = true; R1ValueLabel.IsVisible = true; R1ValueLabel.Text = playerInfoData.Top10Groups.rank1; } else { R1GroupLabel.IsVisible = false; R1ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank2 != "0") { R2GroupLabel.IsVisible = true; R2ValueLabel.IsVisible = true; R2ValueLabel.Text = playerInfoData.Top10Groups.rank2; } else { R2GroupLabel.IsVisible = false; R2ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank3 != "0") { R3GroupLabel.IsVisible = true; R3ValueLabel.IsVisible = true; R3ValueLabel.Text = playerInfoData.Top10Groups.rank3; } else { R3GroupLabel.IsVisible = false; R3ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank4 != "0") { R4GroupLabel.IsVisible = true; R4ValueLabel.IsVisible = true; R4ValueLabel.Text = playerInfoData.Top10Groups.rank4; } else { R4GroupLabel.IsVisible = false; R4ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank5 != "0") { R5GroupLabel.IsVisible = true; R5ValueLabel.IsVisible = true; R5ValueLabel.Text = playerInfoData.Top10Groups.rank5; } else { R5GroupLabel.IsVisible = false; R5ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank6 != "0") { R6GroupLabel.IsVisible = true; R6ValueLabel.IsVisible = true; R6ValueLabel.Text = playerInfoData.Top10Groups.rank6; } else { R6GroupLabel.IsVisible = false; R6ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank7 != "0") { R7GroupLabel.IsVisible = true; R7ValueLabel.IsVisible = true; R7ValueLabel.Text = playerInfoData.Top10Groups.rank7; } else { R7GroupLabel.IsVisible = false; R7ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank8 != "0") { R8GroupLabel.IsVisible = true; R8ValueLabel.IsVisible = true; R8ValueLabel.Text = playerInfoData.Top10Groups.rank8; } else { R8GroupLabel.IsVisible = false; R8ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank9 != "0") { R9GroupLabel.IsVisible = true; R9ValueLabel.IsVisible = true; R9ValueLabel.Text = playerInfoData.Top10Groups.rank9; } else { R9GroupLabel.IsVisible = false; R9ValueLabel.IsVisible = false; } if (playerInfoData.Top10Groups.rank10 != "0") { R10GroupLabel.IsVisible = true; R10ValueLabel.IsVisible = true; R10ValueLabel.Text = playerInfoData.Top10Groups.rank10; } else { R10GroupLabel.IsVisible = false; R10ValueLabel.IsVisible = false; } } else { R1GroupLabel.IsVisible = false; R1ValueLabel.IsVisible = false; R2GroupLabel.IsVisible = false; R2ValueLabel.IsVisible = false; R3GroupLabel.IsVisible = false; R3ValueLabel.IsVisible = false; R4GroupLabel.IsVisible = false; R4ValueLabel.IsVisible = false; R5GroupLabel.IsVisible = false; R5ValueLabel.IsVisible = false; R6GroupLabel.IsVisible = false; R6ValueLabel.IsVisible = false; R7GroupLabel.IsVisible = false; R7ValueLabel.IsVisible = false; R8GroupLabel.IsVisible = false; R8ValueLabel.IsVisible = false; R9GroupLabel.IsVisible = false; R9ValueLabel.IsVisible = false; R10GroupLabel.IsVisible = false; R10ValueLabel.IsVisible = false; } G1sLabel.Text = playerInfoData.Top10Groups.g1; G2sLabel.Text = playerInfoData.Top10Groups.g2; G3sLabel.Text = playerInfoData.Top10Groups.g3; G4sLabel.Text = playerInfoData.Top10Groups.g4; G5sLabel.Text = playerInfoData.Top10Groups.g5; G6sLabel.Text = playerInfoData.Top10Groups.g6; GroupsLabel.Text = playerInfoData.Top10Groups.groups; // Points Stack ------------------------------------------------------ Top10PtsLabel.Text = String_Formatter.toString_Points(playerInfoData.playerPoints.top10); GroupsPtsLabel.Text = String_Formatter.toString_Points(playerInfoData.playerPoints.groups); MapsPtsLabel.Text = String_Formatter.toString_Points(playerInfoData.playerPoints.map); string wrcpPoints = ""; if (playerInfoData.playerPoints.wrcp != "0") { wrcpPoints = "[+" + String_Formatter.toString_Points(playerInfoData.playerPoints.wrcp) + "] "; } StagesPtsLabel.Text = wrcpPoints + String_Formatter.toString_Points(playerInfoData.playerPoints.stage); string wrbPoints = ""; if (playerInfoData.playerPoints.wrb != "0") { wrbPoints = "[+" + String_Formatter.toString_Points(playerInfoData.playerPoints.wrb) + "] "; } BonusesPtsLabel.Text = wrbPoints + String_Formatter.toString_Points(playerInfoData.playerPoints.bonus); }
// 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 }); } }