namespace FTP { public partial class Form1 : Form { string MyServerIP; string MyUserID; string MyPassword; string MyFilename; private Thread Threadx1 = null; private Thread Threadx2 = null; public Form1() { InitializeComponent(); Threadx1 = new Thread(new ThreadStart(Thread1)); Threadx1.IsBackground = true; Threadx2 = new Thread(new ThreadStart(Thread2)); Threadx2.IsBackground = true; } public void Thread1() { MyServerIP = "127.0.0.1"; MyUserID = "user1"; MyPassword = "user1"; MyFilename = "C:\\a.txt"; Upload(MyServerIP,MyUserID,MyPassword,MyFilename); } private void Thread2() { MyServerIP = "127.0.0.1"; MyUserID = "user2"; MyPassword = "user2"; MyFilename = "C:\\a.txt"; Upload(MyServerIP,MyUserID,MyPassword,MyFilename); } private void Form1_Load(object sender, EventArgs e) { Threadx1.Start(); Threadx2.Start(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)