Private Sub OnExtendedCB(ControlId As UInt, ControlType As Byte,ControlLabel As String, ControlValue As String, eventType As Int, userData As ULong)
If ControlType <> 20 Then
Main.SDlog(Array As String("ControlId=",ControlId," ControlType=",ControlType, " ControlLabel='",ControlLabel, "' ControlValue='",ControlValue, "' eventType=", eventType, " userData=",userData))
End If
timUpdate.Enabled = False
Select ControlType
Case UI.ControlTyp_Title '0
Case UI.ControlTyp_pad '1
Case UI.ControlTyp_PadWithCenter '2
Case UI.ControlTyp_Button '3
If userData = 7 Then setTimeCallback(ControlId, ControlType, ControlLabel, ControlValue, eventType, userData)
If userData = 11 Then getTimeCallback(ControlId, ControlType, ControlLabel, ControlValue, eventType, userData)
If userData = 19 Then paramCallback(ControlId, ControlType, ControlLabel, ControlValue, eventType, userData)
If userData = 100 And eventType = UI.CBEvent_B_DOWN Then saveTimeCallback 'save time
If userData = 101 And eventType = UI.CBEvent_B_UP Then saveFlugCallback 'save flug calib
If userData = 15 And eventType = UI.CBEvent_B_UP Then saveWiFiCallback
Case UI.ControlTyp_Label '4
Case UI.ControlTyp_Switcher '5
If userData = 103 Then APswitcherCallback(ControlId)
Case UI.ControlTyp_Slider '6
SlidersCallback(ControlId, ControlType, ControlLabel, ControlValue, eventType, userData)
Case UI.ControlTyp_Number '7
Case UI.ControlTyp_Text '8
If userData = 13 Then textCallback(ControlId, ControlType,ControlLabel, ControlValue, eventType, userData)
If userData = 14 Then textCallback(ControlId, ControlType,ControlLabel, ControlValue, eventType, userData)
End Select
timUpdate.Enabled = True
End Sub