private Task StartTimers() { _gameTimer = new Timer { Interval = LobbySettings.TimeLimit * 1000 }; _gameTimer.Elapsed += async(sender, e) => await GoToNextStep(); _gameTimer.Enabled = true; _hintTimers = HintsCreator.CreateHintTimersForSelection(Selection, LobbySettings.TimeLimit); _hintTimers.ForEach(timer => timer.Elapsed += async(sender, e) => await SendHint(timer.Hint, sender)); _hintTimers.ForEach(timer => timer.Enabled = true); return(Task.CompletedTask); }
private void setHints() { hintsCreator = new HintsCreator(); appNameTB.Enter += hintsCreator.OnTBHint_Enter; appNameTB.Leave += hintsCreator.OnTBHint_Leave; hintsCreator.OnTBHint_Leave(appNameTB, null); appSummaryTB.Enter += hintsCreator.OnTBHint_Enter; appSummaryTB.Leave += hintsCreator.OnTBHint_Leave; hintsCreator.OnTBHint_Leave(appSummaryTB, null); languageTB.Enter += hintsCreator.OnTBHint_Enter; languageTB.Leave += hintsCreator.OnTBHint_Leave; hintsCreator.OnTBHint_Leave(languageTB, null); appDescriptionRTB.Enter += hintsCreator.OnRTBHint_Enter; appDescriptionRTB.Leave += hintsCreator.OnRTBHint_Leave; hintsCreator.OnRTBHint_Leave(appDescriptionRTB, null); }