Example #1
0
        private void method_21(string string_4, string string_5)
        {
            foreach (FileInfo file in new DirectoryInfo(string_5).GetFiles())
            {
                Thread.Sleep(125);
                int num = 1;
                if (!this.bool_1 && !this.TransferStatus.Error)
                {
                    while (num < 5)
                    {
                        try
                        {
                            this.method_20(Path.Combine(string_4, file.Name), file.FullName);
                            num = 5;
                        }
                        catch (Exception ex)
                        {
                            ++num;
                            if (num >= 5)
                            {
                                this.TransferStatus = new GClass81(ex.Message, true, GEnum5.const_4);
                            }
                        }
                    }
                }
                else
                {
                    break;
                }
            }
            // ISSUE: reference to a compiler-generated field
            EventHandler eventHandler1 = this.eventHandler_1;

            if (eventHandler1 == null)
            {
                return;
            }
            eventHandler1((object)this, (EventArgs)null);
        }
Example #2
0
 private void method_20(string string_4, string string_5)
 {
     this.ftpWebRequest_0 = this.method_16(string_4, "STOR");
     using (Stream requestStream = this.ftpWebRequest_0.GetRequestStream())
     {
         using (FileStream fileStream = new FileStream(string_5, FileMode.Open))
         {
             byte[] buffer = new byte[this.int_1];
             int    count  = fileStream.Read(buffer, 0, this.int_1);
             try
             {
                 while (count != 0)
                 {
                     if (!this.bool_1)
                     {
                         requestStream.Write(buffer, 0, count);
                         count = fileStream.Read(buffer, 0, this.int_1);
                         this.method_18((long)count);
                     }
                     else
                     {
                         break;
                     }
                 }
             }
             catch (Exception ex)
             {
                 if (!(ex is DivideByZeroException))
                 {
                     this.TransferStatus = new GClass81(ex.Message, true, GEnum5.const_4);
                 }
             }
         }
     }
     this.ftpWebRequest_0 = (FtpWebRequest)null;
 }
Example #3
0
 public void FTP_AbortFTP()
 {
     this.TransferStatus = new GClass81("Upload aborted.", true, GEnum5.const_2);
     this.bool_1         = true;
 }