Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            http FileOne = new http();

            FileOne.Upload_Request("http://192.168.126.40/lta_pgs/upload.php", "D:\\1.txt", "gdm1/1.txt");
            //"http://192.168.126.160/lta_pgs/upload.php -F gdmid=1 -F file=@readme -F submit=Submit"
            //FileOne.SendFile("D:\\1.txt", "http://192.168.126.40/lta_pgs/gdm1/test.txt", System.Net.CredentialCache.DefaultCredentials);
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            http FileOne = new http();

            FileOne.FileLocalPath = "D:\\1.txt";
            FileOne.Url           = System.Configuration.ConfigurationSettings.AppSettings["webserviceurl"];
            FileOne.Url           = "http://192.168.126.40/lta_pgs/gdm1/gdm.1.1.txt";
            FileOne.Connect();
            if (FileOne.IsFileExist)
            {
                FileOne.DownloadFile();
                //mythread = new Thread(new ThreadStart(FileOne.DownloadFile));
                //mythread.Start();
            }
            FileOne.Close();
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            http FileOne = new http();

            FileOne.FileLocalPath = "D:\\1.txt";
            FileOne.Url           = System.Configuration.ConfigurationSettings.AppSettings["webserviceurl"];
            FileOne.Url           = "http://192.168.126.40/lta_pgs/gdm1/gdm.1.1.txt";
            FileOne.Connect();
            if (FileOne.IsFileExist)
            {
                MessageBox.Show("Exist");
            }
            else
            {
                MessageBox.Show("Not Exist");
            }

            FileOne.Close();
        }