Exemplo n.º 1
0
        public TreasureDefenseGameEditorControl(TreasureDefenseGameCommand command)
        {
            InitializeComponent();

            this.existingCommand = command;
            this.viewModel       = new TreasureDefenseGameEditorControlViewModel(command);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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;
        }