Esempio n. 1
0
        public void Run(KexplorerFtpNode xfolder, string[] xfiles)
        {
            if (xfiles == null)
            {
                MessageBox.Show("FTP Delete only supported for individual files", "Kexplorer");
                return;

            }

            folder = xfolder;
            files = xfiles;

            this.workerThread = new Thread(new ThreadStart(this.StartFtpDeleteInThread));
            this.workerThread.Start();
            this.cancelled = false;

            progress = SimpleProgress.StartProgress(this.FtpCancelled
                                            , "Kexplorer FTP Delete"
                                            , "Starting...");

            while (!this.cancelled && this.workerThread.ThreadState == ThreadState.Running)
            {
                Thread.Sleep(250);
            }

            this.ScriptHelper.RefreshFolder( folder, false );
        }
Esempio n. 2
0
        public static SimpleProgress StartProgress( InvokeDelegate cancelCallback
                                        ,string title
                                        ,string initialProgress )
        {
            var win = new SimpleProgress(cancelCallback);
            win.Text = title;
            win.progressMessage.Text = initialProgress;

            win.Show();

            return win;
        }
Esempio n. 3
0
        public static SimpleProgress StartProgress(InvokeDelegate cancelCallback
                                                   , string title
                                                   , string initialProgress)
        {
            var win = new SimpleProgress(cancelCallback);

            win.Text = title;
            win.progressMessage.Text = initialProgress;


            win.Show();


            return(win);
        }
Esempio n. 4
0
        private void UploadFtpFiles( KexplorerFtpNode destNode, KExplorerNode sourceNode, FileInfo[] files )
        {
            ftpDestNode = destNode;
            folderSourceNode = sourceNode;
            sourceFiles = files;
            this.workerThread = new Thread(new ThreadStart(this.StartFtpUploadInThread));
            this.workerThread.Start();
            this.cancelled = false;

            progress = SimpleProgress.StartProgress(this.FtpCancelled
                                            , "Kexplorer FTP Upload"
                                            , "Starting...");

            while (!this.cancelled && this.workerThread.ThreadState == ThreadState.Running)
            {
                Thread.Sleep(250);
            }
        }
Esempio n. 5
0
        private void DownloadFtpFiles(KExplorerNode xdestNode
                               , KexplorerFtpNode xsourceNode
                               , string[] xfiles
                                 )
        {
            destNode = xdestNode;
            sourceNode = xsourceNode;
            files = xfiles;
            this.workerThread = new Thread(new ThreadStart(this.StartFtpDownLoadInThread));
            this.workerThread.Start();
            this.cancelled = false;

            progress = SimpleProgress.StartProgress(this.FtpCancelled
                                            , "Kexplorer FTP Download"
                                            , "Starting...");

            while (!this.cancelled && this.workerThread.ThreadState == ThreadState.Running)
            {
                Thread.Sleep(250);
            }
        }