Skip to content

Commit

Permalink
Merge pull request #150 from Dulb26/master
Browse files Browse the repository at this point in the history
Changed LoadDestinations to always convert with dots for decimals
  • Loading branch information
disdain13 authored Aug 31, 2016
2 parents 4446e2c + 937e5c0 commit 3d43711
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions PokeRoadie/PokeRoadieLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,12 @@ private async Task WriteStats()
Logger.Write($"50%-74%: {allPokemon.Where(x => x.GetPerfection() > 49 && x.GetPerfection() < 75).Count()}", LogLevel.None, ConsoleColor.White);
Logger.Write($"75%-89%: {allPokemon.Where(x => x.GetPerfection() > 74 && x.GetPerfection() < 90).Count()}", LogLevel.None, ConsoleColor.White);
Logger.Write($"90%-100%: {allPokemon.Where(x => x.GetPerfection() > 89).Count()}", LogLevel.None, ConsoleColor.White);
Logger.Write("====== V ======", LogLevel.None, ConsoleColor.White);
Logger.Write($"< 100 Cp: {allPokemon.Where(x => x.CalculatePokemonValue() < 100).Count()}", LogLevel.None, ConsoleColor.White);
Logger.Write($"100-199 Cp: {allPokemon.Where(x => x.CalculatePokemonValue() >= 100 && x.CalculatePokemonValue() < 200).Count()}", LogLevel.None, ConsoleColor.White);
Logger.Write($"200-299 Cp: {allPokemon.Where(x => x.CalculatePokemonValue() >= 200 && x.CalculatePokemonValue() < 300).Count()}", LogLevel.None, ConsoleColor.White);
Logger.Write($"300-399 Cp: {allPokemon.Where(x => x.CalculatePokemonValue() >= 300 && x.CalculatePokemonValue() < 400).Count()}", LogLevel.None, ConsoleColor.White);
Logger.Write($"> 400 Cp: {allPokemon.Where(x => x.CalculatePokemonValue() >= 400).Count()}", LogLevel.None, ConsoleColor.White);
}

_nextWriteStatsTime = DateTime.Now.AddMinutes(_settings.DisplayRefreshMinutes);
Expand Down
7 changes: 4 additions & 3 deletions PokeRoadie/PokeRoadieSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
using System.Threading.Tasks;
Expand Down Expand Up @@ -1162,9 +1163,9 @@ private IList<LocationData> LoadDestinations()
{
try
{
double temp_lat = Convert.ToDouble(latlng[0]);
double temp_long = Convert.ToDouble(latlng[1]);
double temp_alt = Convert.ToDouble(latlng[2]);
double temp_lat = Convert.ToDouble(latlng[0], new CultureInfo("en-US"));
double temp_long = Convert.ToDouble(latlng[1], new CultureInfo("en-US"));
double temp_alt = Convert.ToDouble(latlng[2], new CultureInfo("en-US"));
if (temp_lat >= -90 && temp_lat <= 90 && temp_long >= -180 && temp_long <= 180)
{
//SetCoordinates(Convert.ToDouble(latlng[0]), Convert.ToDouble(latlng[1]), Settings.DefaultAltitude);
Expand Down

0 comments on commit 3d43711

Please sign in to comment.