Blog programistyczny

Paweł Filipek

BackgroundWorker – loading in the background – example C#

BackgroundWorker – loading in the background – example C#

BackgroundWorker Thanks to this class, we can open the window(form) immediately and eg. all data can be loaded in the background. This is usefull becouse basic Windows application runs on a single thread and when we’ve got big list to load on this form. We have to wait until this list and all the othersWięcej oBackgroundWorker – loading in the background – example C#[…]

„Get out form smog” – display the station

„Get out form smog” – display the station

Get out from smog – part IX To view the location where user should go I need to return adress station in Json. So I have to edit my controller so that it returns json. Insead of return View i replaced:

And I also modified the script to display the address of this stationWięcej o„Get out form smog” – display the station[…]

„Get out form smog” – dependency injection

„Get out form smog” – dependency injection

Get out from smog – part V Today post will be about depencendy injection.And run all the written functions as a whole. Uses for this Autofac and Autofac.Mvc – to inject depencencies on the contollers. I created class to register depencencies.

We register the interface to a particular class and the ability to injectWięcej o„Get out form smog” – dependency injection[…]

„Get out from smog” – claculate the distance

„Get out from smog” – claculate the distance

Get out from smog – part IV As i mentioned in a previous post. I create a class that will be calculated the distance in kilometers between the measuring stations and a latitudes, longitudes. First we have to calculate distance in kilometers between latidute and longtidute points. Haversine formula In this example, I use HaversineWięcej o„Get out from smog” – claculate the distance[…]

„Get out from smog” – obtaining precise location

„Get out from smog” – obtaining precise location

Get out from smog – part III To measure the distance from the measuring station to current locaction of the user. Is required accurate data such as – latitude and logitude measurement station. Google provide useful api. I send a request to the address https://maps.googleapis.com/maps/api/geocode/json?address= and my adress station and api return me json withWięcej o„Get out from smog” – obtaining precise location[…]