Example #1
0
            public void downloadFile()
            {
                bool isFileFound = false;

                _chosenFile = TxtFileName;
                setup();

                if (TxtFtpUrl != null && TxtFileFullPath != null)
                {
                    isFileFound = WPFHelper.ftpGetFile(TxtFtpUrl, TxtFileFullPath, _login, _password);
                }

                if (isFileFound && File.Exists(TxtFileFullPath))
                {
                    copyFile();
                }
            }
Example #2
0
            public void read()
            {
                bool isFileFound = false;

                setup();

                if (!string.IsNullOrEmpty(TxtFtpUrl) &&
                    !string.IsNullOrEmpty(TxtFileFullPath) &&
                    !string.IsNullOrEmpty(TxtLogin) &&
                    !string.IsNullOrEmpty(TxtPassword))
                {
                    isFileFound = WPFHelper.ftpGetFile(TxtFtpUrl, TxtFileFullPath, TxtLogin, TxtPassword);
                }


                if (isFileFound && File.Exists(TxtFileFullPath))
                {
                    TxtContent = File.ReadAllText(TxtFileFullPath);
                }
                else
                {
                    TxtContent = "";
                }
            }