Sub Activity_KeyPress (KeyCode As Int) As Boolean
Select KeyCode
Case KeyCodes.KEYCODE_BACK
If ListFile="" Then
Msgbox2Async("Möchten Sie die App beenden?", "App beenden", "Ja", "", "Nein", Null,False)
Wait For Msgbox_Result (Result As Int)
If Result = DialogResponse.NEGATIVE Then
CallSubDelayed(Me, "codewahl")
End If
Else
Msgbox2Async("Möchten Sie die App beenden?", "App beenden", "Ja", "neue Liste", "Nein", Null,False)
Wait For Msgbox_Result (Result As Int)
If Result = DialogResponse.NEGATIVE Then
CallSubDelayed(Me, "codewahl")
else If Result = DialogResponse.CANCEL Then
ListFile=""
CallSubDelayed(Me, "turnierwahl")
End If
End If
End Select
End Sub