예제 #1
0
        // Rename a group
        private void renameGroupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Group       group  = (Group)contactsTreeView.SelectedNode;
            RenameGroup dialog = new RenameGroup(group.Name);
            String      newGroup;

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                newGroup = dialog.newNameTextBox.Text;
                foreach (TreeNode node in group.Nodes)
                {
                    Contact c = (Contact)node;
                    model.sendRosterSet(c.JabberID, c.Name, newGroup);
                }
            }
            group.Remove();
        }
예제 #2
0
		// Rename a group
		private void renameGroupToolStripMenuItem_Click(object sender, EventArgs e) {
			Group group = (Group)contactsTreeView.SelectedNode;				
			RenameGroup dialog = new RenameGroup(group.Name);
			String newGroup;
			if(dialog.ShowDialog() == DialogResult.OK) {
				newGroup = dialog.newNameTextBox.Text;
				foreach(TreeNode node in group.Nodes) {
					Contact c = (Contact)node;
					model.sendRosterSet(c.JabberID, c.Name, newGroup);
				}
			}
			group.Remove();
		}