Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added platform specific online update checks

changed update notification
  • Loading branch information...
commit 82801761acbc03241d37e57b371825b738d03dd6 1 parent 307e2f8
@seuffert authored
View
23 XBSlink/Form1.cs
@@ -1131,6 +1131,11 @@ private void checkIncomingPortWithCloudServer()
private void checkForProgramUpdates()
{
String url = Resources.url_check_latest_version;
+ if (System.Environment.OSVersion.Platform == PlatformID.MacOSX)
+ url = Resources.url_check_latest_version_mac;
+ else if (System.Environment.OSVersion.Platform == PlatformID.Unix)
+ url = Resources.url_check_latest_version_linux;
+
Uri uri = new Uri(url);
last_update_check = DateTime.Now;
String result;
@@ -1146,14 +1151,20 @@ private void checkForProgramUpdates()
return;
}
- if (result.Length == 7 && result != xbs_settings.xbslink_version)
+ if (result.Length == 7)
{
- DialogResult res = MessageBox.Show("A new version of XBSlink is available! (v" + result + ")" + Environment.NewLine + "Would you like to visit the homepage now?", "XBSlink update available", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
- if (res == DialogResult.Yes)
- System.Diagnostics.Process.Start(Resources.url_xbslink_website);
+ int new_version_found = result.CompareTo(xbs_settings.xbslink_version);
+ if (new_version_found > 0)
+ {
+ DialogResult res = MessageBox.Show("A new version of XBSlink is available! (v" + result + ")" + Environment.NewLine + "Would you like to visit the homepage now?", "XBSlink update available", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
+ if (res == DialogResult.Yes)
+ System.Diagnostics.Process.Start(Resources.url_xbslink_website);
+ }
+ else if (new_version_found < 0)
+ addMessage("Latest XBSlink version found: v" + result);
+ else
+ addMessage("You are using the latest XBSlink version.");
}
- else
- addMessage("You are using the latest XBSlink version.");
}
private void checkForProgramUpdatesAsync()
View
18 XBSlink/Properties/Resources.Designer.cs
@@ -145,6 +145,24 @@ internal class Resources {
}
/// <summary>
+ /// Sucht eine lokalisierte Zeichenfolge, die http://www.secudb.de/~seuffert/xbslink/latest_xbslink_version_linux ähnelt.
+ /// </summary>
+ internal static string url_check_latest_version_linux {
+ get {
+ return ResourceManager.GetString("url_check_latest_version_linux", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Sucht eine lokalisierte Zeichenfolge, die http://www.secudb.de/~seuffert/xbslink/latest_xbslink_version_mac ähnelt.
+ /// </summary>
+ internal static string url_check_latest_version_mac {
+ get {
+ return ResourceManager.GetString("url_check_latest_version_mac", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.secudb.de/~seuffert/xbslink/ ähnelt.
/// </summary>
internal static string url_xbslink_website {
View
6 XBSlink/Properties/Resources.resx
@@ -158,4 +158,10 @@ This problem occurs if the user has not enough rights to use the pcap library. P
For more information see &lt;http://www.secudb.de/~seuffert/xbslink/faq#question-2&gt;</value>
</data>
+ <data name="url_check_latest_version_linux" xml:space="preserve">
+ <value>http://www.secudb.de/~seuffert/xbslink/latest_xbslink_version_linux</value>
+ </data>
+ <data name="url_check_latest_version_mac" xml:space="preserve">
+ <value>http://www.secudb.de/~seuffert/xbslink/latest_xbslink_version_mac</value>
+ </data>
</root>
Please sign in to comment.
Something went wrong with that request. Please try again.