Ejemplo n.º 1
0
        public void Initialize()
        {
            labelMainMessage.Text = string.Format("{0}[{1}]님이 파일을 보내려고 합니다.\n파일을 저장하시겠습니까?",
                                                  Members.GetByUserId(rcvObj.SenderId).Name, rcvObj.SenderId);
            //TextBoxSaveDir.Text = string.Format(WeDoCommon.ConstDef.MSGR_DATA_FILE_DIR,ConfigHelper.Id);
            TextBoxSaveDir.Text = Environment.GetFolderPath(Environment.SpecialFolder.Personal);

            SetValidFileName(TextBoxSaveDir.Text);

            ToolTipFileName.SetToolTip(LabelFileName, realDownloadedFileName);
            ToolTipFileName.Active      = true;
            PanelFinishFileSave.Visible = false;
            setProgressVisible(false);
            DownloadForms.AddForm(formKey, this);

            connection.FTPReadyToListen       += ProcessOnFTPReadyToListen;
            connection.FTPReceivingProgressed += ProcessOnFTPReceivingProgressed;
            connection.FTPReceivingFinished   += ProcessOnFTPReceivingFinished;
            connection.FTPReceivingCanceled   += ProcessOnFTPReceivingCanceled;
            connection.FTPReceivingFailed     += ProcessOnFTPReceivingFailed;

            closeOnNoResponseTimer.Interval = 30000; //타임아웃을 30초로 설정하고 타임아웃인 경우 화면을 닫는다.
            closeOnNoResponseTimer.Tick    += new EventHandler(CheckDownloadFileTimeOutOnTick);
            //connection.FTP
        }