Пример #1
0
        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);
            }
        }
Пример #2
0
        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");
        }
Пример #3
0
 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();
 }