Represents a file download.
예제 #1
0
        public DownloadForm(WebKitDownload Download)
        {
            this.Download = Download;
            InitializeComponent();

            this.Visible = false;

            Download.DownloadStarted += new DownloadStartedEventHandler(Download_DownloadStarted);
            Download.DownloadReceiveData += new DownloadReceiveDataEventHandler(Download_DownloadReceiveData);
            Download.DownloadFinished += new DownloadFinishedEventHandler(Download_DownloadFinished);
        }
예제 #2
0
        private void downloadDelegate_DidBegin(WebDownload download)
        {
            // create WebKitDownload object to handle this download and notify listeners
            WebKitDownload d = new WebKitDownload();

            downloads.Add(download, d);

            FileDownloadBeginEventArgs args = new FileDownloadBeginEventArgs(d);

            DownloadBegin(this, args);

            if (args.Cancel)
            {
                d.Cancel();
            }
        }
예제 #3
0
        private void downloadDelegate_DidBegin(WebDownload download)
        {
            // create WebKitDownload object to handle this download and notify listeners
            WebKitDownload d = new WebKitDownload();
            downloads.Add(download, d);

            FileDownloadBeginEventArgs args = new FileDownloadBeginEventArgs(d);
            DownloadBegin(this, args);

            if (args.Cancel)
                d.Cancel();
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the FileDownloadBeginEventArgs class.
 /// </summary>
 /// <param name="download">A WebKitDownload representing the download.</param>
 public FileDownloadBeginEventArgs(WebKitDownload download)
 {
     this.Download = Download;
     this.Cancel   = false;
 }
 /// <summary>
 /// Initializes a new instance of the FileDownloadBeginEventArgs class.
 /// </summary>
 /// <param name="Download">A WebKitDownload representing the download.</param>
 public FileDownloadBeginEventArgs(WebKitDownload Download)
 {
     this.Download = Download;
     this.Cancel = false;
 }