private void ParticipantDetails_OnCLosingEvent(object sender, OnClosingEventArgs e) { ParticipantDetails temp = (ParticipantDetails)sender; temp.OnClosingEvent -= ParticipantDetails_OnCLosingEvent; Children.Remove(temp); RefreshParticipants(); }
private void BtnCreateNewParticipant_Click(object sender, EventArgs e) { var participant = new ParticipantDetails(); Children.Add(participant); participant.OnClosingEvent += ParticipantForm_OnClosingEvent; participant.Show(); }
private void BtnCreateNewParticipant_Click(object sender, EventArgs e) { ParticipantDetails details = new ParticipantDetails(); Children.Add(details); details.Show(); details.OnClosingEvent += ParticipantDetails_OnCLosingEvent; }
private void LstParticipants_DoubleClick(object sender, EventArgs e) { if (LstParticipants.SelectedItem != null) { var participant = new ParticipantDetails((Participant)LstParticipants.SelectedItem); Children.Add(participant); participant.Show(); } }
private void LstParticipants_DoubleClick(object sender, EventArgs e) { if (LstParticipants.SelectedItem != null) { ParticipantDetails details = new ParticipantDetails((Participant)LstParticipants.SelectedItem); details.Show(); Children.Add(details); details.OnClosingEvent += ParticipantDetails_OnCLosingEvent; } }