update ui
fix waveform display, modify DrawGrid()