private void uploadTemplateFile(string tempstring) { FtpWeb ftpclient = new FtpWeb(this.txtserver.Text, this.txtuser.Text, this.txtpasswd.Text, 21); if (ftpclient.Upload(tempstring, "")) { MessageBox.Show("上传打印服务器成功"); } else { MessageBox.Show("上传失败"); } }
private void ftpvalidate_Click(object sender, EventArgs e) { FtpWeb ftpweb = new FtpWeb(this.txtserver.Text, this.txtuser.Text, this.txtpasswd.Text, 21); string[] paths = ftpweb.GetList(); if (paths.Length > 0) { MessageBox.Show("OK"); } else { MessageBox.Show("Error"); } }
private void ftpvalidate_Click(object sender, EventArgs e) { FtpWeb ftpweb = new FtpWeb(this.txtserver.Text, this.txtuser.Text, this.txtpasswd.Text, 21); string[] paths= ftpweb.GetList(); if (paths.Length > 0) { MessageBox.Show("OK"); } else { MessageBox.Show("Error"); } }