Exemplo 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 );
        }
Exemplo 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;
        }
Exemplo 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);
        }
Exemplo 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);
            }
        }
Exemplo 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);
            }
        }