Exemple #1
0
 private void BtnReceiver_Click(object sender, EventArgs e)
 {
     try
     {
         AddMemberForm addform = new AddMemberForm(connection, AddMemberMode.OnMemoReceived, formKey, receiverList, SetMemoReceivers);
         addform.ShowDialog(this);
     }
     catch (Exception ex)
     {
         Logger.error(ex.ToString());
     }
 }
Exemple #2
0
 private void BtnAddChatter_Click(object sender, EventArgs e)
 {
     try
     {
         Logger.info("상담원추가 폼 키값 생성 :" + this.formKey);
         //로그인사용자만 선택
         List <MemberObj> chatters = ChatUtils.GetLoggedInMemberFromNodeTag(ChattersTree.Nodes);
         AddMemberForm    addform  = new AddMemberForm(connection, AddMemberMode.OnChatformAdded, this.formKey, chatters, AddChatters);
         addform.ShowDialog(this);
     }
     catch (Exception exception)
     {
         Logger.error(exception.ToString());
     }
 }
Exemple #3
0
        private void BtnSend_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtbox_receiver.Text.Length != 0)
                {
                    string memoContent = textBox1.Text.Trim();
                    if (memoContent.Length != 0)
                    {
                        foreach (MemberObj userObj in receiverList)
                        {
                            MemoObj memoObj = new MemoObj(ConfigHelper.Id, userObj.Id, memoContent);

                            if (Members.ContainLoginUserNode(userObj.Id))
                            {
                                connection.SendMsgDeliverMemo(memoObj);
                            }
                            else
                            {
                                connection.SendMsgSaveMemoOnAway(memoObj);
                            }
                            Logger.info("쪽지 메시지 생성 : " + memoObj.ToString());
                        }
                        Close();
                    }
                }
                else
                {
                    if (MessageBox.Show(this, "쪽지를 받을 상대방을 지정해 주세요"
                                        , "알림", MessageBoxButtons.OK, MessageBoxIcon.Information) == DialogResult.OK)
                    {
                        AddMemberForm addform = new AddMemberForm(connection, AddMemberMode.OnMemoReceived, formKey, receiverList, SetMemoReceivers);
                        addform.ShowDialog(this);
                    }
                }
            }
            catch (Exception exception)
            {
                Logger.error(exception.ToString());
            }
        }
Exemple #4
0
 private void BtnAddChatter_Click(object sender, EventArgs e)
 {
     try
     {
         Logger.info("상담원추가 폼 키값 생성 :" + this.formKey);
         //로그인사용자만 선택
          List<MemberObj> chatters = ChatUtils.GetLoggedInMemberFromNodeTag(ChattersTree.Nodes);
          AddMemberForm addform = new AddMemberForm(connection, AddMemberMode.OnChatformAdded, this.formKey, chatters, AddChatters);
         addform.ShowDialog(this);
     }
     catch (Exception exception)
     {
         Logger.error(exception.ToString());
     }
 }
        /// <summary>
        /// 파일전송 대상자 추가
        /// </summary>
        /// <param name="formkey"></param>
        private void AddFileReceiver(string formkey) {
            
            try {
            
                //로그인사용자, 1명만 선택
                AddMemberForm addform = new AddMemberForm(true, formkey, false);
                addform.BtnConfirm.Click += new EventHandler(BtnConfirmForFile_Click);
                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);

                addform.SetCurrInListBox(InList, this.memTree.Nodes);

                SendFileForm form = (SendFileForm)FileSendFormList[formkey];
                string[] receiverArray =  form.txtbox_FileReceiver.Text.Split(';');
                addform.SetAddListBox(receiverArray, memTree.Nodes);

                addform.ShowDialog(form);
            
            } catch (Exception e) {
                logWrite(e.ToString());
            }
        }
        /// <summary>
        /// 쪽지쓰기 대상자 추가
        /// </summary>
        /// <param name="formkey"></param>
        private void AddMemoReceiver(string formkey) {
            
            try {
            
                //전체 선택
                AddMemberForm addform = new AddMemberForm(false, formkey);
                addform.BtnConfirm.MouseClick += new MouseEventHandler(BtnConfirmForMemo_Click);
                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);

                SendMemoForm form = (SendMemoForm)MemoFormList[formkey];
                
                string[] receiverArray = form.txtbox_receiver.Text.Split(';');
                addform.SetAddListBox(receiverArray, memTree.Nodes);

                Hashtable all = GetAllMember();
                addform.SetCurrInListBox(all, this.memTree.Nodes);

                addform.ShowDialog(form);
            
            } catch (Exception e) {
            
                logWrite(e.ToString());
            
            }
        }
        /// <summary>
        /// 대화자 추가 설정 폼 생성
        /// </summary>
        /// <param name="formkey"></param>
        private void MakeAddChatterForm(string formkey)  {

            try {
                //로그인사용자만 선택
                AddMemberForm addform = new AddMemberForm(true, formkey);
                addform.BtnConfirm.MouseClick += new MouseEventHandler(BtnConfirmAddMember_Click);
                addform.radiobt_g.Click += new EventHandler(radiobt_g_Click);
                addform.radiobt_con.Click += new EventHandler(radiobt_con_Click);
                addform.radiobt_all.Enabled = false;
                addform.combobox_team.SelectedValueChanged += new EventHandler(combobox_team_SelectedValueChanged);
                addform.CurrInListBox.MouseDoubleClick += new MouseEventHandler(CurrInListBox_MouseDoubleClick);

                ChatForm form = (ChatForm)ChatFormList[formkey];
                addform.SetAddListBox(form.ChattersTree.Nodes);
                addform.SetCurrInListBox(InList, this.memTree.Nodes);

                addform.radiobt_con.Checked = true;
                addform.ShowDialog(form);
            }
            catch (Exception exception)
            {
                logWrite(exception.ToString());
            }
        }
Exemple #8
0
        /// <summary>
        /// ��ȭ�� �߰� ���� �� ����
        /// </summary>
        /// <param name="formkey"></param>
        private void MakeAddChatterForm(string formkey)
        {
            try
            {
                AddMemberForm addform = new AddMemberForm();
                addform.BtnConfirm.MouseClick += new MouseEventHandler(BtnConfirm_Click);
                addform.BtnCancel.Click += new EventHandler(BtnCancel_Click_forChat);
                addform.radiobt_g.Click += new EventHandler(radiobt_g_Click);
                addform.radiobt_con.Click += new EventHandler(radiobt_con_Click);
                addform.radiobt_all.Visible = false;
                addform.combobox_team.SelectedValueChanged += new EventHandler(combobox_team_SelectedValueChanged);
                addform.CurrInListBox.MouseDoubleClick += new MouseEventHandler(CurrInListBox_MouseDoubleClick);

                ChatForm form = (ChatForm)ChatFormList[formkey];

                if (form.ChattersTree.Nodes.Count != 0)
                {
                    TreeNodeCollection col = form.ChattersTree.Nodes;
                    foreach (TreeNode node in col)
                    {
                        if (node.Text.Length != 0)
                        {
                            addform.AddListBox.Items.Add(node.Text);
                        }
                    }
                }

                if (InList.Count != 0)
                {
                    foreach (DictionaryEntry de in InList)
                    {
                        if (de.Value != null)
                        {
                            string name = getName(de.Key.ToString());
                            string item = name + "(" + de.Key.ToString() + ")";
                            if (!addform.AddListBox.Items.Contains(item))
                            {
                                addform.CurrInListBox.Items.Add(item);
                            }
                        }
                    }
                }

                addform.formkey.Text = formkey;
                addform.radiobt_con.Checked = true;
                addform.Show(form);
            }
            catch (Exception exception)
            {
                logWrite(exception.ToString());
            }
        }
Exemple #9
0
        private void AddMemoReceiver(string formkey)
        {
            try
            {
                AddMemberForm addform = new AddMemberForm();
                addform.BtnConfirm.MouseClick += new MouseEventHandler(BtnConfirmForMemo_Click);
                addform.BtnCancel.MouseClick += new MouseEventHandler(BtnCancel_Click_forMemo);
                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);

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

                Hashtable all = GetAllMember();
                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 (!addform.AddListBox.Items.Contains(item))
                                {
                                    addform.CurrInListBox.Items.Add(item);
                                }
                            }
                        }
                    }
                }

                addform.formkey.Text = formkey;
                addform.Show(form);
            }
            catch (Exception e)
            {
                logWrite(e.ToString());
            }
        }
        private void BtnSend_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtbox_receiver.Text.Length != 0)
                {
                    string memoContent = textBox1.Text.Trim();
                    if (memoContent.Length != 0)
                    {
                        foreach (MemberObj userObj in receiverList)
                        {
                            MemoObj memoObj = new MemoObj(ConfigHelper.Id, userObj.Id, memoContent);

                            if (Members.ContainLoginUserNode(userObj.Id))
                                connection.SendMsgDeliverMemo(memoObj);
                            else
                                connection.SendMsgSaveMemoOnAway(memoObj);
                            Logger.info("쪽지 메시지 생성 : " + memoObj.ToString());
                        }
                        Close();
                    }
                }
                else
                {
                    if (MessageBox.Show(this, "쪽지를 받을 상대방을 지정해 주세요"
                                        , "알림", MessageBoxButtons.OK, MessageBoxIcon.Information) == DialogResult.OK)
                    {
                        AddMemberForm addform = new AddMemberForm(connection, AddMemberMode.OnMemoReceived, formKey, receiverList, SetMemoReceivers);
                        addform.ShowDialog(this);
                    }
                }
            }
            catch (Exception exception)
            {
                Logger.error(exception.ToString());
            }
        }
 private void BtnReceiver_Click(object sender, EventArgs e)
 {
     try
     {
         AddMemberForm addform = new AddMemberForm(connection, AddMemberMode.OnMemoReceived, formKey, receiverList, SetMemoReceivers);
         addform.ShowDialog(this);
     }
     catch (Exception ex)
     {
         Logger.error(ex.ToString());
     }
 }