private void Callbacks_EndRace(object sender, Communication.EventArguments.Callbacks.EndRaceEventArgs e) { RunCatchLog(() => { List <PodiumPluginUIEntry> entries = HostPlugin.PlayerAdapter.DeserializeList(Settings.MaxEntriesToShow, PlayerSortOrder.TimePlayed, false).ConvertAll(player => new PodiumPluginUIEntry(Math.Floor(player.TimePlayed.TotalHours).ToString("F0", CultureInfo.InvariantCulture) + "h", player.Nickname)); Context.RPCClient.Methods.SendDisplayManialinkPage(PodiumPluginUI.GetRecordListManiaLinkPage(entries, _linkPageID, Settings), 0, false); }, "Error in Callbacks_EndRace Method.", true); }
private void Callbacks_EndRace(object sender, Communication.EventArguments.Callbacks.EndRaceEventArgs e) { RunCatchLog(() => { List <PodiumPluginUIEntry> entries = HostPlugin.PositionAdapter.DeserializeListByMost(Settings.MaxEntriesToShow, 3).ConvertAll(position => new PodiumPluginUIEntry(position.Amount.ToString("F0", CultureInfo.InvariantCulture), position.Nickname)); Context.RPCClient.Methods.SendDisplayManialinkPage(PodiumPluginUI.GetRecordListManiaLinkPage(entries, _linkPageID, Settings), 0, false); }, "Error in Callbacks_EndRace Method.", true); }
private void Callbacks_EndRace(object sender, Communication.EventArguments.Callbacks.EndRaceEventArgs e) { PodiumStage = true; RunCatchLog(() => { UpdateTimer.Clear(); UpdateUI(this); }, "Error in Callbacks_EndRace Method.", true); }
private void Callbacks_EndRace(object sender, Communication.EventArguments.Callbacks.EndRaceEventArgs e) { foreach (Competition competition in RunningCompetitions.GetStartedCompetitions()) { competition.UpdateWithEndRaceResult(e.Rankings); } foreach (Competition competition in RunningCompetitions.GetFinishedCompetitions().ToList()) { SendFormattedMessageToLogins(competition.Competitors.ConvertAll(c => c.Login).ToArray(), "{[#ServerStyle]}>{[#MessageStyle]} Competition is over here are the rankings:\n{[Rankings]}", "Rankings", GetRankingText(competition)); RunningCompetitions.Remove(competition); } foreach (Competition competition in RunningCompetitions.GetStartedCompetitions()) { SendFormattedMessageToLogins(competition.Competitors.ConvertAll(c => c.Login).ToArray(), "{[#ServerStyle]}>{[#MessageStyle]} Competition's current ranking after {[DR]} of {[RL]} rounds:\n{[Rankings]}", "DR", competition.DrivenRounds.ToString(), "RL", competition.RoundLimit.ToString(), "Rankings", GetRankingText(competition)); } }
private void Callbacks_EndRace(object sender, Communication.EventArguments.Callbacks.EndRaceEventArgs e) { ThreadPool.QueueUserWorkItem(CheckForRestart); }