Пример #1
0
        private void FormMenu_AddGroupMember_Click(object sender, EventArgs e)
        {
            MenuItem    item       = (MenuItem)sender;
            ContextMenu parentMenu = (ContextMenu)item.Parent;
            int         indx       = Convert.ToInt32(parentMenu.Tag);
            Group       group      = ((Group)lstGroup.Items[indx]);
            string      groupID    = group.Id;

            formAddMember = new FormAddMember(group, friendList);
            formAddMember.Show();
            formAddMember.FormClosed += FormAddMember_FormClosed;
        }
Пример #2
0
        private void FormAddMember_FormClosed(object sender, FormClosedEventArgs e)
        {
            FormAddMember me = (FormAddMember)sender;

            if (me.Result)
            {
                foreach (string item in me.Sheet.CheckedItems)
                {
                    AddGroup(item, me.group.Id);
                }
                MessageBox.Show("Add Group Success");
            }
        }