diff options
author | sr55 <[email protected]> | 2007-12-19 22:42:26 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2007-12-19 22:42:26 +0000 |
commit | 932a94ec17ab01f1e48eeba5b6fbf7e89794f176 (patch) | |
tree | a2180b0e54df3e5c9b5f2acd7a2c8af5894feb9e /win/C#/Functions/Common.cs | |
parent | 5757d7c7295572f8dd8f078dcceddf8728e075f3 (diff) |
WinGui:
- Some more code clean up
- Fixed: Skipped button not working on update checker.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1138 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/Common.cs')
-rw-r--r-- | win/C#/Functions/Common.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs new file mode 100644 index 000000000..fb0cebd90 --- /dev/null +++ b/win/C#/Functions/Common.cs @@ -0,0 +1,38 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Handbrake.Functions
+{
+ class Common
+ {
+ public Boolean updateCheck()
+ {
+ try
+ {
+ Functions.RssReader rssRead = new Functions.RssReader();
+ string build = rssRead.build();
+
+ int latest = int.Parse(build);
+ int current = Properties.Settings.Default.build;
+ int skip = Properties.Settings.Default.skipversion;
+
+ if (latest == skip)
+ {
+ return false;
+ }
+ else
+ {
+ Boolean update = (latest > current);
+ return update;
+ }
+ }
+ catch (Exception exc)
+ {
+ MessageBox.Show(exc.ToString());
+ return false;
+ }
+ }
+ }
+}
|