Sorry that I was not complete. To create / call the you can do following:Originally Posted by MD2000
So first check if you are on a street. If you are not you can create the class and run it. Note that it may be better (depending on your application) that the class is created beforehand and stay during lifetime of the program. For this reason the Execute method is separate.Code:int resolution = 5; int maxRadius = 40; MPPosInCircle posInCircle = new MPPosInCircle(resolution, maxRadius); posInCircle.OnPosition += PosInCirclePosition; posInCircle.Execute(Lat, Lon);
Working with event handler is in this case the same as sequential programming, however later it can be nececary to fire the event handler by posting messages or do it in separate thread. This way the program can pump messages while it is looping, but at this moment the application where I use this is running without UI so that's something for later (maybe soon).