public async Task <IActionResult> OnPostAsync(HintDto hint) { if (!ModelState.IsValid) { return(Page()); } var updateHint = await _hintRepository.GetAsync(x => x.Id == hint.Id); updateHint.Description = hint.Description; updateHint.Processed = true; await _hintRepository.UpdateAsync(updateHint); return(Redirect("~/")); }
public async Task <ActionResult> Index(HintDto hint) { string url = ""; if (hint.Picture != null) { url = await SavePictureAsync(hint.Picture); } _repository.SaveHint(new Hint { Header = hint.Header, Text = hint.Text, Longitude = hint.Longitude, Latitude = hint.Latitude, Url = url }); return(RedirectToAction("Stories", new { id = hint.Header.Replace(' ', '.') })); }
public void AddHintLetter(HintDto hint) { Characters[hint.Index] = hint.Letter; }
private async Task SendHint(HintDto hint, object sender) { ((HintTimer)sender).Stop(); await _lobbyHub.Clients.Group(Id).SendAsync("ReceiveHint", hint); }
public HintTimer(HintDto hint, double interval) : base(interval) { Hint = hint; }