From 01868497632e7f48419a3134b8429408443e71ea Mon Sep 17 00:00:00 2001 From: Micdu70 Date: Thu, 25 Jul 2024 00:48:44 +0200 Subject: [PATCH] Bug fix --- Entities/LevelStats.cs | 89 ++++++++++++++++++------------------- Entities/LogFileWatcher.cs | 74 +++++++++++++++++++++--------- Views/LeaderboardDisplay.cs | 34 +++++++------- Views/LevelDetails.cs | 4 +- Views/Overlay.cs | 16 ++++--- Views/Stats.cs | 20 +++++---- 6 files changed, 137 insertions(+), 100 deletions(-) diff --git a/Entities/LevelStats.cs b/Entities/LevelStats.cs index 70789690..d9834b6b 100644 --- a/Entities/LevelStats.cs +++ b/Entities/LevelStats.cs @@ -65,7 +65,6 @@ public class RoundInfo : IComparable { public DateTime? FinishLocal; public DateTime ShowStart = DateTime.MinValue; public DateTime ShowEnd = DateTime.MinValue; - public int GameDuration; public string SceneName; public bool Playing; private bool setLocalTime; @@ -2313,37 +2312,37 @@ public class LevelStats { { "knockout_fp10_squads_final_6", new LevelStats("knockout_fp10_squads_final_6", "7792-4199-5269", "Breaking Blast Ball", LevelType.Survival, BestRecordType.Longest, true, true, 10, 0, 0, 0, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, { "knockout_fp10_squads_final_7", new LevelStats("knockout_fp10_squads_final_7", "3359-6376-7570", "Hex-a-spectre", LevelType.Survival, BestRecordType.Longest, true, true, 10, 0, 0, 0, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, - { "round_biggestfan", new LevelStats("round_biggestfan", null, "Big Fans", LevelType.Race, BestRecordType.Fastest, false, false, 2, 210, 120, 300, Properties.Resources.round_big_fans_icon, Properties.Resources.round_big_fans_big_icon) }, - { "round_satellitehoppers_almond", new LevelStats("round_satellitehoppers_almond", null, "Cosmic Highway", LevelType.Race, BestRecordType.Fastest, false, false, 8, 180, 180, 300, Properties.Resources.round_cosmic_highway_icon, Properties.Resources.round_cosmic_highway_big_icon) }, - { "round_gauntlet_02", new LevelStats("round_gauntlet_02", null, "Dizzy Heights", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180, 120, 300, Properties.Resources.round_dizzy_heights_icon, Properties.Resources.round_dizzy_heights_big_icon) }, - { "round_door_dash", new LevelStats("round_door_dash", null, "Door Dash", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 300, Properties.Resources.round_door_dash_icon, Properties.Resources.round_door_dash_big_icon) }, - { "round_iceclimb", new LevelStats("round_iceclimb", null, "Freezy Peak", LevelType.Race, BestRecordType.Fastest, false, false, 3, 180 ,120, 300, Properties.Resources.round_freezy_peak_icon, Properties.Resources.round_freezy_peak_big_icon) }, - { "round_dodge_fall", new LevelStats("round_dodge_fall", null, "Fruit Chute", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 300, Properties.Resources.round_fruit_chute_icon, Properties.Resources.round_fruit_chute_big_icon) }, - { "round_see_saw_360", new LevelStats("round_see_saw_360", null, "Full Tilt", LevelType.Race, BestRecordType.Fastest, false, false, 6, 180 ,180, 300, Properties.Resources.round_full_tilt_icon, Properties.Resources.round_full_tilt_big_icon) }, - { "round_chompchomp", new LevelStats("round_chompchomp", null, "Gate Crash", LevelType.Race, BestRecordType.Fastest, false, false, 1, 300 ,120, 300, Properties.Resources.round_gate_crash_icon, Properties.Resources.round_gate_crash_big_icon) }, - { "round_gauntlet_01", new LevelStats("round_gauntlet_01", null, "Hit Parade", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 300, Properties.Resources.round_hit_parade_icon, Properties.Resources.round_hit_parade_big_icon) }, - { "round_gauntlet_04", new LevelStats("round_gauntlet_04", null, "Knight Fever", LevelType.Race, BestRecordType.Fastest, false, false, 2, 180 ,120, 300, Properties.Resources.round_knight_fever_icon, Properties.Resources.round_knight_fever_big_icon) }, - { "round_drumtop", new LevelStats("round_drumtop", null, "Lily Leapers", LevelType.Race, BestRecordType.Fastest, false, false, 5, 300 ,140, 300, Properties.Resources.round_lily_leapers_icon, Properties.Resources.round_lily_leapers_big_icon) }, - { "round_gauntlet_08", new LevelStats("round_gauntlet_08", null, "Party Promenade", LevelType.Race, BestRecordType.Fastest, false, false, 6, 300 ,120, 300, Properties.Resources.round_party_promenade_icon, Properties.Resources.round_party_promenade_big_icon) }, - { "round_pipedup_s6_launch", new LevelStats("round_pipedup_s6_launch", null, "Pipe Dream", LevelType.Race, BestRecordType.Fastest, false, false, 6, 300 ,150, 300, Properties.Resources.round_pipe_dream_icon, Properties.Resources.round_pipe_dream_big_icon) }, - { "round_follow_the_line", new LevelStats("round_follow_the_line", null, "Puzzle Path", LevelType.Race, BestRecordType.Fastest, false, false, 9, 150 ,150, 300, Properties.Resources.round_puzzle_path_icon, Properties.Resources.round_puzzle_path_big_icon) }, - { "round_tunnel_race", new LevelStats("round_tunnel_race", null, "Roll On", LevelType.Race, BestRecordType.Fastest, false, false, 4, 120 ,120, 300, Properties.Resources.round_roll_on_icon, Properties.Resources.round_roll_on_big_icon) }, - { "round_see_saw", new LevelStats("round_see_saw", null, "See Saw", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 300, Properties.Resources.round_see_saw_icon, Properties.Resources.round_see_saw_big_icon) }, - { "round_shortcircuit", new LevelStats("round_shortcircuit", null, "Short Circuit", LevelType.Race, BestRecordType.Fastest, false, false, 4, 300 ,300, 300, Properties.Resources.round_short_circuit_icon, Properties.Resources.round_short_circuit_big_icon) }, - { "round_skeefall", new LevelStats("round_skeefall", null, "Ski Fall", LevelType.Race, BestRecordType.Fastest, false, false, 3, 300 ,300, 300, Properties.Resources.round_ski_fall_icon, Properties.Resources.round_ski_fall_big_icon) }, - { "round_gauntlet_06", new LevelStats("round_gauntlet_06", null, "Skyline Stumble", LevelType.Race, BestRecordType.Fastest, false, false, 4, 180 ,120, 300, Properties.Resources.round_skyline_stumble_icon, Properties.Resources.round_skyline_stumble_big_icon) }, - { "round_lava", new LevelStats("round_lava", null, "Slime Climb", LevelType.Race, BestRecordType.Fastest, false, false, 1, 140 ,140, 300, Properties.Resources.round_slime_climb_icon, Properties.Resources.round_slime_climb_big_icon) }, - { "round_gauntlet_10_almond", new LevelStats("round_gauntlet_10_almond", null, "Space Race", LevelType.Race, BestRecordType.Fastest, false, false, 8, 150 ,150, 300, Properties.Resources.round_space_race_icon, Properties.Resources.round_space_race_big_icon) }, - { "round_short_circuit_2_symphony_launch_show", new LevelStats("round_short_circuit_2_symphony_launch_show", null, "Speed Circuit", LevelType.Race, BestRecordType.Fastest, false, false, 7, 180 ,180, 300, Properties.Resources.round_speed_circuit_icon, Properties.Resources.round_speed_circuit_big_icon) }, - { "round_slide_chute", new LevelStats("round_slide_chute", null, "Speed Slider", LevelType.Race, BestRecordType.Fastest, false, false, 9, 165 ,120, 300, Properties.Resources.round_speed_slider_icon, Properties.Resources.round_speed_slider_big_icon) }, - { "round_starlink_almond", new LevelStats("round_starlink_almond", null, "Starchart", LevelType.Race, BestRecordType.Fastest, false, false, 8, 150 ,150, 300, Properties.Resources.round_starchart_icon, Properties.Resources.round_starchart_big_icon) }, - { "round_slimeclimb_2", new LevelStats("round_slimeclimb_2", null, "The Slimescraper", LevelType.Race, BestRecordType.Fastest, false, false, 4, 190 ,190, 300, Properties.Resources.round_the_slimescraper_icon, Properties.Resources.round_the_slimescraper_big_icon) }, - { "round_gauntlet_03", new LevelStats("round_gauntlet_03", null, "The Whirlygig", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 300, Properties.Resources.round_the_whirlygig_icon, Properties.Resources.round_the_whirlygig_big_icon) }, - { "round_tip_toe", new LevelStats("round_tip_toe", null, "Tip Toe", LevelType.Race, BestRecordType.Fastest, false, false, 1, 300 ,120, 300, Properties.Resources.round_tip_toe_icon, Properties.Resources.round_tip_toe_big_icon) }, - { "round_gauntlet_09_symphony_launch_show", new LevelStats("round_gauntlet_09_symphony_launch_show", null, "Track Attack", LevelType.Race, BestRecordType.Fastest, false, false, 7, 90 ,90, 300, Properties.Resources.round_track_attack_icon, Properties.Resources.round_track_attack_big_icon) }, - { "round_gauntlet_07", new LevelStats("round_gauntlet_07", null, "Treetop Tumble", LevelType.Race, BestRecordType.Fastest, false, false, 5, 180 ,120, 300, Properties.Resources.round_treetop_tumble_icon, Properties.Resources.round_treetop_tumble_big_icon) }, - { "round_gauntlet_05", new LevelStats("round_gauntlet_05", null, "Tundra Run", LevelType.Race, BestRecordType.Fastest, false, false, 3, 180 ,120, 300, Properties.Resources.round_tundra_run_icon, Properties.Resources.round_tundra_run_big_icon) }, - { "round_wall_guys", new LevelStats("round_wall_guys", null, "Wall Guys", LevelType.Race, BestRecordType.Fastest, false, false, 2, 300 ,120, 300, Properties.Resources.round_wall_guys_icon, Properties.Resources.round_wall_guys_big_icon) }, + { "round_biggestfan", new LevelStats("round_biggestfan", null, "Big Fans", LevelType.Race, BestRecordType.Fastest, false, false, 2, 210, 120, 100, Properties.Resources.round_big_fans_icon, Properties.Resources.round_big_fans_big_icon) }, + { "round_satellitehoppers_almond", new LevelStats("round_satellitehoppers_almond", null, "Cosmic Highway", LevelType.Race, BestRecordType.Fastest, false, false, 8, 180, 180, 100, Properties.Resources.round_cosmic_highway_icon, Properties.Resources.round_cosmic_highway_big_icon) }, + { "round_gauntlet_02", new LevelStats("round_gauntlet_02", null, "Dizzy Heights", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180, 120, 100, Properties.Resources.round_dizzy_heights_icon, Properties.Resources.round_dizzy_heights_big_icon) }, + { "round_door_dash", new LevelStats("round_door_dash", null, "Door Dash", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 100, Properties.Resources.round_door_dash_icon, Properties.Resources.round_door_dash_big_icon) }, + { "round_iceclimb", new LevelStats("round_iceclimb", null, "Freezy Peak", LevelType.Race, BestRecordType.Fastest, false, false, 3, 180 ,120, 100, Properties.Resources.round_freezy_peak_icon, Properties.Resources.round_freezy_peak_big_icon) }, + { "round_dodge_fall", new LevelStats("round_dodge_fall", null, "Fruit Chute", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 100, Properties.Resources.round_fruit_chute_icon, Properties.Resources.round_fruit_chute_big_icon) }, + { "round_see_saw_360", new LevelStats("round_see_saw_360", null, "Full Tilt", LevelType.Race, BestRecordType.Fastest, false, false, 6, 180 ,180, 100, Properties.Resources.round_full_tilt_icon, Properties.Resources.round_full_tilt_big_icon) }, + { "round_chompchomp", new LevelStats("round_chompchomp", null, "Gate Crash", LevelType.Race, BestRecordType.Fastest, false, false, 1, 300 ,120, 100, Properties.Resources.round_gate_crash_icon, Properties.Resources.round_gate_crash_big_icon) }, + { "round_gauntlet_01", new LevelStats("round_gauntlet_01", null, "Hit Parade", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 100, Properties.Resources.round_hit_parade_icon, Properties.Resources.round_hit_parade_big_icon) }, + { "round_gauntlet_04", new LevelStats("round_gauntlet_04", null, "Knight Fever", LevelType.Race, BestRecordType.Fastest, false, false, 2, 180 ,120, 100, Properties.Resources.round_knight_fever_icon, Properties.Resources.round_knight_fever_big_icon) }, + { "round_drumtop", new LevelStats("round_drumtop", null, "Lily Leapers", LevelType.Race, BestRecordType.Fastest, false, false, 5, 300 ,140, 100, Properties.Resources.round_lily_leapers_icon, Properties.Resources.round_lily_leapers_big_icon) }, + { "round_gauntlet_08", new LevelStats("round_gauntlet_08", null, "Party Promenade", LevelType.Race, BestRecordType.Fastest, false, false, 6, 300 ,120, 100, Properties.Resources.round_party_promenade_icon, Properties.Resources.round_party_promenade_big_icon) }, + { "round_pipedup_s6_launch", new LevelStats("round_pipedup_s6_launch", null, "Pipe Dream", LevelType.Race, BestRecordType.Fastest, false, false, 6, 300 ,150, 100, Properties.Resources.round_pipe_dream_icon, Properties.Resources.round_pipe_dream_big_icon) }, + { "round_follow_the_line", new LevelStats("round_follow_the_line", null, "Puzzle Path", LevelType.Race, BestRecordType.Fastest, false, false, 9, 150 ,150, 100, Properties.Resources.round_puzzle_path_icon, Properties.Resources.round_puzzle_path_big_icon) }, + { "round_tunnel_race", new LevelStats("round_tunnel_race", null, "Roll On", LevelType.Race, BestRecordType.Fastest, false, false, 4, 120 ,120, 100, Properties.Resources.round_roll_on_icon, Properties.Resources.round_roll_on_big_icon) }, + { "round_see_saw", new LevelStats("round_see_saw", null, "See Saw", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 100, Properties.Resources.round_see_saw_icon, Properties.Resources.round_see_saw_big_icon) }, + { "round_shortcircuit", new LevelStats("round_shortcircuit", null, "Short Circuit", LevelType.Race, BestRecordType.Fastest, false, false, 4, 300 ,300, 100, Properties.Resources.round_short_circuit_icon, Properties.Resources.round_short_circuit_big_icon) }, + { "round_skeefall", new LevelStats("round_skeefall", null, "Ski Fall", LevelType.Race, BestRecordType.Fastest, false, false, 3, 300 ,300, 100, Properties.Resources.round_ski_fall_icon, Properties.Resources.round_ski_fall_big_icon) }, + { "round_gauntlet_06", new LevelStats("round_gauntlet_06", null, "Skyline Stumble", LevelType.Race, BestRecordType.Fastest, false, false, 4, 180 ,120, 100, Properties.Resources.round_skyline_stumble_icon, Properties.Resources.round_skyline_stumble_big_icon) }, + { "round_lava", new LevelStats("round_lava", null, "Slime Climb", LevelType.Race, BestRecordType.Fastest, false, false, 1, 140 ,140, 140, Properties.Resources.round_slime_climb_icon, Properties.Resources.round_slime_climb_big_icon) }, + { "round_gauntlet_10_almond", new LevelStats("round_gauntlet_10_almond", null, "Space Race", LevelType.Race, BestRecordType.Fastest, false, false, 8, 150 ,150, 100, Properties.Resources.round_space_race_icon, Properties.Resources.round_space_race_big_icon) }, + { "round_short_circuit_2_symphony_launch_show", new LevelStats("round_short_circuit_2_symphony_launch_show", null, "Speed Circuit", LevelType.Race, BestRecordType.Fastest, false, false, 7, 180 ,180, 100, Properties.Resources.round_speed_circuit_icon, Properties.Resources.round_speed_circuit_big_icon) }, + { "round_slide_chute", new LevelStats("round_slide_chute", null, "Speed Slider", LevelType.Race, BestRecordType.Fastest, false, false, 9, 165 ,120, 165, Properties.Resources.round_speed_slider_icon, Properties.Resources.round_speed_slider_big_icon) }, + { "round_starlink_almond", new LevelStats("round_starlink_almond", null, "Starchart", LevelType.Race, BestRecordType.Fastest, false, false, 8, 150 ,150, 100, Properties.Resources.round_starchart_icon, Properties.Resources.round_starchart_big_icon) }, + { "round_slimeclimb_2", new LevelStats("round_slimeclimb_2", null, "The Slimescraper", LevelType.Race, BestRecordType.Fastest, false, false, 4, 190 ,190, 190, Properties.Resources.round_the_slimescraper_icon, Properties.Resources.round_the_slimescraper_big_icon) }, + { "round_gauntlet_03", new LevelStats("round_gauntlet_03", null, "The Whirlygig", LevelType.Race, BestRecordType.Fastest, false, false, 1, 180 ,120, 100, Properties.Resources.round_the_whirlygig_icon, Properties.Resources.round_the_whirlygig_big_icon) }, + { "round_tip_toe", new LevelStats("round_tip_toe", null, "Tip Toe", LevelType.Race, BestRecordType.Fastest, false, false, 1, 300 ,120, 100, Properties.Resources.round_tip_toe_icon, Properties.Resources.round_tip_toe_big_icon) }, + { "round_gauntlet_09_symphony_launch_show", new LevelStats("round_gauntlet_09_symphony_launch_show", null, "Track Attack", LevelType.Race, BestRecordType.Fastest, false, false, 7, 90 ,90, 100, Properties.Resources.round_track_attack_icon, Properties.Resources.round_track_attack_big_icon) }, + { "round_gauntlet_07", new LevelStats("round_gauntlet_07", null, "Treetop Tumble", LevelType.Race, BestRecordType.Fastest, false, false, 5, 180 ,120, 100, Properties.Resources.round_treetop_tumble_icon, Properties.Resources.round_treetop_tumble_big_icon) }, + { "round_gauntlet_05", new LevelStats("round_gauntlet_05", null, "Tundra Run", LevelType.Race, BestRecordType.Fastest, false, false, 3, 180 ,120, 100, Properties.Resources.round_tundra_run_icon, Properties.Resources.round_tundra_run_big_icon) }, + { "round_wall_guys", new LevelStats("round_wall_guys", null, "Wall Guys", LevelType.Race, BestRecordType.Fastest, false, false, 2, 300 ,120, 100, Properties.Resources.round_wall_guys_icon, Properties.Resources.round_wall_guys_big_icon) }, { "round_airtime", new LevelStats("round_airtime", null, "Airtime", LevelType.Hunt, BestRecordType.Fastest, false, false, 6, 300, 300, 300, Properties.Resources.round_airtime_icon, Properties.Resources.round_airtime_big_icon) }, { "round_bluejay", new LevelStats("round_bluejay", null, "Bean Hill Zone", LevelType.Hunt, BestRecordType.Fastest, false, false, 7, 300, 300, 300, Properties.Resources.round_bean_hill_zone_icon, Properties.Resources.round_bean_hill_zone_big_icon) }, { "round_hoops_revenge_symphony_launch_show", new LevelStats("round_hoops_revenge_symphony_launch_show", null, "Bounce Party", LevelType.Hunt, BestRecordType.Fastest, false, false, 7, 300, 300, 300, Properties.Resources.round_bounce_party_icon, Properties.Resources.round_bounce_party_big_icon) }, @@ -2359,8 +2358,8 @@ public class LevelStats { { "round_fruitpunch_s4_show", new LevelStats("round_fruitpunch_s4_show", null, "Big Shots", LevelType.Survival, BestRecordType.Longest, false, false, 4, 90, 90, 60, Properties.Resources.round_big_shots_icon, Properties.Resources.round_big_shots_big_icon) }, { "round_blastballruins", new LevelStats("round_blastballruins", null, "Blastlantis", LevelType.Survival, BestRecordType.Longest, false, false, 9, 270, 150, 60, Properties.Resources.round_blastlantis_icon, Properties.Resources.round_blastlantis_big_icon) }, { "round_block_party", new LevelStats("round_block_party", null, "Block Party", LevelType.Survival, BestRecordType.Longest, false, false, 1, 105, 105, 60, Properties.Resources.round_block_party_icon, Properties.Resources.round_block_party_big_icon) }, - { "round_hoverboardsurvival_s4_show", new LevelStats("round_hoverboardsurvival_s4_show", null, "Hoverboard Heroes", LevelType.Survival, BestRecordType.Fastest, false, false, 4, 140, 140, 150, Properties.Resources.round_hoverboard_heroes_icon, Properties.Resources.round_hoverboard_heroes_big_icon) }, - { "round_hoverboardsurvival2_almond", new LevelStats("round_hoverboardsurvival2_almond", null, "Hyperdrive Heroes", LevelType.Survival, BestRecordType.Fastest, false, false, 8, 170, 170, 180, Properties.Resources.round_hyperdrive_heroes_icon, Properties.Resources.round_hyperdrive_heroes_big_icon) }, + { "round_hoverboardsurvival_s4_show", new LevelStats("round_hoverboardsurvival_s4_show", null, "Hoverboard Heroes", LevelType.Survival, BestRecordType.Fastest, false, false, 4, 140, 140, 140, Properties.Resources.round_hoverboard_heroes_icon, Properties.Resources.round_hoverboard_heroes_big_icon) }, + { "round_hoverboardsurvival2_almond", new LevelStats("round_hoverboardsurvival2_almond", null, "Hyperdrive Heroes", LevelType.Survival, BestRecordType.Fastest, false, false, 8, 170, 170, 170, Properties.Resources.round_hyperdrive_heroes_icon, Properties.Resources.round_hyperdrive_heroes_big_icon) }, { "round_jump_club", new LevelStats("round_jump_club", null, "Jump Club", LevelType.Survival, BestRecordType.Longest, false, false, 1, 90, 90, 60, Properties.Resources.round_jump_club_icon, Properties.Resources.round_jump_club_big_icon) }, { "round_tunnel", new LevelStats("round_tunnel", null, "Roll Out", LevelType.Survival, BestRecordType.Longest, false, false, 1, 150, 90, 60, Properties.Resources.round_roll_out_icon, Properties.Resources.round_roll_out_big_icon) }, { "round_snowballsurvival", new LevelStats("round_snowballsurvival", null, "Snowball Survival", LevelType.Survival, BestRecordType.Longest, false, false, 3, 60, 60, 60, Properties.Resources.round_snowball_survival_icon, Properties.Resources.round_snowball_survival_big_icon) }, @@ -2386,17 +2385,17 @@ public class LevelStats { { "round_invisibeans", new LevelStats("round_invisibeans", null, "Sweet Thieves", LevelType.Invisibeans, BestRecordType.Fastest, false, false, 6, 180, 180, 180, Properties.Resources.round_sweet_thieves_icon, Properties.Resources.round_sweet_thieves_big_icon) }, { "round_pumpkin_pie", new LevelStats("round_pumpkin_pie", null, "Treat Thieves", LevelType.Invisibeans, BestRecordType.Fastest, false, false, 8, 180, 180, 180, Properties.Resources.round_treat_thieves_icon, Properties.Resources.round_treat_thieves_big_icon) }, - { "round_blastball_arenasurvival_symphony_launch_show", new LevelStats("round_blastball_arenasurvival_symphony_launch_show", null, "Blast Ball", LevelType.Survival, BestRecordType.Longest, false, true, 7, 270, 270, 60, Properties.Resources.round_blast_ball_icon, Properties.Resources.round_blast_ball_big_icon) }, + { "round_blastball_arenasurvival_symphony_launch_show", new LevelStats("round_blastball_arenasurvival_symphony_launch_show", null, "Blast Ball", LevelType.Survival, BestRecordType.Longest, false, true, 7, 270, 270, 270, Properties.Resources.round_blast_ball_icon, Properties.Resources.round_blast_ball_big_icon) }, { "round_fall_mountain_hub_complete", new LevelStats("round_fall_mountain_hub_complete", null, "Fall Mountain", LevelType.Race, BestRecordType.Fastest, false, true, 1, 300, 300, 300, Properties.Resources.round_fall_mountain_icon, Properties.Resources.round_fall_mountain_big_icon) }, - { "round_floor_fall", new LevelStats("round_floor_fall", null, "Hex-A-Gone", LevelType.Survival, BestRecordType.Longest, false, true, 1, 300, 300, 60, Properties.Resources.round_hex_a_gone_icon, Properties.Resources.round_hex_a_gone_big_icon) }, - { "round_hexaring_symphony_launch_show", new LevelStats("round_hexaring_symphony_launch_show", null, "Hex-A-Ring", LevelType.Survival, BestRecordType.Longest, false, true, 7, 300, 300, 60, Properties.Resources.round_hex_a_ring_icon, Properties.Resources.round_hex_a_ring_big_icon) }, - { "round_hexsnake_almond", new LevelStats("round_hexsnake_almond", null, "Hex-A-Terrestrial", LevelType.Survival, BestRecordType.Longest, false, true, 8, 300, 300, 60, Properties.Resources.round_hex_a_terrestrial_icon, Properties.Resources.round_hex_a_terrestrial_big_icon) }, - { "round_jump_showdown", new LevelStats("round_jump_showdown", null, "Jump Showdown", LevelType.Survival, BestRecordType.Longest, false, true, 1, 300, 300, 60, Properties.Resources.round_jump_showdown_icon, Properties.Resources.round_jump_showdown_big_icon) }, - { "round_kraken_attack", new LevelStats("round_kraken_attack", null, "Kraken Slam", LevelType.Survival, BestRecordType.Longest, false, true, 9, 300, 300, 60, Properties.Resources.round_kraken_slam_icon, Properties.Resources.round_kraken_slam_big_icon) }, + { "round_floor_fall", new LevelStats("round_floor_fall", null, "Hex-A-Gone", LevelType.Survival, BestRecordType.Longest, false, true, 1, 300, 300, 300, Properties.Resources.round_hex_a_gone_icon, Properties.Resources.round_hex_a_gone_big_icon) }, + { "round_hexaring_symphony_launch_show", new LevelStats("round_hexaring_symphony_launch_show", null, "Hex-A-Ring", LevelType.Survival, BestRecordType.Longest, false, true, 7, 300, 300, 300, Properties.Resources.round_hex_a_ring_icon, Properties.Resources.round_hex_a_ring_big_icon) }, + { "round_hexsnake_almond", new LevelStats("round_hexsnake_almond", null, "Hex-A-Terrestrial", LevelType.Survival, BestRecordType.Longest, false, true, 8, 300, 300, 300, Properties.Resources.round_hex_a_terrestrial_icon, Properties.Resources.round_hex_a_terrestrial_big_icon) }, + { "round_jump_showdown", new LevelStats("round_jump_showdown", null, "Jump Showdown", LevelType.Survival, BestRecordType.Longest, false, true, 1, 300, 300, 300, Properties.Resources.round_jump_showdown_icon, Properties.Resources.round_jump_showdown_big_icon) }, + { "round_kraken_attack", new LevelStats("round_kraken_attack", null, "Kraken Slam", LevelType.Survival, BestRecordType.Longest, false, true, 9, 300, 300, 300, Properties.Resources.round_kraken_slam_icon, Properties.Resources.round_kraken_slam_big_icon) }, { "round_crown_maze", new LevelStats("round_crown_maze", null, "Lost Temple", LevelType.Race, BestRecordType.Fastest, false, true, 5, 180, 180, 180, Properties.Resources.round_lost_temple_icon, Properties.Resources.round_lost_temple_big_icon) }, - { "round_tunnel_final", new LevelStats("round_tunnel_final", null, "Roll Off", LevelType.Survival, BestRecordType.Longest, false, true, 3, 300, 300, 60, Properties.Resources.round_roll_off_icon, Properties.Resources.round_roll_off_big_icon) }, + { "round_tunnel_final", new LevelStats("round_tunnel_final", null, "Roll Off", LevelType.Survival, BestRecordType.Longest, false, true, 3, 300, 300, 300, Properties.Resources.round_roll_off_icon, Properties.Resources.round_roll_off_big_icon) }, { "round_royal_rumble", new LevelStats("round_royal_rumble", null, "Royal Fumble", LevelType.Hunt, BestRecordType.Fastest, false, true, 1, 90, 90, 90, Properties.Resources.round_royal_fumble_icon, Properties.Resources.round_royal_fumble_big_icon) }, - { "round_thin_ice", new LevelStats("round_thin_ice", null, "Thin Ice", LevelType.Survival, BestRecordType.Longest, false, true, 3, 300, 300, 60, Properties.Resources.round_thin_ice_icon, Properties.Resources.round_thin_ice_big_icon) }, + { "round_thin_ice", new LevelStats("round_thin_ice", null, "Thin Ice", LevelType.Survival, BestRecordType.Longest, false, true, 3, 300, 300, 300, Properties.Resources.round_thin_ice_icon, Properties.Resources.round_thin_ice_big_icon) }, { "round_tiptoefinale_almond", new LevelStats("round_tiptoefinale_almond", null, "Tip Toe Finale", LevelType.Race, BestRecordType.Fastest, false, true, 8, 300, 300, 300, Properties.Resources.round_tip_toe_finale_icon, Properties.Resources.round_tip_toe_finale_big_icon) }, }; @@ -2514,7 +2513,7 @@ public class LevelStats { public bool IsFinal; public int TimeLimitSeconds; public int TimeLimitSecondsForSquad; - public int TimeLimitSecondsForExploreClassic; + public int TimeLimitSecondsForLTM; public TimeSpan Duration; public TimeSpan FinishTime; @@ -2522,7 +2521,7 @@ public class LevelStats { public int Season; public int FinishedCount; - public LevelStats(string levelId, string shareCode, string levelName, LevelType type, BestRecordType recordType, bool isCreative, bool isFinal, int season, int timeLimitSeconds, int timeLimitSecondsForSquad, int timeLimitSecondsForExploreClassic, Image roundIcon, Image roundBigIcon) { + public LevelStats(string levelId, string shareCode, string levelName, LevelType type, BestRecordType recordType, bool isCreative, bool isFinal, int season, int timeLimitSeconds, int timeLimitSecondsForSquad, int timeLimitSecondsForLTM, Image roundIcon, Image roundBigIcon) { this.Id = levelId; this.ShareCode = shareCode; this.Name = levelName; @@ -2533,7 +2532,7 @@ public LevelStats(string levelId, string shareCode, string levelName, LevelType this.IsFinal = isFinal; this.TimeLimitSeconds = timeLimitSeconds; this.TimeLimitSecondsForSquad = timeLimitSecondsForSquad; - this.TimeLimitSecondsForExploreClassic = timeLimitSecondsForExploreClassic; + this.TimeLimitSecondsForLTM = timeLimitSecondsForLTM; this.RoundIcon = roundIcon; this.RoundBigIcon = roundBigIcon; this.Stats = new List(); diff --git a/Entities/LogFileWatcher.cs b/Entities/LogFileWatcher.cs index 13424993..629000f2 100644 --- a/Entities/LogFileWatcher.cs +++ b/Entities/LogFileWatcher.cs @@ -34,13 +34,12 @@ public override string ToString() { public class LogRound { public bool CurrentlyInParty; public bool PrivateLobby; + public bool InLoadingGameScreen; + public bool IsRoundPreloaded; public bool CountingPlayers; public bool GetCurrentPlayerID; public bool FindingPosition; - public bool IsFinal; - public bool HasIsFinal; public string CurrentPlayerID; - public int Duration; public RoundInfo Info; } @@ -49,6 +48,7 @@ public class ThreadLocalData { public string selectedShowId; public bool useShareCode; public string currentSessionId; + public string sceneName; public bool toggleCountryInfoApi; public bool toggleFgdbCreativeApi; @@ -85,7 +85,7 @@ public class LogFileWatcher { public Stats StatsForm { get; set; } - private ThreadLocal threadLocalVariable = new ThreadLocal(() => new ThreadLocalData()); + private readonly ThreadLocal threadLocalVariable = new ThreadLocal(() => new ThreadLocalData()); public event Action> OnParsedLogLines; public event Action> OnParsedLogLinesCurrent; public event Action OnNewLogFileDate; @@ -716,6 +716,7 @@ private bool ParseLine(LogLine line, List round, LogRound logRound) { logRound.PrivateLobby = line.Line.IndexOf("StatePrivateLobby", StringComparison.OrdinalIgnoreCase) != -1; logRound.CurrentlyInParty = !logRound.PrivateLobby && (line.Line.IndexOf("solo", StringComparison.OrdinalIgnoreCase) == -1); + logRound.InLoadingGameScreen = false; logRound.CountingPlayers = false; logRound.GetCurrentPlayerID = false; logRound.FindingPosition = false; @@ -765,25 +766,52 @@ private bool ParseLine(LogLine line, List round, LogRound logRound) { } } - logRound.Info = new RoundInfo { - ShowNameId = this.threadLocalVariable.Value.selectedShowId, SessionId = this.threadLocalVariable.Value.currentSessionId, - UseShareCode = this.threadLocalVariable.Value.useShareCode, IsCasualShow = this.IsShowIsCasualShow(this.threadLocalVariable.Value.selectedShowId), - OnlineServiceType = (int)Stats.OnlineServiceType, OnlineServiceId = Stats.OnlineServiceId, OnlineServiceNickname = Stats.OnlineServiceNickname - }; + int index2 = line.Line.IndexOf(" on frame "); + this.threadLocalVariable.Value.sceneName = line.Line.Substring(index + 57, index2 - (index + 57)); - if (logRound.Info.UseShareCode) { - this.SetCreativeLevelVariable(logRound.Info.IsCasualShow ? this.threadLocalVariable.Value.creativeShareCode : logRound.Info.ShowNameId); - logRound.Info.SceneName = this.threadLocalVariable.Value.creativeGameModeId; - } else { - int index2 = line.Line.IndexOf(" on frame "); - logRound.Info.SceneName = line.Line.Substring(index + 57, index2 - (index + 57)); - if (this._sceneNameReplacer.TryGetValue(logRound.Info.SceneName, out string newName)) { - logRound.Info.SceneName = newName; + if (logRound.InLoadingGameScreen) { + logRound.Info = new RoundInfo { + ShowNameId = this.threadLocalVariable.Value.selectedShowId, SessionId = this.threadLocalVariable.Value.currentSessionId, + UseShareCode = this.threadLocalVariable.Value.useShareCode, IsCasualShow = this.IsShowIsCasualShow(this.threadLocalVariable.Value.selectedShowId), + OnlineServiceType = (int)Stats.OnlineServiceType, OnlineServiceId = Stats.OnlineServiceId, OnlineServiceNickname = Stats.OnlineServiceNickname + }; + + if (logRound.Info.UseShareCode) { + this.SetCreativeLevelVariable(logRound.Info.IsCasualShow ? this.threadLocalVariable.Value.creativeShareCode : logRound.Info.ShowNameId); + logRound.Info.SceneName = this.threadLocalVariable.Value.creativeGameModeId; + } else { + logRound.Info.SceneName = this._sceneNameReplacer.TryGetValue(this.threadLocalVariable.Value.sceneName, out string sceneName) + ? sceneName + : this.threadLocalVariable.Value.sceneName; } + logRound.FindingPosition = false; + + round.Add(logRound.Info); + } else { + logRound.IsRoundPreloaded = true; } - logRound.FindingPosition = false; + } else if (line.Line.IndexOf("[StateGameLoading] ShowLoadingGameScreenAndLoadLevel", StringComparison.OrdinalIgnoreCase) != -1) { + logRound.InLoadingGameScreen = true; + if (logRound.IsRoundPreloaded) { + logRound.IsRoundPreloaded = false; + logRound.Info = new RoundInfo { + ShowNameId = this.threadLocalVariable.Value.selectedShowId, SessionId = this.threadLocalVariable.Value.currentSessionId, + UseShareCode = this.threadLocalVariable.Value.useShareCode, IsCasualShow = this.IsShowIsCasualShow(this.threadLocalVariable.Value.selectedShowId), + OnlineServiceType = (int)Stats.OnlineServiceType, OnlineServiceId = Stats.OnlineServiceId, OnlineServiceNickname = Stats.OnlineServiceNickname + }; + + if (logRound.Info.UseShareCode) { + this.SetCreativeLevelVariable(logRound.Info.IsCasualShow ? this.threadLocalVariable.Value.creativeShareCode : logRound.Info.ShowNameId); + logRound.Info.SceneName = this.threadLocalVariable.Value.creativeGameModeId; + } else { + logRound.Info.SceneName = this._sceneNameReplacer.TryGetValue(this.threadLocalVariable.Value.sceneName, out string sceneName) + ? sceneName + : this.threadLocalVariable.Value.sceneName; + } + logRound.FindingPosition = false; - round.Add(logRound.Info); + round.Add(logRound.Info); + } } else if (logRound.Info != null && (index = line.Line.IndexOf("[StateGameLoading] Finished loading game level", StringComparison.OrdinalIgnoreCase)) != -1) { int index2 = line.Line.IndexOf(". ", index + 62); if (index2 < 0) { index2 = line.Line.Length; } @@ -803,9 +831,9 @@ private bool ParseLine(LogLine line, List round, LogRound logRound) { } else if (this.IsModeException(logRound.Info.Name, logRound.Info.ShowNameId)) { logRound.Info.IsFinal = this.IsModeFinalException(logRound.Info.Name); } else if (logRound.Info.Name.StartsWith("wle_s10_") || logRound.Info.Name.StartsWith("wle_mrs_")) { - logRound.Info.IsFinal = logRound.IsFinal || (!logRound.HasIsFinal && this.StatsForm.StatLookup.TryGetValue(logRound.Info.Name, out LevelStats levelStats) && levelStats.IsFinal); + logRound.Info.IsFinal = this.StatsForm.StatLookup.TryGetValue(logRound.Info.Name, out LevelStats levelStats) && levelStats.IsFinal; } else { - logRound.Info.IsFinal = logRound.IsFinal || (!logRound.HasIsFinal && LevelStats.SceneToRound.TryGetValue(logRound.Info.SceneName, out string levelId) && this.StatsForm.StatLookup.TryGetValue(levelId, out LevelStats levelStats) && levelStats.IsFinal); + logRound.Info.IsFinal = LevelStats.SceneToRound.TryGetValue(logRound.Info.SceneName, out string levelId) && this.StatsForm.StatLookup.TryGetValue(levelId, out LevelStats levelStats) && levelStats.IsFinal; } logRound.Info.IsTeam = this.IsTeamException(logRound.Info.Name); @@ -821,7 +849,6 @@ private bool ParseLine(LogLine line, List round, LogRound logRound) { logRound.Info.Start = line.Date; logRound.Info.InParty = logRound.CurrentlyInParty; logRound.Info.PrivateLobby = logRound.PrivateLobby; - logRound.Info.GameDuration = logRound.Duration; logRound.CountingPlayers = true; logRound.GetCurrentPlayerID = true; @@ -852,6 +879,7 @@ private bool ParseLine(LogLine line, List round, LogRound logRound) { } else if (logRound.Info != null && line.Line.IndexOf("[GameSession] Changing state from Countdown to Playing", StringComparison.OrdinalIgnoreCase) != -1) { logRound.Info.Start = line.Date; logRound.Info.Playing = true; + logRound.InLoadingGameScreen = false; logRound.CountingPlayers = false; logRound.GetCurrentPlayerID = false; } else if (logRound.Info != null && line.Line.IndexOf($"HandleServerPlayerProgress PlayerId={logRound.CurrentPlayerID} is succeeded=", StringComparison.OrdinalIgnoreCase) != -1) { @@ -912,6 +940,7 @@ private bool ParseLine(LogLine line, List round, LogRound logRound) { Stats.IsLastRoundRunning = false; Stats.IsLastPlayedRoundStillPlaying = false; + logRound.InLoadingGameScreen = false; logRound.CountingPlayers = false; logRound.GetCurrentPlayerID = false; logRound.FindingPosition = false; @@ -1111,6 +1140,7 @@ private bool ParseLine(LogLine line, List round, LogRound logRound) { if (logRound.Info.Qualified) { logRound.Info.Crown = true; + logRound.InLoadingGameScreen = false; logRound.CountingPlayers = false; logRound.GetCurrentPlayerID = false; logRound.FindingPosition = false; diff --git a/Views/LeaderboardDisplay.cs b/Views/LeaderboardDisplay.cs index ceef6831..e431d54a 100644 --- a/Views/LeaderboardDisplay.cs +++ b/Views/LeaderboardDisplay.cs @@ -158,25 +158,27 @@ private void LeaderboardDisplay_Load(object sender, EventArgs e) { .ThenByDescending(s => s.players) .ThenBy(s => s.country).ToList(); int weight = 0; - for (int i = 0; i < this.overallSummary.Count; i++) { - OverallSummary current = this.overallSummary[i]; - if (current.gold == 0 && current.silver == 0 &¤t.bronze == 0) { - break; - } - - if (i > 0) { - OverallSummary previous = this.overallSummary[i - 1]; - if (previous.gold == current.gold && previous.silver == current.silver && previous.bronze == current.bronze) { - current.rank = previous.rank; - weight++; + if (this.overallSummary.Any()) { + for (int i = 0; i < this.overallSummary.Count; i++) { + OverallSummary current = this.overallSummary[i]; + if (current.gold == 0 && current.silver == 0 && current.bronze == 0) { + break; + } + + if (i > 0) { + OverallSummary previous = this.overallSummary[i - 1]; + if (previous.gold == current.gold && previous.silver == current.silver && previous.bronze == current.bronze) { + current.rank = previous.rank; + weight++; + } else { + current.rank = previous.rank + 1 + weight; + weight = 0; + } } else { - current.rank = previous.rank + 1 + weight; - weight = 0; + current.rank = 1; } - } else { - current.rank = 1; + this.overallSummary[i] = current; } - this.overallSummary[i] = current; } this.gridOverallSummary.DataSource = prevTask.Result ? this.overallSummary : this.overallSummaryNodata; diff --git a/Views/LevelDetails.cs b/Views/LevelDetails.cs index 11950d25..9b649fea 100644 --- a/Views/LevelDetails.cs +++ b/Views/LevelDetails.cs @@ -25,11 +25,11 @@ public partial class LevelDetails : MetroFramework.Forms.MetroForm { readonly DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle(); readonly DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle(); - private Timer spinnerTransition = new Timer { Interval = 1 }; + private readonly Timer spinnerTransition = new Timer { Interval = 1 }; private bool isIncreasing; private bool preventPaging; - private Timer scrollTimer = new Timer { Interval = 100 }; + private readonly Timer scrollTimer = new Timer { Interval = 100 }; private bool isScrollingStopped = true; private bool isHeaderClicked; diff --git a/Views/Overlay.cs b/Views/Overlay.cs index 9d9397b7..e0a1ae58 100644 --- a/Views/Overlay.cs +++ b/Views/Overlay.cs @@ -581,7 +581,7 @@ private void UpdateTimer() { } private void SetRoundLabel(Image roundIcon, LevelType type, string roundName, int setting) { - if (Stats.IsQueued && (setting == 1 || setting == 5)) { + if (!Stats.InShow && Stats.IsQueued && (setting == 1 || setting == 5)) { this.lblRound.LevelColor = Color.Empty; this.lblRound.LevelTrueColor = Color.Empty; this.lblRound.RoundIcon = null; @@ -620,7 +620,7 @@ private void SetRoundLabel(Image roundIcon, LevelType type, string roundName, in } private void SetWinsLabel(StatSummary summary, int setting) { - if (Stats.IsQueued && setting == 3) { + if (!Stats.InShow && Stats.IsQueued && setting == 3) { this.lblWins.Text = $@"{Multilingual.GetWord("overlay_queued_players")} :"; this.lblWins.TextRight = $"{Stats.QueuedPlayers:N0}"; this.lblWins.ForeColor = this.ForeColor; @@ -714,7 +714,7 @@ private void SetFastestLabel(StatSummary summary, BestRecordType bestRecordType, this.lblFastest.Text = $@"{Multilingual.GetWord("overlay_current_time")} :"; this.lblFastest.TextRight = $"{DateTime.Now:HH\\:mm\\:ss}"; } else { - if (Stats.IsQueued && setting == 6) { + if (!Stats.InShow && Stats.IsQueued && setting == 6) { this.lblFastest.Text = $@"{Multilingual.GetWord("overlay_queued_players")} :"; this.lblFastest.TextRight = Stats.QueuedPlayers.ToString(); this.lblFastest.ForeColor = this.ForeColor; @@ -867,11 +867,15 @@ private void SetDurationLabel(LevelStats level, LevelType type, DateTime current this.lblDuration.TickProgress = 0; string showId = this.StatsForm.GetAlternateShowId(this.lastRound.ShowNameId); int showType = (level == null) ? 0 - : (string.Equals(this.lastRound.ShowNameId, "no_elimination_explore") && level.TimeLimitSecondsForExploreClassic > 0) ? 3 + // : (string.Equals(this.lastRound.ShowNameId, "no_elimination_explore") && level.TimeLimitSecondsForLTM > 0) ? 3 + : (showId.StartsWith("event_xtreme_fall_guys_") && level.TimeLimitSecondsForLTM > 0) ? 3 : ((string.Equals(showId, "squads_2player_template") || string.Equals(showId, "squads_4player")) && level.TimeLimitSecondsForSquad > 0) ? 2 : ((string.Equals(showId, "main_show") || string.Equals(showId, "invisibeans_mode") || level.IsCreative) && level.TimeLimitSeconds > 0) ? 1 : 0; - int timeLimit = this.lastRound.IsCasualShow ? ((showType == 3) ? level.TimeLimitSecondsForExploreClassic : (type == LevelType.CreativeSurvival ? 180 : 0)) + int timeLimit = // this.lastRound.IsCasualShow ? ((showType == 3) ? level.TimeLimitSecondsForLTM + // : ((type == LevelType.CreativeSurvival) ? this.lastRound.CreativeTimeLimitSeconds : 0)) + this.lastRound.IsCasualShow ? ((type == LevelType.CreativeSurvival) ? this.lastRound.CreativeTimeLimitSeconds : 0) : this.lastRound.UseShareCode ? this.lastRound.CreativeTimeLimitSeconds + : (showType == 3) ? level.TimeLimitSecondsForLTM : (showType == 2) ? level.TimeLimitSecondsForSquad : (showType == 1) ? level.TimeLimitSeconds : 0; @@ -912,7 +916,7 @@ private void SetFinishLabel(StatSummary summary, LevelType type, string roundId, this.lblFinish.TextRight = $@"{DateTime.Now.ToString(Multilingual.GetWord("level_date_format"), Utils.GetCultureInfo())}"; this.lblFinish.ForeColor = this.ForeColor; } else { - if (Stats.IsQueued && (setting == 0 || setting == 2 || setting == 4)) { + if (!Stats.InShow && Stats.IsQueued && (setting == 0 || setting == 2 || setting == 4)) { this.lblFinish.Text = $@"{Multilingual.GetWord("overlay_queued_players")} :"; this.lblFinish.TextRight = Stats.QueuedPlayers.ToString(); this.lblFinish.ForeColor = this.ForeColor; diff --git a/Views/Stats.cs b/Views/Stats.cs index 351500e9..15d4bc87 100644 --- a/Views/Stats.cs +++ b/Views/Stats.cs @@ -7244,16 +7244,18 @@ private void ChangeLaunchPlatformLogo(int launchPlatform) { this.trayLaunchFallGuys.Image = launchPlatform == 0 ? Properties.Resources.epic_main_icon : Properties.Resources.steam_main_icon; this.menuLaunchFallGuys.Image = launchPlatform == 0 ? Properties.Resources.epic_main_icon : Properties.Resources.steam_main_icon; } - + public void SetLeaderboardTitle() { - if (OnlineServiceType != OnlineServiceTypes.None && !string.IsNullOrEmpty(OnlineServiceId) && !string.IsNullOrEmpty(OnlineServiceNickname)) { - this.mlLeaderboard.Image = OnlineServiceType == OnlineServiceTypes.EpicGames ? Properties.Resources.epic_main_icon : Properties.Resources.steam_main_icon; - this.mlLeaderboard.Text = OnlineServiceNickname; - } else { - this.mlLeaderboard.Text = Multilingual.GetWord("leaderboard_menu_title"); - } - this.mlLeaderboard.Location = new Point(this.Width - this.mlLeaderboard.Width - 10, this.mlLeaderboard.Location.Y); - this.mlLeaderboard.Enabled = true; + this.BeginInvoke((MethodInvoker)delegate { + if (OnlineServiceType != OnlineServiceTypes.None && !string.IsNullOrEmpty(OnlineServiceId) && !string.IsNullOrEmpty(OnlineServiceNickname)) { + this.mlLeaderboard.Image = OnlineServiceType == OnlineServiceTypes.EpicGames ? Properties.Resources.epic_main_icon : Properties.Resources.steam_main_icon; + this.mlLeaderboard.Text = OnlineServiceNickname; + } else { + this.mlLeaderboard.Text = Multilingual.GetWord("leaderboard_menu_title"); + } + this.mlLeaderboard.Location = new Point(this.Width - this.mlLeaderboard.Width - 10, this.mlLeaderboard.Location.Y); + this.mlLeaderboard.Enabled = true; + }); } private void ChangeLanguage() {