new version
Add lots of comments.
Add three button on the GUI: display chart,hide chart,Exit
Thread still have some problems.