public override void Start() { download.CompleteCallback += new DownloadCompleteHandler(InternalDownloadComplete); if (download.SavedFilePath != null && download.SavedFilePath.Length > 0) { download.BackgroundDownloadFile(); } else { download.BackgroundDownloadMemory(); } }
/// <summary> /// Loads a bitmap from the web in background and displays. /// </summary> public void LoadImageInBackground( string url ) { if(url != null && !url.ToLower().StartsWith("http://")) { // Local file Image = Image.FromFile(url); return; } oldText = Text; Text = Text + ": Loading..."; WebDownload client = new WebDownload(url); //// client.CompleteCallback += new DownloadCompleteHandler(DownloadComplete); client.BackgroundDownloadMemory(); }
private void CheckForUpdates(bool bFromMenu) { m_bUpdateFromMenu = bFromMenu; WebDownload download = new WebDownload(WebsiteUrl + VersionFile); download.DownloadType = DownloadType.Unspecified; download.CompleteCallback += new DownloadCompleteHandler(UpdateDownloadComplete); download.BackgroundDownloadMemory(); }