Example #1
0
            public override void init(int op, String src, String dest, long max)
            {
                this.src     = src;
                this.dest    = dest;
                this.elapsed = 0;
                this.total   = max;
                timer        = new System.Timers.Timer(1000);
                timer.Start();
                timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);

                string note;

                if (op.Equals(GET))
                {
                    note = "Downloading " + System.IO.Path.GetFileName(src) + "...";
                }
                else
                {
                    note = "Uploading " + System.IO.Path.GetFileName(src) + "...";
                }
                m_sftp.SendStartMessage(src, dest, (int)total, note);
            }