Example #1
0
        // Add a new group (a group is added only to the GUI, if no contact is put in it the group will be lost)
        private void addGroupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddGroup dialog = new AddGroup();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                Group newGroup = new Group(dialog.nameTextBox.Text);
                newGroup.ContextMenuStrip = gropupContextMenuStrip;
                contactsTreeView.Nodes.Add(newGroup);
            }
        }
        // Add a new group (a group is added only to the GUI, if no contact is put in it the group will be lost)
        private void addGroupToolStripMenuItem_Click(object sender, EventArgs e) {
            AddGroup dialog = new AddGroup();
            if(dialog.ShowDialog() == DialogResult.OK) {                
				Group newGroup = new Group(dialog.nameTextBox.Text);
				newGroup.ContextMenuStrip = gropupContextMenuStrip;
				contactsTreeView.Nodes.Add(newGroup);
            }
        }