public void Setup()
        {
            participant = new ActionParticipant("name");
            var participants = new[] { participant };

            partyViewModel = new PartyViewModel(participants);
            addEnemyActionCommand = new AddEnemyActionCommand(partyViewModel);
        }
Пример #2
0
        public PartyViewModel(IEnumerable<ActionParticipant> participants)
        {
            allParticipants = new List<ActionParticipant>(participants);
            Party = new ObservableCollection<ActionParticipant>();
            Enemies = new ObservableCollection<ActionParticipant>();
            PartyMemberActions = new ObservableCollection<BattleAction>();
            EnemyActions = new ObservableCollection<BattleAction>();

            
            AddEnemyActionCommand = new AddEnemyActionCommand(this);
            EditEnemyActionCommand = new EditEnemyActionCommand(this);
            RemoveEnemyActionCommand = new RemoveEnemyActionCommand(this);
            EditEnemyCommand = new EditEnemyCommand(this);
            RemoveEnemyCommand = new RemoveEnemyCommand(this);
            EditPartyMemberCommand = new EditPartyMemberCommand(this);
            RemovePartyMemberCommand = new RemovePartyMemberCommand(this);
            AddPartyMemberActionCommand = new AddPartyMemberActionCommand(this);
            EditPartyMemberActionCommand = new EditPartyMemberActionCommand(this);
            RemovePartyMemberActionCommand = new RemovePartyMemberActionCommand(this);

            UpdateParties();
        }