public override async Task UpdateExistingCommand(CommandModelBase command) { await base.UpdateExistingCommand(command); TriviaGameCommandModel gCommand = (TriviaGameCommandModel)command; gCommand.TimeLimit = this.TimeLimit; gCommand.UseRandomOnlineQuestions = this.UseRandomOnlineQuestions; gCommand.WinAmount = this.WinAmount; gCommand.CustomQuestions = new List <TriviaGameQuestionModel>(this.CustomQuestions.Select(o => o.GetModel())); gCommand.StartedCommand = this.StartedCommand; gCommand.UserJoinCommand = this.UserJoinCommand; gCommand.CorrectAnswerCommand = this.CorrectAnswerCommand; gCommand.UserSuccessCommand = this.UserSuccessCommand; gCommand.UserFailureCommand = this.UserFailureCommand; }
public TriviaGameCommandEditorWindowViewModel(TriviaGameCommandModel command) : base(command) { this.WinAmount = command.WinAmount; this.TimeLimit = command.TimeLimit; this.UseRandomOnlineQuestions = command.UseRandomOnlineQuestions; this.StartedCommand = command.StartedCommand; this.UserJoinCommand = command.UserJoinCommand; this.CorrectAnswerCommand = command.CorrectAnswerCommand; this.UserSuccessCommand = command.UserSuccessCommand; this.UserFailureCommand = command.UserFailureCommand; this.CustomQuestions.AddRange(command.CustomQuestions.Select(q => new TriviaGameQuestionViewModel(q))); this.SetUICommands(); }