Ejemplo n.º 1
0
        /// <summary>
        /// ���� �� ���� ���� ������ �߰� ������ "��ü" ���� ��ư Ŭ����
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void radiobt_all_Click(object sender, EventArgs e)
        {
            try
            {
                RadioButton rbt = (RadioButton)sender;
                ListBox addbox = null;
                int controls = rbt.Parent.Parent.Controls.Count;

                for (int i = 0; i < controls; i++)
                {
                    if ("combobox_team".Equals(rbt.Parent.Parent.Controls[i].Name))
                    {
                        ComboBox box = (ComboBox)rbt.Parent.Parent.Controls[i];
                        box.Visible = false;
                    }
                }
                for (int i = 0; i < controls; i++)
                {
                    if ("label_choice".Equals(rbt.Parent.Parent.Controls[i].Name))
                    {
                        Label box = (Label)rbt.Parent.Parent.Controls[i];
                        box.Visible = false;
                    }
                }

                for (int i = 0; i < controls; i++)
                {
                    if ("AddListBox".Equals(rbt.Parent.Parent.Controls[i].Name))
                    {
                        addbox = (ListBox)rbt.Parent.Parent.Controls[i];
                        break;
                    }
                }

                for (int i = 0; i < controls; i++)
                {
                    if ("CurrInListBox".Equals(rbt.Parent.Parent.Controls[i].Name))
                    {
                        ListBox box = (ListBox)rbt.Parent.Parent.Controls[i];
                        box.Items.Clear();
                        GetAllMemberDelegate getAll = new GetAllMemberDelegate(GetAllMember);
                        Hashtable all = (Hashtable)Invoke(getAll, null);
                        if (all != null)
                        {
                            if (all.Count != 0)
                            {
                                foreach (DictionaryEntry de in all)
                                {
                                    if (de.Value != null)
                                    {
                                        string item = (string)de.Value + "(" + (string)de.Key + ")";
                                        if (!addbox.Items.Contains(item))
                                        {
                                            box.Items.Add(item);
                                        }
                                    }
                                }
                                break;
                            }
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                logWrite(exception.ToString());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 쪽지 및 파일 전송 수신자 추가 폼에서 "전체" 라디오 버튼 클릭시
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void radiobt_all_Click(object sender, EventArgs e) {

            try {
                AddMemberForm addMemberForm = ChatUtils.GetParentAddMemberForm((RadioButton)sender);
                ListBox addbox = addMemberForm.AddListBox;

                addMemberForm.combobox_team.Visible = false;

                addMemberForm.label_choice.Visible = false;

                ListBox box = addMemberForm.CurrInListBox;
                box.Items.Clear();

                GetAllMemberDelegate getAll = new GetAllMemberDelegate(GetAllMember);
                Hashtable all = (Hashtable)Invoke(getAll, null);
            
                if (all != null && all.Count != 0) {
                    foreach (DictionaryEntry de in all) {
                    
                        if (de.Value != null) {
                            UserObject userObj = ChatUtils.FindUserObjectTagFromTreeNodes(memTree.Nodes, de.Key.ToString());
                            ListBoxItem item = new ListBoxItem(userObj);
                            if (ListBox.NoMatches == addbox.FindStringExact(item.Text)) {
                                box.Items.Add(item);
                            }
                        }
                    }
                }
            } catch (Exception exception) {
                logWrite(exception.ToString());
            }
        }
Ejemplo n.º 3
0
        private void AddFileReceiver(string formkey)
        {
            try
            {
                AddMemberForm addform = new AddMemberForm();
                addform.BtnConfirm.Click += new EventHandler(BtnConfirmForFile_Click);
                addform.BtnCancel.Click+=new EventHandler(BtnCancel_Click_forFile);
                addform.radiobt_g.Click += new EventHandler(radiobt_g_Click);
                addform.radiobt_con.Click += new EventHandler(radiobt_con_Click);
                addform.radiobt_all.Click += new EventHandler(radiobt_all_Click);
                addform.combobox_team.SelectedValueChanged += new EventHandler(combobox_team_SelectedValueChangedAll);
                addform.CurrInListBox.MouseDoubleClick += new MouseEventHandler(CurrInListBox_MouseDoubleClick);

                GetAllMemberDelegate getAll = new GetAllMemberDelegate(GetAllMember);
                Hashtable all = (Hashtable)Invoke(getAll, null);
                if (all != null)
                {
                    if (all.Count != 0)
                    {
                        foreach (DictionaryEntry de in all)
                        {
                            if (de.Value != null)
                            {
                                string item = (string)de.Value + "(" + (string)de.Key + ")";
                                addform.CurrInListBox.Items.Add(item);
                            }
                        }
                    }
                }

                SendFileForm form = (SendFileForm)FileSendFormList[formkey];
                string[] receiverArray = null;
                if (form.txtbox_FileReceiver.Text.Length != 0)
                {
                    receiverArray = form.txtbox_FileReceiver.Text.Split(';');
                }
                if (receiverArray != null)
                {
                    foreach (string receiver in receiverArray)
                    {
                        if (receiver.Length > 2)  //������ ���� ���ڿ� ����
                        {
                            addform.AddListBox.Items.Add(receiver);
                        }
                    }
                }
                addform.formkey.Text = formkey;
                addform.Show(form);

            }
            catch (Exception e)
            {
                logWrite(e.ToString());
            }
        }