Show nearby pokemons on map, fix map error

Brian [2016-08-17 16:22:47]
Show nearby pokemons on map, fix map error
Filename
PokemonGo.RocketBot.Logic/Event/PokemonsEncounterEvent.cs
PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj
PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs
PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs
PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs
PokemonGo.RocketBot.Window/Forms/MainForm.cs
PokemonGo.RocketBot.Window/Helpers/ResourceHelper.cs
PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj
diff --git a/PokemonGo.RocketBot.Logic/Event/PokemonsEncounterEvent.cs b/PokemonGo.RocketBot.Logic/Event/PokemonsEncounterEvent.cs
new file mode 100644
index 0000000..6af0c6c
--- /dev/null
+++ b/PokemonGo.RocketBot.Logic/Event/PokemonsEncounterEvent.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using POGOProtos.Data;
+using POGOProtos.Map.Pokemon;
+
+namespace PokemonGo.RocketBot.Logic.Event
+{
+    public class PokemonsEncounterEvent : IEvent
+    {
+        public List<MapPokemon> EncounterPokemons;
+    }
+}
diff --git a/PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj b/PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj
index 525714a..77c08a2 100644
--- a/PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj
+++ b/PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj
@@ -115,6 +115,7 @@
     <Compile Include="Event\LootPokestopEvent.cs" />
     <Compile Include="Event\NoPokeballEvent.cs" />
     <Compile Include="Event\OptimizeRouteEvent.cs" />
+    <Compile Include="Event\PokemonsEncounterEvent.cs" />
     <Compile Include="Event\SnipeEvent.cs" />
     <Compile Include="Event\SnipeModeEvent.cs" />
     <Compile Include="Event\PokemonListEvent.cs" />
diff --git a/PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs
index 2abbab2..a8ab015 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs
@@ -9,18 +9,21 @@ using PokemonGo.RocketBot.Logic.State;
 using PokemonGo.RocketBot.Logic.Utils;
 using POGOProtos.Map.Pokemon;
 using POGOProtos.Networking.Responses;
+using System.Collections.Generic;

 #endregion

 namespace PokemonGo.RocketBot.Logic.Tasks
 {
+    public delegate void PokemonsEncounterDelegate(List<MapPokemon> pokemons);
+
     public static class CatchIncensePokemonsTask
     {
         public static async Task Execute(ISession session, CancellationToken cancellationToken)
         {
             cancellationToken.ThrowIfCancellationRequested();
             if (!session.LogicSettings.CatchPokemon) return;
-
+
             Logger.Write(session.Translation.GetTranslation(TranslationString.LookingForIncensePokemon), LogLevel.Debug);

             var incensePokemon = await session.Client.Map.GetIncensePokemons();
@@ -36,8 +39,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
                     SpawnPointId = incensePokemon.EncounterLocation
                 };

-                if( ( session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains( pokemon.PokemonId ) ) ||
-                    ( session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains( pokemon.PokemonId ) ) )
+                OnPokemonEncounterEvent(new List<MapPokemon> { pokemon });
+                if ((session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains(pokemon.PokemonId)) ||
+                    (session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains(pokemon.PokemonId)))
                 {
                     Logger.Write(session.Translation.GetTranslation(TranslationString.PokemonIgnoreFilter,
                         session.Translation.GetPokemonTranslation(pokemon.PokemonId)));
@@ -50,7 +54,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks

                     var encounter =
                         await
-                            session.Client.Encounter.EncounterIncensePokemon((ulong) pokemon.EncounterId,
+                            session.Client.Encounter.EncounterIncensePokemon((ulong)pokemon.EncounterId,
                                 pokemon.SpawnPointId);

                     if (encounter.Result == IncenseEncounterResponse.Types.Result.IncenseEncounterSuccess && session.LogicSettings.CatchPokemon)
@@ -65,7 +69,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
                             {
                                 Message = session.Translation.GetTranslation(TranslationString.InvFullTransferring)
                             });
-                            await  TransferDuplicatePokemonTask.Execute(session, cancellationToken);
+                            await TransferDuplicatePokemonTask.Execute(session, cancellationToken);
                         }
                         else
                             session.EventDispatcher.Send(new WarnEvent
@@ -84,5 +88,13 @@ namespace PokemonGo.RocketBot.Logic.Tasks
                 }
             }
         }
+
+        public static event PokemonsEncounterDelegate PokemonEncounterEvent;
+
+        private static void OnPokemonEncounterEvent(List<MapPokemon> pokemons)
+        {
+            PokemonEncounterEvent?.Invoke(pokemons);
+        }
     }
+
 }
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs
index d87a449..a258803 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs
@@ -8,6 +8,7 @@ using PokemonGo.RocketBot.Logic.Logging;
 using PokemonGo.RocketBot.Logic.State;
 using POGOProtos.Map.Fort;
 using POGOProtos.Networking.Responses;
+using POGOProtos.Map.Pokemon;

 #endregion

@@ -25,8 +26,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
             var fortId = currentFortData.Id;

             var pokemonId = currentFortData.LureInfo.ActivePokemonId;
-
-            if( ( session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains( pokemonId ) ) ||
+
+            if ( ( session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains( pokemonId ) ) ||
                     ( session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains( pokemonId ) ) )
             {
                 session.EventDispatcher.Send(new NoticeEvent
diff --git a/PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs
index 16a267a..eda5c2f 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs
@@ -11,6 +11,7 @@ using PokemonGo.RocketBot.Logic.Utils;
 using POGOProtos.Inventory.Item;
 using POGOProtos.Map.Pokemon;
 using POGOProtos.Networking.Responses;
+using System.Collections.Generic;

 #endregion

@@ -18,6 +19,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
 {
     public static class CatchNearbyPokemonsTask
     {
+        public delegate void PokemonsEncounterDelegate(List<MapPokemon> pokemons);
+
         public static async Task Execute(ISession session, CancellationToken cancellationToken)
         {
             cancellationToken.ThrowIfCancellationRequested();
@@ -26,6 +29,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
             Logger.Write(session.Translation.GetTranslation(TranslationString.LookingForPokemon), LogLevel.Debug);

             var pokemons = await GetNearbyPokemons(session);
+            OnPokemonEncounterEvent(pokemons.ToList());
             foreach (var pokemon in pokemons)
             {
                 cancellationToken.ThrowIfCancellationRequested();
@@ -49,8 +53,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
                     return;
                 }

-                if( ( session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains( pokemon.PokemonId ) ) ||
-                    ( session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains( pokemon.PokemonId ) ) )
+                if ((session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains(pokemon.PokemonId)) ||
+                    (session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains(pokemon.PokemonId)))
                 {
                     Logger.Write(session.Translation.GetTranslation(TranslationString.PokemonSkipped, session.Translation.GetPokemonTranslation(pokemon.PokemonId)));
                     continue;
@@ -113,5 +117,12 @@ namespace PokemonGo.RocketBot.Logic.Tasks

             return pokemons;
         }
+
+        public static event PokemonsEncounterDelegate PokemonEncounterEvent;
+
+        private static void OnPokemonEncounterEvent(List<MapPokemon> pokemons)
+        {
+            PokemonEncounterEvent?.Invoke(pokemons);
+        }
     }
 }
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Window/Forms/MainForm.cs b/PokemonGo.RocketBot.Window/Forms/MainForm.cs
index 8fdd318..0377788 100644
--- a/PokemonGo.RocketBot.Window/Forms/MainForm.cs
+++ b/PokemonGo.RocketBot.Window/Forms/MainForm.cs
@@ -34,6 +34,7 @@ using POGOProtos.Data;
 using POGOProtos.Inventory;
 using POGOProtos.Inventory.Item;
 using POGOProtos.Map.Fort;
+using POGOProtos.Map.Pokemon;
 using POGOProtos.Networking.Responses;

 namespace PokemonGo.RocketBot.Window.Forms
@@ -102,7 +103,7 @@ namespace PokemonGo.RocketBot.Window.Forms
             gMapControl1.Overlays.Add(_playerOverlay);

             _playerMarker = new GMapMarkerTrainer(new PointLatLng(lat, lng),
-                (Image) Properties.Resources.ResourceManager.GetObject("Trainer_Front"));
+                ResourceHelper.GetImage("Trainer_Front"));
             _playerOverlay.Markers.Add(_playerMarker);
             _playerMarker.Position = new PointLatLng(lat, lng);
             _searchAreaOverlay.Polygons.Clear();
@@ -193,17 +194,25 @@ namespace PokemonGo.RocketBot.Window.Forms
             Logger.SetLoggerContext(_session);

             _session.Navigation.UpdatePositionEvent +=
-                (lat, lng) => _session.EventDispatcher.Send(new UpdatePositionEvent {Latitude = lat, Longitude = lng});
+                (lat, lng) => _session.EventDispatcher.Send(new UpdatePositionEvent { Latitude = lat, Longitude = lng });
             _session.Navigation.UpdatePositionEvent += Navigation_UpdatePositionEvent;

             RouteOptimizeUtil.RouteOptimizeEvent +=
                 optimizedroute =>
-                    _session.EventDispatcher.Send(new OptimizeRouteEvent {OptimizedRoute = optimizedroute});
+                    _session.EventDispatcher.Send(new OptimizeRouteEvent { OptimizedRoute = optimizedroute });
             RouteOptimizeUtil.RouteOptimizeEvent += InitializePokestopsAndRoute;

             FarmPokestopsTask.LootPokestopEvent +=
-                pokestop => _session.EventDispatcher.Send(new LootPokestopEvent {Pokestop = pokestop});
+                pokestop => _session.EventDispatcher.Send(new LootPokestopEvent { Pokestop = pokestop });
             FarmPokestopsTask.LootPokestopEvent += UpdateMap;
+
+            CatchNearbyPokemonsTask.PokemonEncounterEvent +=
+                mappokemons => _session.EventDispatcher.Send(new PokemonsEncounterEvent { EncounterPokemons = mappokemons });
+            CatchNearbyPokemonsTask.PokemonEncounterEvent += UpdateMap;
+
+            CatchIncensePokemonsTask.PokemonEncounterEvent +=
+                mappokemons => _session.EventDispatcher.Send(new PokemonsEncounterEvent { EncounterPokemons = mappokemons });
+            CatchIncensePokemonsTask.PokemonEncounterEvent += UpdateMap;
         }

         private async Task StartBot()
@@ -228,71 +237,95 @@ namespace PokemonGo.RocketBot.Window.Forms
                 _pokestopsOverlay.Routes.Clear();
                 _playerOverlay.Markers.Clear();
                 _playerOverlay.Routes.Clear();
+                _playerLocations.Clear();
                 var routePoint =
                     (from pokeStop in pokeStops
-                        where pokeStop != null
-                        select new PointLatLng(pokeStop.Latitude, pokeStop.Longitude)).ToList();
-                var route = new GMapRoute(routePoint, "Walking Path");
-                route.Stroke = new Pen(Color.FromArgb(128, 0, 179, 253), 4);
+                     where pokeStop != null
+                     select new PointLatLng(pokeStop.Latitude, pokeStop.Longitude)).ToList();
+
+                var route = new GMapRoute(routePoint, "Walking Path")
+                {
+                    Stroke = new Pen(Color.FromArgb(128, 0, 179, 253), 4)
+                };
                 _pokestopsOverlay.Routes.Add(route);

                 foreach (var pokeStop in pokeStops)
                 {
                     var pokeStopLoc = new PointLatLng(pokeStop.Latitude, pokeStop.Longitude);
                     var pokestopMarker = new GMapMarkerPokestops(pokeStopLoc,
-                        (Image) Properties.Resources.ResourceManager.GetObject("Pokestop"));
+                        ResourceHelper.GetImage("Pokestop"));
                     _pokestopsOverlay.Markers.Add(pokestopMarker);
                 }
             }, null);
         }

-        private void UpdateMap(FortData pokestop = null)
+        private void UpdateMap()
         {
             SynchronizationContext.Post(o =>
             {
-                if (pokestop != null)
+                var route = new GMapRoute(_playerLocations, "step")
                 {
-                    var pokeStopLoc = new PointLatLng(pokestop.Latitude, pokestop.Longitude);
+                    Stroke = new Pen(Color.FromArgb(175, 175, 175), 2) { DashStyle = DashStyle.Dot }
+                };
+                _playerOverlay.Routes.Clear();
+                _playerOverlay.Routes.Add(route);
+            }, null);
+        }
+
+        private void UpdateMap(FortData pokestop)
+        {
+            SynchronizationContext.Post(o =>
+            {
+                var pokeStopLoc = new PointLatLng(pokestop.Latitude, pokestop.Longitude);

-                    lock (_pokestopsOverlay.Markers)
+                lock (_pokestopsOverlay.Markers)
+                {
+                    for (var i = 0; i < _pokestopsOverlay.Markers.Count; i++)
                     {
-                        for (var i = 0; i < _pokestopsOverlay.Markers.Count; i++)
-                        {
-                            var marker = _pokestopsOverlay.Markers[i];
-                            if (marker.Position == pokeStopLoc)
-                                _pokestopsOverlay.Markers.Remove(marker);
-                        }
+                        var marker = _pokestopsOverlay.Markers[i];
+                        if (marker.Position == pokeStopLoc)
+                            _pokestopsOverlay.Markers.Remove(marker);
                     }
-
-                    GMapMarker pokestopMarker = new GMapMarkerPokestops(pokeStopLoc,
-                        (Image) Properties.Resources.ResourceManager.GetObject("Pokestop_looted"));
-                    //pokestopMarker.ToolTipMode = MarkerTooltipMode.OnMouseOver;
-                    //pokestopMarker.ToolTip = new GMapBaloonToolTip(pokestopMarker);
-                    _pokestopsOverlay.Markers.Add(pokestopMarker);
                 }

-                var route = new GMapRoute(_playerLocations, "step");
-                route.Stroke = new Pen(Color.FromArgb(175, 175, 175), 2);
-                route.Stroke.DashStyle = DashStyle.Dot;
-                _playerOverlay.Routes.Add(route);
-                _playerOverlay.Routes.Clear();
-                _playerOverlay.Routes.Add(route);
+                GMapMarker pokestopMarker = new GMapMarkerPokestops(pokeStopLoc,
+                    ResourceHelper.GetImage("Pokestop_looted"));
+                //pokestopMarker.ToolTipMode = MarkerTooltipMode.OnMouseOver;
+                //pokestopMarker.ToolTip = new GMapBaloonToolTip(pokestopMarker);
+                _pokestopsOverlay.Markers.Add(pokestopMarker);
+            }, null);
+        }
+
+        private void UpdateMap(List<MapPokemon> encounterPokemons)
+        {
+            SynchronizationContext.Post(o =>
+            {
+                _pokemonsOverlay.Markers.Clear();
+
+                foreach (var pokemon in encounterPokemons)
+                {
+                    Image pkmImage = ResourceHelper.GetImage("Pokemon_" + pokemon.PokemonId.GetHashCode(), 50, 50);
+                    PointLatLng pointLatLng = new PointLatLng(pokemon.Latitude, pokemon.Longitude);
+                    GMapMarker pkmMarker = new GMapMarkerTrainer(pointLatLng, pkmImage);
+                    _pokemonsOverlay.Markers.Add(pkmMarker);
+                }
             }, null);
         }

         private void Navigation_UpdatePositionEvent(double lat, double lng)
         {
             var latlng = new PointLatLng(lat, lng);
-            _playerLocations.Add(latlng);
-
-            _playerOverlay.Markers.Remove(_playerMarker);
-            if (!_currentLatLng.IsEmpty)
-                _playerMarker = _currentLatLng.Lng < latlng.Lng
-                    ? new GMapMarkerTrainer(latlng,
-                        (Image) Properties.Resources.ResourceManager.GetObject("Trainer_Right"))
-                    : new GMapMarkerTrainer(latlng,
-                        (Image) Properties.Resources.ResourceManager.GetObject("Trainer_Left"));
-            _playerOverlay.Markers.Add(_playerMarker);
+
+            SynchronizationContext.Post(o =>
+            {
+                _playerLocations.Add(latlng);
+                _playerOverlay.Markers.Remove(_playerMarker);
+                if (!_currentLatLng.IsEmpty)
+                    _playerMarker = _currentLatLng.Lng < latlng.Lng
+                        ? new GMapMarkerTrainer(latlng, ResourceHelper.GetImage("Trainer_Right"))
+                        : new GMapMarkerTrainer(latlng, ResourceHelper.GetImage("Trainer_Left"));
+                _playerOverlay.Markers.Add(_playerMarker);
+            }, null);

             _currentLatLng = latlng;
             UpdateMap();
@@ -408,20 +441,20 @@ namespace PokemonGo.RocketBot.Window.Forms
         {
             //olvPokemonList.ButtonClick += PokemonListButton_Click;

-            pkmnName.ImageGetter = delegate(object rowObject)
+            pkmnName.ImageGetter = delegate (object rowObject)
             {
                 var pokemon = rowObject as PokemonObject;

                 var key = pokemon.PokemonId.ToString();
                 if (!olvPokemonList.SmallImageList.Images.ContainsKey(key))
                 {
-                    var img = GetPokemonImage((int) pokemon.PokemonId);
+                    var img = GetPokemonImage((int)pokemon.PokemonId);
                     olvPokemonList.SmallImageList.Images.Add(key, img);
                 }
                 return key;
             };

-            olvPokemonList.FormatRow += delegate(object sender, FormatRowEventArgs e)
+            olvPokemonList.FormatRow += delegate (object sender, FormatRowEventArgs e)
             {
                 var pok = e.Model as PokemonObject;
                 if (olvPokemonList.Objects.Cast<PokemonObject>()
@@ -439,7 +472,7 @@ namespace PokemonGo.RocketBot.Window.Forms
                 }
             };

-            cmsPokemonList.Opening += delegate(object sender, CancelEventArgs e)
+            cmsPokemonList.Opening += delegate (object sender, CancelEventArgs e)
             {
                 e.Cancel = false;
                 cmsPokemonList.Items.Clear();
@@ -695,7 +728,7 @@ namespace PokemonGo.RocketBot.Window.Forms

         private Image GetPokemonImage(int pokemonId)
         {
-            return (Image) Properties.Resources.ResourceManager.GetObject("Pokemon_" + pokemonId);
+            return ResourceHelper.GetImage("Pokemon_" + pokemonId);
         }

         private async Task ReloadPokemonList()
@@ -740,7 +773,7 @@ namespace PokemonGo.RocketBot.Window.Forms
                 {
                     var pokemonObject = new PokemonObject(pokemon);
                     var family =
-                        _families.Where(i => (int) i.FamilyId <= (int) pokemon.PokemonId)
+                        _families.Where(i => (int)i.FamilyId <= (int)pokemon.PokemonId)
                             .First();
                     pokemonObject.Candy = family.Candy_;
                     pokemonObjects.Add(pokemonObject);
@@ -794,7 +827,7 @@ namespace PokemonGo.RocketBot.Window.Forms

         private async void ItemBox_ItemClick(object sender, EventArgs e)
         {
-            var item = (ItemData) sender;
+            var item = (ItemData)sender;

             using (var form = new ItemForm(item))
             {
diff --git a/PokemonGo.RocketBot.Window/Helpers/ResourceHelper.cs b/PokemonGo.RocketBot.Window/Helpers/ResourceHelper.cs
new file mode 100644
index 0000000..e976e5a
--- /dev/null
+++ b/PokemonGo.RocketBot.Window/Helpers/ResourceHelper.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PokemonGo.RocketBot.Window.Helpers
+{
+    public class ResourceHelper
+    {
+        public static Image GetImage(string name)
+        {
+            return (Image)Properties.Resources.ResourceManager.GetObject(name);
+        }
+
+        public static Image GetImage(string name, int maxHeight, int maxWidth)
+        {
+            Image image = GetImage(name);
+            var ratioX = (double)maxWidth / image.Width;
+            var ratioY = (double)maxHeight / image.Height;
+            var ratio = Math.Min(ratioX, ratioY);
+
+            var newWidth = (int)(image.Width * ratio);
+            var newHeight = (int)(image.Height * ratio);
+
+            var newImage = new Bitmap(newWidth, newHeight);
+
+            using (var graphics = Graphics.FromImage(newImage))
+                graphics.DrawImage(image, 0, 0, newWidth, newHeight);
+
+            return newImage;
+        }
+    }
+}
diff --git a/PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj b/PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj
index c80a31c..8eb59ad 100644
--- a/PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj
+++ b/PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj
@@ -149,6 +149,7 @@
     <Compile Include="Forms\MainForm.designer.cs">
       <DependentUpon>MainForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="Helpers\ResourceHelper.cs" />
     <Compile Include="Helpers\S2GMapDrawer.cs" />
     <Compile Include="Models\GMapMarkerPokestops.cs" />
     <Compile Include="Models\GMapMarkerTrainer.cs" />
@@ -482,8 +483,6 @@
     <Content Include="Images\Pokemon\Pokemon_97.png" />
     <Content Include="Images\Pokemon\Pokemon_98.png" />
     <Content Include="Images\Pokemon\Pokemon_99.png" />
-    <None Include="Images\Pokestop_Inrange.png" />
-    <None Include="Images\Trainer.png" />
     <Content Include="Resources\encrypt.dll">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
You may download the files in Public Git.