public void FTP_DiaglogResultReceived(object sender, CustomEventArgs e)
        {
            DownloadInfo info = (DownloadInfo)e.GetItem;
            string fileName = info.FileName;
            int fileSize = info.FileSize;
            string senderId = info.SenderId;
            string senderName = info.SenderName;
            string msgFileKey = info.MsgFileKey;
            IPEndPoint siep = (IPEndPoint)InList[info.SenderId];
            siep.Port = 8883;

            if (info.DownloadAccepted) //수락허가
            {
                //SendOk
                //파일받기 수락 메시지전송
                //SendMsg("Y|" + tempMsg[1] + "|" + tempMsg[3] + "|" + this.myid, siep); //구성(Y|파일명|파일Key|수신자id)
                SendMsg("Y|" + info.SenderFileName + "|" + info.MsgFileKey + "|" + info.MyId, siep); //구성(Y|파일명|파일Key|수신자id)
                //파일수신대기/수신

                Hashtable hsInfo = new Hashtable();
                hsInfo["filename"] = info.FileName;
                hsInfo["filesize"] = info.FileSize;
                hsInfo["name"] = info.SenderName;
                hsInfo["senderid"] = info.SenderId;
                hsInfo["myid"] = info.MyId;
                FileReceiver((object)hsInfo);
            }
            else  //수락거부 파일 받기 거부("N|파일명|파일키|id)
            {
                SendMsg("N|" + info.SenderFileName + "|" + info.MsgFileKey + "|" + info.MyId, siep); //구성(Y|파일명|파일Key|수신자id)
                //if (FileSendFormList.ContainsKey(key) && FileSendFormList[key] != null)
                //{
                //    FileSendFormList.Remove(key);
                //    logWrite("FileSendFormList.Remove(key) :" + key);
                //}
            }
        }
        private void MemoReplyDone(object sender, CustomEventArgs e) {
            try {
                MemoForm memoForm = (MemoForm)sender;
                string senderId = memoForm.getSenderId();
                string memoContent = (string)e.GetItem;
                string msg = "19|" + this.myname + "|" + this.myid + "|" + memoContent.Trim();
                string smsg = "4|" + this.myname + "|" + this.myid + "|" + memoContent.Trim();

                if (InList.ContainsKey(senderId) && InList[senderId] != null) {
                    IPEndPoint senderIP = (IPEndPoint)InList[senderId];
                    SendMsg(msg + "|" + senderId, server);
                } else
                    SendMsg(smsg + "|" + senderId, server);
            } catch (Exception exception) {
                logWrite(exception.ToString());
            }
        }
        public void RegisterNotice(object sender, CustomEventArgs e)
            //bool isEmergency, string title, string content)
        {
            NoticeInfo info = (NoticeInfo)(e.GetItem);

            String NoticeTime = DateTime.Now.ToString();
            if (!info.IsEmergency)
            {
                MakeNoticeResult(NoticeTime, info.Title, info.Content, "일반");
                SendMsg("6|" + info.Content + "|" + this.myid + "|n" + "|" + NoticeTime + "|" + info.Title, server);
            }
            else
            {
                MakeNoticeResult(NoticeTime, info.Title, info.Content, "긴급");
                SendMsg("6|" + info.Content + "|" + this.myid + "|e" + "|" + NoticeTime + "|" + info.Title, server);
            }
        }
 public void FTP_DialogStatusChanged(object sender, CustomEventArgs e)
 {
     //SUCCESS
     //CANCEL
     //ERROR
     int result = (int)e.GetItem;
     switch (result) 
     {
         case DownloadStatus.SUCCESS :
             break;
         case  DownloadStatus.FAILED:
             logWrite("CHOI_DEBUG FTP_DialogStatusChanged:FAILED");
             break;
         case DownloadStatus.CANCELED:
             FTP_Server_Cancel();
             break;
     }
 }