コード例 #1
0
        private void InfoObservable_HandlePokeStopInfoUpdate(POGOProtos.Map.Fort.FortData pokeStop, string info)
        {
            Invoke(new MethodInvoker(() => {
                try {
                    if (_pokeStopsMarks.ContainsKey(pokeStop.Id))
                    {
                        //changeType
                        var bmp = Properties.MapData.visited_pokestop;
                        if (pokeStop.ActiveFortModifier.Count > 0)
                        {
                            bmp = Properties.MapData.visited_lured_pokestop;
                        }
                        var newMark = new GMarkerGoogle(_pokeStopsMarks[pokeStop.Id].Position, bmp);

                        newMark.ToolTipText  = info;
                        newMark.ToolTip.Font = new System.Drawing.Font("Arial", 12, System.Drawing.GraphicsUnit.Pixel);
                        try {
                            _pokeStopsOverlay.Markers[_pokeStopsOverlay.Markers.IndexOf(_pokeStopsMarks[pokeStop.Id])] = newMark;
                        } catch (Exception e) {
                            Logger.ColoredConsoleWrite(ConsoleColor.DarkRed, "Ignore this: sending exception information to log file.");
                            Logger.AddLog(string.Format("Error in HandlePokeStopInfoUpdate: {0}", e.ToString()));
                        }
                        _pokeStopsMarks[pokeStop.Id] = newMark;
                    }
                } catch (Exception e) {
                    Logger.ColoredConsoleWrite(ConsoleColor.DarkRed, "Ignore this: sending exception information to log file.");
                    Logger.AddLog(string.Format("Error in HandlePokeStopInfoUpdate: {0}", e.ToString()));
                }
            }));
        }
コード例 #2
0
 private void InfoObservable_HandlePokeStopInfoUpdate(POGOProtos.Map.Fort.FortData pokeStop, string info)
 {
     InfoObservable_HandlePokeStop(pokeStop, true, info);
 }