private void buttonToFtpCheck_Click(object sender, RoutedEventArgs e) { System.Windows.Input.Cursor oldCursor = Mouse.OverrideCursor; try { Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; ServiceFtp ftp = new ServiceFtp(textBoxToFtpUser.Text, passwordBoxToFtpPw.Password, 5000, textBoxToFtpUri.Text); if (ftp.UriPathExist() == true) { Mouse.OverrideCursor = oldCursor; MessageBox.Show(this, "FTP Check OK"); } else { Mouse.OverrideCursor = oldCursor; MessageBox.Show(this, "FTP Check Fail!"); } } catch (Exception ex) { Mouse.OverrideCursor = oldCursor; MessageBox.Show(this, "FTP Check Fail!, " + ex.Message); } }
static void Main(string[] args) { ServiceFtp sftp = new ServiceFtp(new NetworkCredential("AvisSite", "dm#o4%v#Wn43arWv2"), "ftp://new.avislogistics.kz:2021/GOODS_RECEIPT/"); //sftp.DownLoadFile(); GoodsReceipt g = sftp.Df("new_GOODS_RECEIPT_20180313-200655-249.xml"); }
static void Main(string[] args) { ServiceFtp sftp = new ServiceFtp(new System.Net.NetworkCredential("AvisSite", "dm#o4%v#Wn43arWv2"), "ftp://new.avislogistics.kz:2021/GOODS_RECEIPT/"); //sftp.DownLoadFile(); }