def registerStopClick(a, cont):
    pauseBtn = cont.getChildAt([(app.ui.width - 100), 0])
    stopBtn = cont.getChildAt([(app.ui.width - 50), 0])
    if (a.thread.stop or a.thread.firstRun):
        a.activate()
        stopBtn.textComponent.text = 'Stop'
        stopBtn.refresh()
        pauseBtn.textComponent.text = 'Pause'
        pauseBtn.refresh()
    else:
        a.deactivate(False)
        stopBtn.textComponent.text = 'Start'
        stopBtn.refresh()
        pauseBtn.textComponent.text = ' - '
        pauseBtn.refresh()
def registerStopClick(a, cont):
    pauseBtn = cont.getChildAt([(app.ui.width - 100), 0])
    stopBtn = cont.getChildAt([(app.ui.width - 50), 0])
    if (a.thread.stop or a.thread.firstRun):
        a.activate()
        stopBtn.textComponent.text = 'Stop'
        stopBtn.refresh()
        pauseBtn.textComponent.text = 'Pause'
        pauseBtn.refresh()
    else:
        a.deactivate(False)
        stopBtn.textComponent.text = 'Start'
        stopBtn.refresh()
        pauseBtn.textComponent.text = ' - '
        pauseBtn.refresh()