summaryrefslogtreecommitdiffstats
path: root/win/C#/frmUpdater.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-09-28 18:19:47 +0000
committersr55 <[email protected]>2008-09-28 18:19:47 +0000
commit1296a228affb02f0b0fa2bc7f962e5a993332082 (patch)
treeea4d2e8bce3446d47ee34776ec4c4de244e6ba93 /win/C#/frmUpdater.cs
parent37897e9ed4608d8f3e400d4090220f3a92a55fc3 (diff)
WinGui:
- AppcastReader.cs re-factored. Reduces number of connections to the server. - Few UI tweaks to the updater / downloader git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1781 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmUpdater.cs')
-rw-r--r--win/C#/frmUpdater.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/win/C#/frmUpdater.cs b/win/C#/frmUpdater.cs
index 6252bb9b8..271e17bc0 100644
--- a/win/C#/frmUpdater.cs
+++ b/win/C#/frmUpdater.cs
@@ -14,29 +14,31 @@ namespace Handbrake
{
public partial class frmUpdater : Form
{
- Functions.AppcastReader rssRead = new Functions.AppcastReader();
+ Functions.AppcastReader appcast = new Functions.AppcastReader();
public frmUpdater()
{
InitializeComponent();
+ appcast.getInfo(); // Initializes the appcast
getRss();
setVersions();
}
private void getRss()
{
- wBrowser.DocumentText = "<font face=\"verdana\" size=\"1\">" + rssRead.versionInfo() + "</font>";
+ wBrowser.DocumentText = "<font face=\"verdana\" size=\"1\">" + appcast.versionInfo() + "</font>";
}
private void setVersions()
{
- lbl_oldVersion.Text = "(you have: " + Properties.Settings.Default.hb_version + " / " + Properties.Settings.Default.hb_build + ").";
- lbl_newVersion.Text = rssRead.version() + " (" + rssRead.build() + ")";
+ string old = "(You have: " + Properties.Settings.Default.hb_version.Trim() + " / " + Properties.Settings.Default.hb_build.ToString().Trim() + ")";
+ string newBuild = appcast.version().Trim() + " (" + appcast.build() + ")";
+ lbl_update_text.Text = "HandBrake " + newBuild + " is now available. " + old;
}
private void btn_installUpdate_Click(object sender, EventArgs e)
{
- frmDownload download = new frmDownload();
+ frmDownload download = new frmDownload(appcast.downloadFile());
download.Show();
this.Close();
}
@@ -48,7 +50,7 @@ namespace Handbrake
private void btn_skip_Click(object sender, EventArgs e)
{
- Properties.Settings.Default.skipversion = int.Parse(rssRead.build());
+ Properties.Settings.Default.skipversion = int.Parse(appcast.build());
Properties.Settings.Default.Save();
this.Close();