public IEnumerable <IResult> OpenNewMatch() { MatchManager.CreateNewMatch(); var next = ShowScreenResult.Of <NewMatchViewModel>(); yield return(next); }
public IEnumerable <IResult> OpenNewMatch() { MatchManager.CreateNewMatch(); this.NotifyOfPropertyChange(() => this.CanSaveMatch); this.NotifyOfPropertyChange(() => this.CanSaveMatchAs); this.NotifyOfPropertyChange(() => this.CanShowPlayer); this.NotifyOfPropertyChange(() => this.CanShowCompetition); Events.PublishOnUIThread(new HideMenuEvent()); var next = ShowScreenResult.Of <NewMatchViewModel>(); yield return(next); MatchManager.MatchSaveAs = false; }
public Task <MatchCreationResultDTO> Handle(Command request, CancellationToken cancellationToken) { var matchCreationResult = _matchManager.CreateNewMatch(request.Name, request.User); if (matchCreationResult.IsCreationSuccess == false) { return(Task.FromResult(new MatchCreationResultDTO { IsCreationSuccess = false, CreationFailReason = matchCreationResult.CreationFailReason, })); } var matchDTO = MatchDTO.CreateFromMatch(matchCreationResult.Match); return(Task.FromResult(new MatchCreationResultDTO { IsCreationSuccess = true, Match = matchDTO, })); }