public void OnGroupNew(object sender, EventArgs e) { GroupPropertiesForm f = new GroupPropertiesForm(); using (f) { if (f.ShowDialog(this) == DialogResult.Cancel) return; } Group g = new Group(); g.GroupName = f.GroupName; KeyPassMgr.AddGroup(g); ContextMgr.FireGroupAdded(); }
public void OnGroupEditClick(object sender, EventArgs e) { GroupPropertiesForm f = new GroupPropertiesForm(); using (f) { f.isEditMode = true; if (f.ShowDialog(this) == DialogResult.Cancel) return; } Group g = ContextMgr.CurrentGroup; g.GroupName = f.GroupName; _tvwGroups.SelectedNode.Text = f.GroupName; KeyPassMgr.ModifyGroup(g); }