This might be of some help. GitHub - GaryCousins/Arduino-Interface: Graphical test interface
I wrote it a few days ago, it's a bit scrappy but does the job I needed. It's probably not quite what you need but has a full Serial Interface and the corresponding Arduino test code so should give you some pointers.
Gary Cousins