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