Skip to content

Commit

Permalink
Fixed being able to navigate out of TruckersMP.com and ready for 0.0.…
Browse files Browse the repository at this point in the history
…0.1-Hotfix release!
  • Loading branch information
NarodGaming committed Apr 9, 2017
1 parent 96afe7c commit 802b74e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
Binary file modified TruckersMP Launcher/.vs/YART/v14/.suo
Binary file not shown.
18 changes: 8 additions & 10 deletions TruckersMP Launcher/TruckersMP Launcher/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Public Class Form1
checkversion.Headers.Add("Expries", "-1")
Dim versionresponse As String = checkversion.DownloadString("https://raw.githubusercontent.com/NarodGaming/narodtruckersmplauncher/master/Updates/currentver.txt?t=" + Date.Now.ToLocalTime) ' adds the date to prevent caching

If Not versionresponse = Application.ProductVersion Then ' if out of date
If Not versionresponse = Application.ProductVersion + "-Hotfix" Then ' if out of date
Dim wouldliketoupdate As MsgBoxResult = MsgBox("A new version is available, would you like to download it?", MsgBoxStyle.YesNo, "An update is available!") ' tells the user to update
If wouldliketoupdate = MsgBoxResult.Yes Then
Process.Start("https://github.com/NarodGaming/narodtruckersmplauncher/releases") ' opens download page
Expand All @@ -123,7 +123,7 @@ Public Class Form1
lbl_latest_launcher_ver.Text = "Latest Launcher Version: " + versionresponse
End If

lbl_launcher_ver.Text = "Launcher Version: " + Application.ProductVersion ' sets up product version
lbl_launcher_ver.Text = "Launcher Version: " + Application.ProductVersion + "-Hotfix" ' sets up product version

Try
Dim version As String = "https://api.truckersmp.com/v2/version" ' gets TruckersMP version
Expand Down Expand Up @@ -773,12 +773,10 @@ Public Class Form1
End Try
End Sub



'Private Sub news_Browser_Navigating(sender As Object, e As WebBrowserNavigatingEventArgs) Handles news_Browser.Navigating this doesnt work, needs fixing
'If Not e.Url.ToString.Contains("truckersmp.com") And NewsShown = True Then
'MsgBox("Whoops! You must stay on the TruckersMP site!", MsgBoxStyle.Exclamation, "Warning!")
'news_Browser.Navigate("https://truckersmp.com/blog")
'End If
'End Sub
Private Sub News_Browser_Navigation_Ended(sender As Object, e As EventArgs) Handles news_Browser.Navigated
If Not news_Browser.Url.ToString.Contains("truckersmp.com") And NewsShown = True Then
MsgBox("You must remain on the TruckersMP website!")
news_Browser.Navigate("https://truckersmp.com/blog")
End If
End Sub
End Class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Updates/currentver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.0.1
0.0.0.1-Hotfix

0 comments on commit 802b74e

Please sign in to comment.