Skip to content

Commit

Permalink
Change update checker and bring back to .net 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeroday committed Aug 26, 2013
1 parent 994e4ef commit 580e4d6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Spotify/EZBlocker.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<AssemblyName>EZBlocker</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
Expand Down Expand Up @@ -80,7 +80,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
Expand Down
4 changes: 2 additions & 2 deletions Spotify/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Public Class Form1
Private Sub checkUpdate()
Try
Dim latest As String = GetPage("http://www.ericzhang.me/dl/?file=EZBlocker-version.txt", "EZBlocker " & My.Application.Info.Version.ToString & " " & My.Computer.Info.OSFullName) 'Query for latest version
If Double.Parse(latest) > Double.Parse(My.Application.Info.Version.ToString.Substring(0, 3)) Then
If Double.Parse(latest) > Double.Parse(My.Application.Info.Version.ToString.Replace(".", "")) Then
If MessageBox.Show("Your EZBlocker is out of date. Would you like to upgrade?", "EZBlocker", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) = vbYes Then
Process.Start(website)
Me.Close()
Expand Down Expand Up @@ -125,7 +125,7 @@ Public Class Form1
Private Function Check() As Boolean ' Check to see if an ad is playing and add to block list
If autoAdd Then
Try
Dim rArtist As String = GetPage("http://ws.spotify.com/search/1/artist?q=" & HttpUtility.UrlEncode(artist), "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0)") 'Query server for artist
Dim rArtist As String = GetPage("http://ws.spotify.com/search/1/artist?q=" & artist, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0)") 'Query server for artist
Using reader As XmlReader = XmlReader.Create(New StringReader(rArtist))
reader.ReadToFollowing("opensearch:totalResults") 'Get number of results
If reader.ReadElementContentAsInt() = 0 Then '0 results = ad
Expand Down
4 changes: 2 additions & 2 deletions Spotify/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.1.0.0")>
<Assembly: AssemblyFileVersion("1.1.0.0")>
<Assembly: AssemblyVersion("1.1.1.0")>
<Assembly: AssemblyFileVersion("1.1.1.0")>
2 changes: 1 addition & 1 deletion Spotify/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>

0 comments on commit 580e4d6

Please # to comment.