There is a need to implement such a thing. It is necessary that in a parallel stream, for example, a message is sent every 5 seconds. Accordingly, whatever the application was working, and did not hang. I tried a whole bunch of the day, but I could not find anything, so that would work. Tried to do through the eternal cycle.
Here on this attempt, I stopped.
async Task send() { while(true) { Thread.Sleep(2000); Messages.Send(false, "ΠΎΠΊΠ΅ΠΉ", textBox.Text, null, null,false, null, null,"256" , null, null); } } private async void button_Click(object sender, RoutedEventArgs e) { await send(); }
I will be glad to any help.