Example #1
0
        private void FormKetNoiFTP_Load(object sender, EventArgs e)
        {
            FTPDetail fTPDetail = ManageBase.GetFTPDetail();
            bool      flag      = fTPDetail != null;

            if (flag)
            {
                this.txtHostFTP.Text     = fTPDetail.Server;
                this.txtPort.Text        = fTPDetail.Port.ToString();
                this.txtUsernameFTP.Text = fTPDetail.User;
                this.txtPasswordFTP.Text = fTPDetail.Pass;
            }
        }
Example #2
0
        public static bool CreateFTP()
        {
            FTPDetail fTPDetail = ManageBase.GetFTPDetail();
            bool      result    = false;
            bool      flag      = fTPDetail != null;

            if (flag)
            {
                GlobalVariable._fTPLib = new FTP(fTPDetail.Server, fTPDetail.Port, fTPDetail.User, fTPDetail.Pass);
                try
                {
                    GlobalVariable._fTPLib.GetFileList();
                    result = true;
                }
                catch (Exception var_3_45)
                {
                    result = false;
                    GlobalVariable._fTPLib = null;
                }
            }
            return(result);
        }