public string GenerateNewTournament([FromBody] NewTournament newT) { if (KickerToolManagement.IsKickertoolRunning()) { return("{\"kickertoolrunning\" : true }"); } //TODO also make sure that we have it is finished and saved var currentFinished = service.CurrentTournamentFinished(); if (!currentFinished) { KickerToolManagement.EnsureKickertoolRunning(); return("{ \"tournamentfinished\" : false \"}"); } var newTour = service.CreateNew(newT.Teams.Select(x => (x.Player1Name, x.Player2Name)).ToList(), newT.Groups, newT.Tables); service.SaveTournementAsCurrent(newTour); KickerToolManagement.EnsureKickertoolRunning(); return("{ \"ok\" : true}"); }
public void StartKickerTool() { KickerToolManagement.EnsureKickertoolRunning(); }