public void transfer(transfer_container input) { WebClient client = new WebClient(); string fname; string arguements; string directory; string aria2 = "aria2c"; string extension = extensiontxt.Text; for (int i = 0; i < inputTextBox.Lines.Length; i++) { input.aria[i] = inputTextBox.Lines[i].ToString(); arguements = input.aria[i]; arguements = arguements.Remove(arguements.IndexOf(aria2), aria2.Length); aria_download(arguements); directory = Directory.GetCurrentDirectory(); DirectoryInfo di = new DirectoryInfo(directory); foreach (var file in Directory.GetFiles(directory, "*." + extension, SearchOption.AllDirectories)) { string filepath = file.ToString(); fname = Path.GetFileName(filepath); logTextBox.Text = fname; ftpupload(fname, filepath); File.Delete(fname); } } }
void StartButtonClick(object sender, EventArgs e) { transfer_container trans = new transfer_container(); if (inputTextBox.Lines.Length < 1) { MessageBox.Show("Please enter aria rpc urls", "Empty list", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else { transfer(trans); } }