public void Setup() { action = new BattleAction("attack"); participant = new ActionParticipant("name"); participant.AddAction(action); var participants = new[] { participant }; partyViewModel = new PartyViewModel(participants); editPartyMemberActionCommand = new EditPartyMemberActionCommand(partyViewModel); }
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(); }