/// <summary> /// 대화창에서 파일보내기 버튼 클릭시 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void chatSendFile_Click(object sender, EventArgs e) { try { if (ChattersTree.Nodes.Count == 0) {//채팅참가자 리스트뷰에 참가자가 없다면 MessageBox.Show("파일전송을 할 대상자가 없습니다.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information); Logger.info("ChattersTree 에 파일수신 상대방 없음"); } string fileName = null; if (openFileDialog.ShowDialog(this) == DialogResult.OK) { fileName = openFileDialog.FileName; foreach (TreeNode node in ChattersTree.Nodes) { MemberObj userObj = (MemberObj)node.Tag; if (userObj.Status != MsgrUserStatus.LOGOUT) { SendFileForm sendform = new SendFileForm(connection, userObj, fileName); sendform.Show(); sendform.Activate(); } } } } catch (Exception exception) { Logger.error(exception.ToString()); } }
private void MakeSendFileForm(MemberObj userObj, string fileName)//key=id, value=name { try { SendFileForm sendform = new SendFileForm(connection, userObj, fileName); sendform.Show(); sendform.Activate(); } catch (Exception e) { Logger.error(e.ToString()); } }
private void MakeSendFileForm(List<MemberObj> userList)//key=id, value=name { try { foreach (MemberObj user in userList) { SendFileForm sendform = new SendFileForm(connection, user); sendform.Show(); sendform.Activate(); } } catch (Exception e) { Logger.error(e.ToString()); } }
private void MakeSendFileForm(List <MemberObj> userList)//key=id, value=name { try { foreach (MemberObj user in userList) { SendFileForm sendform = new SendFileForm(connection, user); sendform.Show(); sendform.Activate(); } } catch (Exception e) { Logger.error(e.ToString()); } }
private void MakeSendFileForm(Hashtable list)//key=id, value=name { try { SendFileForm sendform = new SendFileForm(); sendform.formkey.Text = DateTime.Now.ToLongTimeString();//CHOI_DEBUG sendform.btn_start.MouseClick += new MouseEventHandler(btn_start_Click); sendform.btn_cancel.MouseClick += new MouseEventHandler(btn_cancel_Click); sendform.btn_receivers.MouseClick += new MouseEventHandler(btn_receivers_Click); sendform.label_detail.MouseClick += new MouseEventHandler(label_detail_Click); sendform.btn_selectfile.MouseClick += new MouseEventHandler(btn_selectfile_Click); ToolTip tip = new ToolTip(); tip.IsBalloon = true; tip.ToolTipIcon = ToolTipIcon.Info; tip.ToolTipTitle = "받는사람"; tip.SetToolTip(sendform.txtbox_FileReceiver, sendform.txtbox_FileReceiver.Text); FileSendFormList[sendform.formkey.Text] = sendform; bool isAll = false; if (list != null && list.Count != 0) { foreach (DictionaryEntry de in list) { if (de.Value != null) { if (((string)de.Value).Equals("all")) { sendform.txtbox_FileReceiver.Text = "상담원전체;"; isAll = true; } else sendform.txtbox_FileReceiver.Text += (string)de.Value + "(" + (string)de.Key + ");"; } if (isAll == true) break; } sendform.Show(); sendform.Activate(); } else { sendform.Show(); sendform.Activate(); } } catch (Exception e) { logWrite(e.ToString()); } }