2 This file is part of the HandBrake source code.
\r
3 Homepage: <http://handbrake.fr>.
\r
4 It may be used under the terms of the GNU General Public License. */
\r
9 using System.Windows.Forms;
\r
13 /// A window to display update information.
\r
15 public partial class frmUpdater : Form
\r
18 /// An instance of the Appcast Reader
\r
20 private readonly AppcastReader appcast;
\r
23 /// Initializes a new instance of the <see cref="frmUpdater"/> class.
\r
25 /// <param name="reader">
\r
26 /// The appcast reader.
\r
28 public frmUpdater(AppcastReader reader)
\r
30 InitializeComponent();
\r
38 /// Get the RSS feed
\r
40 private void GetRss()
\r
42 wBrowser.Url = appcast.DescriptionUrl;
\r
46 /// Set the versions
\r
48 private void SetVersions()
\r
50 string old = "(You have: " + Properties.Settings.Default.hb_version.Trim() + " / " +
\r
51 Properties.Settings.Default.hb_build.ToString().Trim() + ")";
\r
52 string newBuild = appcast.Version.Trim() + " (" + appcast.Build + ")";
\r
53 lbl_update_text.Text = "HandBrake " + newBuild + " is now available. " + old;
\r
57 /// Handle the Install Update button click event.
\r
59 /// <param name="sender">
\r
62 /// <param name="e">
\r
65 private void BtnInstallUpdateClick(object sender, EventArgs e)
\r
67 frmDownload download = new frmDownload(appcast.DownloadFile);
\r
68 download.ShowDialog();
\r
73 /// Handle the Remind Later button click event
\r
75 /// <param name="sender">
\r
78 /// <param name="e">
\r
81 private void BtnRemindLaterClick(object sender, EventArgs e)
\r
87 /// Handle the Skip update button click event
\r
89 /// <param name="sender">
\r
92 /// <param name="e">
\r
95 private void BtnSkipClick(object sender, EventArgs e)
\r
97 Properties.Settings.Default.skipversion = int.Parse(appcast.Build);
\r
98 Properties.Settings.Default.Save();
\r