public void Play(out Team Winner) { Start?.Invoke(); Jingle?.Invoke("/Opening.mp3"); RequestIn("Готовы к следующему раунду?"); foreach (Round round in Rounds) { CurrentRound = round; RequestOut($"== {round.Name} =="); Jingle?.Invoke(round.Jingle); RefreshBoard?.Invoke(); int score = round.Play(out Winner); Winner.Score += score; SetScore(); RequestOut("-- Открываем табло --"); round.Reveal(); RequestIn("Готовы к следующему раунду?"); } CurrentRound = FinalRound; RequestOut($"== {FinalRound.Name} =="); Jingle?.Invoke(FinalRound.Jingle); ShowTitle(); FinalRound.Play(out Winner); Winner = Teams.OrderByDescending(team => team.Score) .Take(1) .Single(); Jingle?.Invoke("/Closing.mp3"); RequestIn("Нажмите для завершения игры"); ShowTitle(); TheEnd?.Invoke(); }
private void frmSchool_FormClosing(object sender, FormClosingEventArgs e) => TheEnd?.Invoke(sender, e);
private void frmZbiorczaAnalizaOcen_FormClosed(object sender, FormClosedEventArgs e) { SharedConfiguration.ConfigurationChanged -= ApplyNewConfig; TheEnd?.Invoke(sender, e); conn.Dispose(); }
private void frmObsada_FormClosing(object sender, FormClosingEventArgs e) { TheEnd?.Invoke(sender, e); AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig; }
private void frmKontrolaNieobecnosci_FormClosed(object sender, FormClosedEventArgs e) { AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig; TheEnd?.Invoke(sender, e); }
private void frmZbiorczaAnalizaOcen_FormClosed(object sender, FormClosedEventArgs e) { AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig; TheEnd?.Invoke(sender, e); }
private void frmZbiorczyWykazEgzaminPoprawkowy_FormClosed(object sender, FormClosedEventArgs e) { AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig; TheEnd?.Invoke(sender, e); }
private void frmZbiorczyWykazEgzaminPoprawkowy_FormClosed(object sender, FormClosedEventArgs e) { SharedConfiguration.ConfigurationChanged -= ApplyNewConfig; TheEnd?.Invoke(sender, e); conn.Dispose(); }