Work on the Unit Conversion Engine continues

My son, Mark, was home from Uni this week and so we put him to work on the new Unit Conversion Engine.

So we managed to get quite a few Measurement Types converted (no pun intended) across. Rather than as in ESBPCS where we have collections of routines, some of which were then accessed in non-visual components, our new approach is a class-based one. Internally, each Class is storing the value in the associated SI Unit – and then the Value can be set and accessed in various units for the given Measurement Types.

Now you do have to create these new Measurement Classes (rather than a “Static” approach), because the unit names are being stored in a Generic Dictionary. In ESBPCS, we had different String Units – so if you wanted to switch from English International to English US (so as to switch from “metres” to “meters”), you swapped the language file and rebuilt ESBPCS (and the ESBPCS Installer made this easier). By using this Dictionary Approach, you can now have available all the Language options – and via events even set up custom strings (or just replace one you don’t like).

But wait there’s more – we are also adding Unit Abbreviations 🙂

Plus we adding Unit Testing for each unit type (that is measurement unit) – and so are ending up with a much more robust engine, that will make expanding it easier.

About esbglenn

Software Developer working at our Family owned business, ESB Consultancy, which is located in Kalgoorlie-Boulder, in the Eastern Goldfields of Western Australia.
This entry was posted in Beta Development and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.