From 108ea74349520e80779c5a7be5c7b70aed600fac Mon Sep 17 00:00:00 2001 From: SilentSys Date: Sun, 27 Sep 2015 08:27:43 -0700 Subject: [PATCH] v1.1.1 Quick fix for the error that some people get on start. --- SLAM/Form1.vb | 28 ++++++++++++++++------------ SLAM/My Project/AssemblyInfo.vb | 4 ++-- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/SLAM/Form1.vb b/SLAM/Form1.vb index e108489..fd1b1be 100644 --- a/SLAM/Form1.vb +++ b/SLAM/Form1.vb @@ -545,22 +545,26 @@ Public Class Form1 End Sub Private Async Function CheckForUpdate() As Task - Dim UpdateText As String + Try + Dim UpdateText As String - Using client As New HttpClient - Dim UpdateTextTask As Task(Of String) = client.GetStringAsync("http://slam.flankers.net/updates.php") - UpdateText = Await UpdateTextTask - End Using + Using client As New HttpClient + Dim UpdateTextTask As Task(Of String) = client.GetStringAsync("http://slam.flankers.net/updates.php") + UpdateText = Await UpdateTextTask + End Using - Dim NewVersion As New Version("0.0.0.0") 'generic - Dim UpdateURL As String = UpdateText.Split()(1) - If Version.TryParse(UpdateText.Split()(0), NewVersion) Then - If My.Application.Info.Version.CompareTo(NewVersion) < 0 Then - If MessageBox.Show(String.Format("An update ({0}) is available! Click ""OK"" to be taken to the download page.", NewVersion.ToString), "SLAM Update", MessageBoxButtons.OKCancel) = Windows.Forms.DialogResult.OK Then - Process.Start(UpdateURL) + Dim NewVersion As New Version("0.0.0.0") 'generic + Dim UpdateURL As String = UpdateText.Split()(1) + If Version.TryParse(UpdateText.Split()(0), NewVersion) Then + If My.Application.Info.Version.CompareTo(NewVersion) < 0 Then + If MessageBox.Show(String.Format("An update ({0}) is available! Click ""OK"" to be taken to the download page.", NewVersion.ToString), "SLAM Update", MessageBoxButtons.OKCancel) = Windows.Forms.DialogResult.OK Then + Process.Start(UpdateURL) + End If End If End If - End If + Catch ex As Exception + + End Try End Function Private Sub PlayKeyButton_Click(sender As Object, e As EventArgs) Handles PlayKeyButton.Click diff --git a/SLAM/My Project/AssemblyInfo.vb b/SLAM/My Project/AssemblyInfo.vb index f48c95b..90c6b05 100644 --- a/SLAM/My Project/AssemblyInfo.vb +++ b/SLAM/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + +