RPS.Config.DownloadFileCompleted C# (CSharp) 메소드

DownloadFileCompleted() 공개 메소드

public DownloadFileCompleted ( object sender, AsyncCompletedEventArgs e ) : void
sender object
e AsyncCompletedEventArgs
리턴 void
        void DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
        {
            //WebBrowser wbCheckUpdate = sender as WebBrowser;
            HtmlElement he = this.webUpdateCheck.Document.GetElementById("download");
            string updatePath = Path.Combine(Constants.getUpdateFolder(), Path.GetFileName(he.GetAttribute("href")));
            if (!Utils.VerifyMD5(updatePath, he.GetAttribute("data-md5"))) {
                // <a href='" + he.GetAttribute("href") + "'>
                this.showUpdateInfo("Download " + he.GetAttribute("data-version") + " failed<br/>Please U key to start download manually.");
                return;
            }
            if (this.getPersistantString("checkUpdates") == "yes") this.installUpdate();
            else {
                string message = "RPS " + he.GetAttribute("data-version") + " downloaded<br/><a class='exit external' target='_blank' href='file://" + updatePath + "'>";
                if (this.getPersistant("mouseSensitivity") == "none" || this.screensaver.action == Screensaver.Actions.Config) {
                    message += "Click to install now</a>";
                } else {
                    message += "Press 'U' key to update</a><div class='small'>(Ctrl + U to ignores this update)</div>";
                }
                this.screensaver.showUpdateInfo(message);
            }
        }