public void installUpdate()
{
if (this.webUpdateCheck.Document != null) {
HtmlElement he = this.webUpdateCheck.Document.GetElementById("download");
if (he != null) {
try {
Utils.RunTaskScheduler(@"RunRPSUpdate", Convert.ToString(Path.Combine(Constants.getUpdateFolder(), Path.GetFileName(he.GetAttribute("href")))), null);
this.screensaver.OnExit();
this.showUpdateInfo("Running installer");
} catch (System.ComponentModel.Win32Exception we) {
this.screensaver.showInfoOnMonitors("RPS update cancelled" + Environment.NewLine + we.Message, true, true);
string clickOrKey = "Press 'U' key to update";
if (this.getPersistant("mouseSensitivity") == "none" || this.screensaver.action == Screensaver.Actions.Config) clickOrKey = "Click to install now";
this.screensaver.showUpdateInfo("RPS " + he.GetAttribute("data-version") + " downloaded<br/><a class='exit external' target='_blank' href='file://" + Path.Combine(Constants.getUpdateFolder(), Path.GetFileName(he.GetAttribute("href"))) + "'>" + clickOrKey + "</a>.");
this.screensaver.resetMouseMove();
}
return;
}
}
this.showUpdateInfo("Nothing to install");
}