Are there any ways to make the PASSING of tasks (not completion) caused from another task?
for (int i = 0; i < count; i++) { await Task.Run(() => FullReg()); await Task.Delay(5000); if (checkBox1.Checked) { if (i % proxyswitch == 0 && i != 0) { //Task.WaitAll(); -- ТУТ ДОЛЖНА БЫТЬ ПРИОСТАНОВКА ВСЕХ ТАСКОВ System.Diagnostics.Process.Start(@"C:\Program Files (x86)\HMA! Pro VPN\bin\HMA! Pro VPN.exe", "-changeip"); await Task.Delay(10000); } } } while(int.Parse(CountFailedAccLabel.Text) + int.Parse(CountFailedAccLabel.Text) != count) { await Task.Delay(proxyswitch*5000); await Task.Run(() => ChangeIPHMAButton_Click(sender, e)); await Task.Delay(10000); //System.Diagnostics.Process.Start(@"C:\Program Files (x86)\HMA! Pro VPN\bin\HMA! Pro VPN.exe", "-changeip"); }