private void buttonEditGroup_Click(object sender, EventArgs e) { if (selectedGroup != null) { FormEditGroup form = new FormEditGroup(selectedGroup, this.formMain); form.ShowDialog(); if (form.DialogResult == DialogResult.OK) { createItem(); this.formMain.save(); } } }
private void buttonAddGroup_Click(object sender, EventArgs e) { Group group = new Group(); FormEditGroup form = new FormEditGroup(group, this.formMain); form.ShowDialog(); if (form.DialogResult == DialogResult.OK) { allGroups.Add(group); formMain.save(); createItem(); } }