void setButtonStatus(HttpDownloaderStatus status)
        {
            lblStatus.Text = "Last Status: " + status.ToString();
            this.TopMost   = false;
            switch (status)
            {
            case HttpDownloaderStatus.Completed:
                btnPauseResume.Text    = "Download again";
                btnPauseResume.Enabled = true;
                this.ControlBox        = true;
                this.Enabled           = true;
                saveMTDO();
                break;

            case HttpDownloaderStatus.Downloading:
                btnPauseResume.Text    = "Pause";
                btnPauseResume.Enabled = dorg != null && dorg.Info != null && dorg.Info.ResumeCapability == Resumeability.Yes;
                btnCancel.Enabled      = true;
                this.ControlBox        = true;
                this.Enabled           = true;
                break;

            case HttpDownloaderStatus.MergingFiles:
                this.ControlBox = false;
                this.Enabled    = false;
                saveMTDO();
                break;

            case HttpDownloaderStatus.Stopped:
                btnPauseResume.Text    = "Resume";
                btnPauseResume.Enabled = true;
                btnCancel.Enabled      = true;
                this.ControlBox        = true;
                this.Enabled           = true;
                saveMTDO();
                if (flagCloseAfterStop)
                {
                    this.Close();
                }
                break;
            }
        }
 public StatusChangedEventArgs(HttpDownloaderStatus oldStatus, HttpDownloaderStatus currentStatus)
 {
     this.OldStatus     = oldStatus;
     this.CurrentStatus = currentStatus;
 }