// EVENTS /// <summary> /// When the user clicks to add a new participant... /// Open the Add Participant window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddParticipant_Click(object sender, RoutedEventArgs e) { AddParticipantWindow addParticipant = new AddParticipantWindow(); addParticipant.ParticipantCreated += OnParticipantCreated; addParticipant.Show(); }
/// <summary> /// Add Participant to the Participants list in ParticipantManager /// </summary> /// <param name="source"></param> private void AddNewParticipantsToLists(AddParticipantWindow source) { foreach (Participant participant in source.NewParticipants) { participantManager.Participants.Add(participant); } }
/// <summary> /// Add possible attack to make into Triggers /// </summary> /// <param name="participant"></param> public void AddTriggeredBy(AddParticipantWindow participant) { foreach (Attack attack in participant.Attacks) { if (!cmbTriggeredBy.Items.Contains(attack)) { cmbTriggeredBy.Items.Add(attack); } } }