Exemplo n.º 1
0
        private void b_downloadFTP_Click(object sender, EventArgs e)
        {
            DownloadSyncFile downloadSyncFile = new DownloadSyncFile();

            downloadSyncFile.SyncDownload();
            retreive(string.Empty);
        }
Exemplo n.º 2
0
        private void downloadFileBtn_Click(object sender, EventArgs e)
        {
            DownloadSyncFile downloadSync = new DownloadSyncFile();

            try
            {
                downloadSync.SyncDownload();

                MessageBox.Show("Download file successfully", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FileTransferScheduler.IntervalInMinutes(10, 30, 5,
                                                    () =>
            {
                UploadSyncFile uploadSyncFile = new UploadSyncFile();

                uploadSyncFile.SyncUpload();
            });

            FileTransferScheduler.IntervalInMinutes(10, 30, 30,
                                                    () => {
                DownloadSyncFile downloadSync = new DownloadSyncFile();

                downloadSync.SyncDownload();
            });

            Application.Run(new Form_Login());
        }