public TreasureDefenseGameEditorControl(TreasureDefenseGameCommand command) { InitializeComponent(); this.existingCommand = command; this.viewModel = new TreasureDefenseGameEditorControlViewModel(command); }
public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements) { GameCommandBase newCommand = new TreasureDefenseGameCommand(name, triggers, requirements, this.MinimumParticipants, this.TimeLimit, this.ThiefPlayerPercentage, this.StartedCommand, this.UserJoinCommand, this.KnightUserCommand, this.ThiefUserCommand, this.KingUserCommand, this.KnightSelectedCommand, this.ThiefSelectedCommand, this.NotEnoughPlayersCommand); this.SaveGameCommand(newCommand, this.existingCommand); }
public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements) { GameCommandBase newCommand = new TreasureDefenseGameCommand(name, triggers, requirements, this.MinimumParticipants, this.TimeLimit, this.ThiefPlayerPercentage, this.StartedCommand, this.UserJoinCommand, this.KnightUserCommand, this.ThiefUserCommand, this.KingUserCommand, this.KnightSelectedCommand, this.ThiefSelectedCommand, this.NotEnoughPlayersCommand); if (this.existingCommand != null) { ChannelSession.Settings.GameCommands.Remove(this.existingCommand); newCommand.ID = this.existingCommand.ID; } ChannelSession.Settings.GameCommands.Add(newCommand); }
public TreasureDefenseGameEditorControlViewModel(TreasureDefenseGameCommand command) { this.existingCommand = command; this.MinimumParticipants = this.existingCommand.MinimumParticipants; this.TimeLimit = this.existingCommand.TimeLimit; this.ThiefPlayerPercentage = this.existingCommand.ThiefPlayerPercentage; this.StartedCommand = this.existingCommand.StartedCommand; this.UserJoinCommand = this.existingCommand.UserJoinCommand; this.NotEnoughPlayersCommand = this.existingCommand.NotEnoughPlayersCommand; this.KnightUserCommand = this.existingCommand.KnightUserCommand; this.ThiefUserCommand = this.existingCommand.ThiefUserCommand; this.KingUserCommand = this.existingCommand.KingUserCommand; this.KnightSelectedCommand = this.existingCommand.KnightSelectedCommand; this.ThiefSelectedCommand = this.existingCommand.ThiefSelectedCommand; }