예제 #1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            string fn = (string)e.Argument;

            EasyFileTransfer.Model.Response rsp = EftClient.Send(fn, textBox2.Text, Convert.ToInt32(textBox1.Text));
            timer1.Stop();
            progressBar1.BeginInvoke((MethodInvoker)(() => progressBar1.Value = 100));
            MessageBox.Show(rsp.description, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            progressBar1.BeginInvoke((MethodInvoker)(() => progressBar1.Value = 0));
        }
예제 #2
0
 private void SnedButton_Click(object sender, EventArgs e)
 {
     if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         EasyFileTransfer.Model.Response rsp = EftClient.Send(openFileDialog1.FileName, textBox2.Text, Convert.ToInt32(textBox1.Text));
         if (rsp.status == 1)
         {
             MessageBox.Show("send successfully.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }