Quantcast
Viewing all articles
Browse latest Browse all 2341

Updated Wiki: NotesVersion493

HERE IS SUMMARY OF IMPORTANT CHANGES IN VERSION 4.9.3. IT'S RECOMMENDED TO READ THIS BEFORE YOU START DEALING WITH THE NEW VERSION.
1. Application callback.
New GlobalSettings.ApplicationCallback property was added. Callback object assigned to this property intercepts errors in all MapWinGIS classes so there is no longer needed to assign GlobalCallback to individual instances. In some cases errors are reported to application callback ONLY so there is strong recommendation to use it in ANY MapWinGIS application, however small it may be. Here is the simplest implementation of callback in C#:

// simplest implementation of callbackpublicclass MyCallback : ICallback
{
    publicvoid Progress(string KeyOfSender, int Percent, string Message)
    {
        Debug.Print("{0}: {1}", Message, Percent);
    }
    publicvoid Error(string KeyOfSender, string ErrorMsg)
    {
        Debug.Print("MapWinGIS error: ", ErrorMsg);
    }
}

// let's assign this callback as early as possible during app's execution:var gs = new GlobalSettings();
gs.ApplicationCallback = new MyCallback();

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>