C# DispatcherTimer will not update my labels

163 views Asked by At

I have four tabs at the top in WinForm.

If you click on "Fahrt", the DispatcherTimer is executed, continues to run normally in the background and the labels etc from the function are updated. However, if I click up a second, third ... time, he doesn't want to update the label etc anymore. He goes into the IF, I've already checked that, he just doesn't want to do the content with the labels etc anymore, which I can't quite understand.

DispatcherTimer

if (checkTelemetryDatas?.IsEnabled == true) return;
checkTelemetryDatas = new DispatcherTimer();
checkTelemetryDatas.Tick += new EventHandler(checkTelemetryDatasUpdater);
checkTelemetryDatas.Interval = new TimeSpan(0, 0, 0, 0, 1000);
checkTelemetryDatas.Start();

checkTelemetryDatasUpdater Function

https://pastebin.com/RV7rYtuP

I hope you can understand it as far as my English is not the best.

Glad to ask if something is missing. Thank you.

0

There are 0 answers