Update Check on Startup should now work correct
Update Check on Startup should now work correct
diff --git a/PokemonGo.RocketAPI.Logic/PokemonGo.RocketAPI.Logic.csproj b/PokemonGo.RocketAPI.Logic/PokemonGo.RocketAPI.Logic.csproj
index 5602b0d..ee5a957 100644
--- a/PokemonGo.RocketAPI.Logic/PokemonGo.RocketAPI.Logic.csproj
+++ b/PokemonGo.RocketAPI.Logic/PokemonGo.RocketAPI.Logic.csproj
@@ -54,7 +54,6 @@
<Compile Include="Logic.cs" />
<Compile Include="Navigation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Utils\Git.cs" />
<Compile Include="Utils\LocationUtils.cs" />
<Compile Include="Utils\Statistics.cs" />
<Compile Include="Utils\StringUtils.cs" />
diff --git a/PokemonGo.RocketAPI.Logic/Utils/Git.cs b/PokemonGo.RocketAPI.Logic/Utils/Git.cs
deleted file mode 100644
index c971241..0000000
--- a/PokemonGo.RocketAPI.Logic/Utils/Git.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-#region
-
-using System;
-using System.Net;
-using System.Reflection;
-using System.Text.RegularExpressions;
-using System.Threading;
-
-#endregion
-
-
-namespace PokemonGo.RocketAPI.Helpers
-{
- public static class Git
- {
- public static void CheckVersion()
- {
- try
- {
- var match =
- new Regex(
- @"\[assembly\: AssemblyVersion\(""(\d{1,})\.(\d{1,})\.(\d{1,})\.(\d{1,})""\)\]")
- .Match(DownloadServerVersion());
-
- if (!match.Success) return;
- var gitVersion =
- new Version(
- $"{match.Groups[1]}.{match.Groups[2]}.{match.Groups[3]}.{match.Groups[4]}");
- if (gitVersion <= Assembly.GetExecutingAssembly().GetName().Version)
- {
- Logger.Normal(
- "Awesome! You have already got the newest version! " +
- Assembly.GetExecutingAssembly().GetName().Version);
- return;
- }
-
-
- Logger.Normal(
- "There is a new Version available: https://github.com/Spegeli/Pokemon-Go-Rocket-API");
- Thread.Sleep(1000);
- }
- catch (Exception)
- {
- // ignored
- }
- }
-
- private static string DownloadServerVersion()
- {
- //test
- using (var wC = new WebClient())
- return
- wC.DownloadString(
- "https://raw.githubusercontent.com/Spegeli/Pokemon-Go-Rocket-API/master/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs");
- }
- }
-}
\ No newline at end of file
diff --git a/PokemonGo.RocketAPI.Logic/Utils/Statistics.cs b/PokemonGo.RocketAPI.Logic/Utils/Statistics.cs
index fdfe4c0..38bdf06 100644
--- a/PokemonGo.RocketAPI.Logic/Utils/Statistics.cs
+++ b/PokemonGo.RocketAPI.Logic/Utils/Statistics.cs
@@ -82,7 +82,7 @@ namespace PokemonGo.RocketAPI.Logic.Utils
public override string ToString()
{
- return string.Format("SessionRuntime {0} - LvL: {1:0} | EXP/H: {2:0.0} | P/H: {3:0.0} | Stardust: {4:0} | Pokemon Transfered: {5:0} | Items Removed: {6:0}", _getSessionRuntimeInTimeFormat(), _currentLevelInfos, _totalExperience / _getSessionRuntime(), _totalPokemons / _getSessionRuntime(), _totalStardust, _totalPokemonsTransfered, _totalItemsRemoved);
+ return string.Format("SessionRuntime {0} - LvL: {1:0} | EXP/H: {2:0} | P/H: {3:0} | Stardust: {4:0} | Pokemon Transfered: {5:0} | Items Removed: {6:0}", _getSessionRuntimeInTimeFormat(), _currentLevelInfos, _totalExperience / _getSessionRuntime(), _totalPokemons / _getSessionRuntime(), _totalStardust, _totalPokemonsTransfered, _totalItemsRemoved);
}
public static int GetXpDiff(int level)
diff --git a/PokemonGo.RocketAPI/Helpers/Git.cs b/PokemonGo.RocketAPI/Helpers/Git.cs
index c971241..c2340e0 100644
--- a/PokemonGo.RocketAPI/Helpers/Git.cs
+++ b/PokemonGo.RocketAPI/Helpers/Git.cs
@@ -34,9 +34,7 @@ namespace PokemonGo.RocketAPI.Helpers
return;
}
-
- Logger.Normal(
- "There is a new Version available: https://github.com/Spegeli/Pokemon-Go-Rocket-API");
+ Logger.Normal(ConsoleColor.DarkGreen, "TThere is a new Version available: https://github.com/Spegeli/Pokemon-Go-Rocket-API");
Thread.Sleep(1000);
}
catch (Exception)
diff --git a/PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj b/PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj
index 336d091..41e5d8a 100644
--- a/PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj
+++ b/PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj
@@ -17,7 +17,7 @@
<UpdateAssemblyInfoVersion>False</UpdateAssemblyInfoVersion>
<AssemblyVersionSettings>YearStamp.MonthStamp.DayStamp.Increment</AssemblyVersionSettings>
<PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
- <AssemblyVersion>2016.7.23.115</AssemblyVersion>
+ <AssemblyVersion>2016.7.23.121</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
diff --git a/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs b/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs
index fcd0c16..212d2d5 100644
--- a/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs
+++ b/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2016.7.23.116")]
+[assembly: AssemblyVersion("2016.7.23.121")]
[assembly: AssemblyFileVersion("1.0.0.0")]
You may download the files in Public Git.