X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=win%2FC%23%2FfrmUpdater.cs;h=7d56c587efc0e1e673f9d6fbb96db97f41f4d8ac;hb=4f0019f03c2e85e8634150ff0c9a31bee6d35ce5;hp=12376068a75420f2837ae8527700f7449795ec09;hpb=7be6051e420dba45add0a213f12f143b898f5d7a;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/win/C#/frmUpdater.cs b/win/C#/frmUpdater.cs index 12376068..7d56c587 100644 --- a/win/C#/frmUpdater.cs +++ b/win/C#/frmUpdater.cs @@ -1,58 +1,103 @@ /* frmUpdater.cs $ - - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ - -using System; -using System.Windows.Forms; -using Handbrake.Functions; + This file is part of the HandBrake source code. + Homepage: . + It may be used under the terms of the GNU General Public License. */ namespace Handbrake { + using System; + using System.Windows.Forms; + using Functions; + + /// + /// A window to display update information. + /// public partial class frmUpdater : Form { - readonly AppcastReader Appcast; + /// + /// An instance of the Appcast Reader + /// + private readonly AppcastReader appcast; + + /// + /// Initializes a new instance of the class. + /// + /// + /// The appcast reader. + /// public frmUpdater(AppcastReader reader) { InitializeComponent(); - Appcast = reader; + appcast = reader; GetRss(); SetVersions(); } + /// + /// Get the RSS feed + /// private void GetRss() { - wBrowser.Url = Appcast.DescriptionUrl; + wBrowser.Url = appcast.DescriptionUrl; } + /// + /// Set the versions + /// private void SetVersions() { - string old = "(You have: " + Properties.Settings.Default.hb_version.Trim() + " / " + Properties.Settings.Default.hb_build.ToString().Trim() + ")"; - string newBuild = Appcast.Version.Trim() + " (" + Appcast.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) + /// + /// Handle the Install Update button click event. + /// + /// + /// The sender. + /// + /// + /// The EventArgs. + /// + private void BtnInstallUpdateClick(object sender, EventArgs e) { - frmDownload download = new frmDownload(Appcast.DownloadFile); + frmDownload download = new frmDownload(appcast.DownloadFile); download.ShowDialog(); this.Close(); } - private void btn_remindLater_Click(object sender, EventArgs e) + /// + /// Handle the Remind Later button click event + /// + /// + /// The sender. + /// + /// + /// The EventArgs. + /// + private void BtnRemindLaterClick(object sender, EventArgs e) { this.Close(); } - private void btn_skip_Click(object sender, EventArgs e) + /// + /// Handle the Skip update button click event + /// + /// + /// The sender. + /// + /// + /// The e. + /// + private void BtnSkipClick(object sender, EventArgs e) { - Properties.Settings.Default.skipversion = int.Parse(Appcast.Build); + Properties.Settings.Default.skipversion = int.Parse(appcast.Build); Properties.Settings.Default.Save(); this.Close(); } - } } \ No newline at end of file