OK - Tim & Chris,
Here is V2 - this is as good as it gets - need to move on to other things...!! :)
I am now VERY happy with it & I claim it has no bugs now & a great looking UI (for a development tool app)!
Made some serious changes:
1. Add an option to allow the Dial faceplate to be rendered in either white or black (black is now default - more beautiful!)
2. The "default" faceplate now appears immediately when app is launched (visually MUCH nicer/obvious).
3. Cleaned up the UI as much as possible (personally I like it & most users will use default values on UI).
4. The "Minimum Range" can now also be set to whatever one needs (before it was fixed at zero). This was tricky!
There are lots of needs for Gauges with negative min Range (eg: Vacuum vs. Pressure, RSSI Signal Strength, feet above/below Sea Level, etc)
5. When you click on the "Auto" button, it now moves the needle one UNIT at a time (as opposed to tick at a time).
6. Added a new "LongClck on Auto" feature which will move needle one Tick at a time (similar to Tick2Tick in Manual mode but Automatic).
7. Cleaned up the code a LOT. Seperated the "validation of input parameters" from the "drawing" of dial & pointer functions. So it is much easier now to understand (or "lift") the "gauge generator" code to include in other apps (as I need to do!), where the parameters by definition do not need to be validated. So that should make Tim happy as well!! :)
8. Fixed the "bugs" reported by Chris:
a) The "Auto" & "Manual (Tick2Tick)" modes will no longer go "out of min/max range" - even though that was not a bad thing IMHO!! :)
b) The needle should NEVER get "out of sync" (ie: NOT "on Tick") in "Manual (Tick2Tick)" mode (or when you LongClick on "Auto" button).
c) So the only way to get the meter to go a "little" out of Range is to use the "GoTo" button and enter an out of Range Value to "GoTo". If the value entered is too far out of range, it will be adjusted to no more than 2 Ticks below/above min/max range (this is how realworld meters behave when the needle doesn't have a mechanical stop (as some don't).
This was a LOT of fun! Of course I couldn't have done it without the help of BOTH of you - so thanks again!!!
Until the next time....! :)
In the meantime Enjoy....
Best Regards
Gerard