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 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. 3
0
 public override void Run(KexplorerFtpNode folder, string[] files)
 {
     this.ScriptHelper.VARS["COPYFILES"] = new ScriptRunParams(folder, files);
     this.ScriptHelper.VARS["CUTFILES"] = null;
     IScript paste = this.ScriptHelper.FindScript(PasteScript.LONG_NAME);
     if (paste != null)
     {
         paste.Active = true;
     }
 }
Esempio n. 4
0
        public override void Run(KexplorerFtpNode folder, string[] files)
        {
            this.ScriptHelper.VARS["COPYFILES"] = new ScriptRunParams(folder, files);
            this.ScriptHelper.VARS["CUTFILES"]  = null;
            IScript paste = this.ScriptHelper.FindScript(PasteScript.LONG_NAME);

            if (paste != null)
            {
                paste.Active = true;
            }
        }
Esempio n. 5
0
 public void RefreshFolder(KexplorerFtpNode folderNode, bool folderOnly)
 {
     /*if (folderNode.Parent != null
      *  && folderNode.Text != folderNode.Path)
      * {
      *
      *  this.renamedFtpNode = folderNode;
      *  this.mainGUI.MainForm.Invoke(new InvokeDelegate(this.RefreshNodeName));
      * } */
     if (!folderOnly)
     {
         this.mainController.MainPipeLine.AddPriorityJob(new FtpFileListWorkUnit(folderNode, this.mainGUI
                                                                                 , this.mainGUIFlagger));
     }
 }
Esempio n. 6
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. 7
0
        public void Run(KexplorerFtpNode folder)
        {
            if (this.ScriptHelper.VARS["CUTFILES"] != null)
            {
                MessageBox.Show("Cut to FTP Not Supported", "Kexplorer");
                return;
            }
            ScriptRunParams runParams = (ScriptRunParams)
                                        this.ScriptHelper.VARS["COPYFILES"];

            if (runParams != null && runParams.FtpNode != null)
            {
                MessageBox.Show("FTP to FTP transfer not supported.", "Kexplorer");
            }
            else if (runParams.Files == null || runParams.Files.Count() == 0)
            {
                MessageBox.Show("FTP Upload only supported for file lists, not a folder.");
            }
            else
            {
                this.UploadFtpFiles(folder, runParams.FolderNode, runParams.Files);
            }
        }
Esempio n. 8
0
        public void Run(KexplorerFtpNode folder)
        {
            if (this.ScriptHelper.VARS["CUTFILES"] != null)
            {
                MessageBox.Show("Cut to FTP Not Supported", "Kexplorer");
                return;
            }
            ScriptRunParams runParams = (ScriptRunParams)
                                    this.ScriptHelper.VARS["COPYFILES"];

            if (runParams != null && runParams.FtpNode != null)
            {
                MessageBox.Show("FTP to FTP transfer not supported.", "Kexplorer");
            }
            else if (runParams.Files == null || runParams.Files.Count() == 0)
            {
                MessageBox.Show("FTP Upload only supported for file lists, not a folder.");
            }
            else
            {
                this.UploadFtpFiles(folder, runParams.FolderNode, runParams.Files);
            }
        }
Esempio n. 9
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);
            }
        }
Esempio n. 10
0
 public ScriptRunParams(KexplorerFtpNode newFtpNode, string[] files)
 {
     this.ftpNode = newFtpNode;
     this.ftpFiles = files;
 }
Esempio n. 11
0
 public ScriptRunParams(KexplorerFtpNode newFtpNode, string[] files)
 {
     this.ftpNode  = newFtpNode;
     this.ftpFiles = files;
 }
Esempio n. 12
0
 public abstract void Run(KexplorerFtpNode folder, string[] files);
Esempio n. 13
0
        public void RefreshFolder(KexplorerFtpNode folderNode, bool folderOnly)
        {
            /*if (folderNode.Parent != null
                && folderNode.Text != folderNode.Path)
            {

                this.renamedFtpNode = folderNode;
                this.mainGUI.MainForm.Invoke(new InvokeDelegate(this.RefreshNodeName));
            } */
            if (!folderOnly)
            {
                this.mainController.MainPipeLine.AddPriorityJob(new FtpFileListWorkUnit(folderNode, this.mainGUI
                    , this.mainGUIFlagger));
            }
        }
Esempio n. 14
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. 15
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);
            }
        }
Esempio n. 16
0
 public void RunFtpFolderScript(string longName, KexplorerFtpNode foldernode)
 {
     this.ftpFolderScripts.Where(s => s.LongName.Equals(longName)).First().Run(foldernode);
 }
Esempio n. 17
0
 public void RunFtpFolderScript(string longName, KexplorerFtpNode foldernode)
 {
     this.ftpFolderScripts.Where(s => s.LongName.Equals(longName)).First().Run(foldernode);
 }
Esempio n. 18
0
 public abstract void Run(KexplorerFtpNode folder, string[] files);