private string getSortFieldValueStr(PlayerProfile player, string phase) { string sort_method = getStringVarValue(phase); if (sort_method.CompareTo("kdr_asc_round") == 0 || sort_method.CompareTo("kdr_desc_round") == 0) return "kdr_round: " + Math.Round(player.getRoundKdr(), 2); else if (sort_method.CompareTo("score_asc_round") == 0 || sort_method.CompareTo("score_desc_round") == 0) return "score_round: " + Math.Round(player.getRoundScore(), 2); else if (sort_method.CompareTo("spm_asc_round") == 0 || sort_method.CompareTo("spm_desc_round") == 0) return "spm_round: " + Math.Round(player.getRoundSpm(), 2); else if (sort_method.CompareTo("kpm_asc_round") == 0 || sort_method.CompareTo("kpm_desc_round") == 0) return "kpm_round: " + Math.Round(player.getRoundKpm(), 2); else if (sort_method.CompareTo("time_asc_round") == 0 || sort_method.CompareTo("time_desc_round") == 0) return "time_round: " + player.getRoundTime(); else if (sort_method.CompareTo("random_value") == 0 || sort_method.CompareTo("random_value") == 0) return "random_value: " + player.getRandomValue(); else if (sort_method.CompareTo("kdr_asc_online") == 0 || sort_method.CompareTo("kdr_desc_online") == 0) return "kdr_online: " + Math.Round(player.getOnlineKdr(), 2); else if (sort_method.CompareTo("kpm_asc_online") == 0 || sort_method.CompareTo("kpm_desc_online") == 0) return "kpm_online: " + Math.Round(player.getOnlineKpm(), 2); else if (sort_method.CompareTo("spm_asc_online") == 0 || sort_method.CompareTo("spm_desc_online") == 0) return "spm_online: " + Math.Round(player.getOnlineSpm(), 2); else if (sort_method.CompareTo("kills_asc_online") == 0 || sort_method.CompareTo("kills_desc_online") == 0) return "kills_online: " + player.getOnlineKills(); else if (sort_method.CompareTo("deaths_asc_online") == 0 || sort_method.CompareTo("deaths_desc_online") == 0) return "deaths_online: " + player.getOnlineDeaths(); else if (sort_method.CompareTo("skill_asc_online") == 0 || sort_method.CompareTo("skill_desc_online") == 0) return "skill_online: " + Math.Round(player.getOnlineSkill(), 2); else if (sort_method.CompareTo("quits_asc_online") == 0 || sort_method.CompareTo("quits_desc_online") == 0) return "quits_online: " + Math.Round(player.getOnlineQuits(), 2); else if (sort_method.CompareTo("accuracy_asc_online") == 0 || sort_method.CompareTo("accuracy_desc_online") == 0) return "accuracy_online: " + Math.Round(player.getOnlineAccuracy(), 2); else if (sort_method.CompareTo("score_asc_online") == 0 || sort_method.CompareTo("score_desc_online") == 0) return "score_online: " + player.getOnlineScore(); else if (sort_method.CompareTo("rank_asc_online") == 0 || sort_method.CompareTo("rank_desc_online") == 0) return "rank_online: " + player.getOnlineRank(); DebugWrite("^1^bWARNING^0^n: cannot find player sort method for ^b" + sort_method + "^0", 1); return ""; }
private int player_time_asc_round_cmp(PlayerProfile left, PlayerProfile right) { DateTime lval = left.getRoundTime(); DateTime rval = right.getRoundTime(); return lval.CompareTo(rval); }