private void addActive_Click(object sender, EventArgs e) { var active = new Active(); var dialog = new AddEditActive(active); dialog.Owner = this; dialog.Show(); dialog.FormClosed += delegate(object senderClosed, FormClosedEventArgs eClosed) { if (!dialog.IsSuccess) { return; } if (!actives.Contains(active)) { actives.Add(active); } SyncData(); }; }
public AddEditActive(Active active) { editableActive = active; InitializeComponent(); UpdateInputs(); }