Пример #1
0
 private void fTPToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FTP ftp = new FTP(clients);
     ftp.ShowDialog();
 }
Пример #2
0
        private void SendFolder(FTPDirectory ftp, ClientThread client, string pathToGo, FTP par)
        {
            if (Directory.Exists(ftp.Path))
            {
                ftp.GetChildren();
                foreach (FTPDirectory f in ftp.Children)
                {
                    SendFolder(f, client, pathToGo + "\\\\" + f.Name, par);
                }
            }
            else
            {

                Messaging.SendCommand("RemoteAcceptFTP(" + client.GetPort() + ",'" + pathToGo + "', " + new FileInfo(ftp.Path).Length + ");", client.GetClientSocket());
                //Messaging.RemoteAcceptFTP(client.GetClientSocket(), pathToGo);
                Messaging.FTPFile(ftp.Path, client.GetClientSocket());
                log.Text += ("\nFile successfully sent.\n");
                par.Refresh();
            }
        }