private void startButton_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtwords.Text)) { CountWordsLine(); EnableAndDisable(false); if (isTimer.Checked == true) { if (countpanel.Visible == false) { countpanel.Show(); } timer2.Start(); } else { SendInterval.Start(); } } else { MessageBox.Show("Null"); } }
private async void timer2_Tick(object sender, EventArgs e) { startcount++; int x = Convert.ToInt32(lblcount.Text); x--; lblcount.Text = x.ToString(); if (startcount == timercount) { timer2.Stop(); startcount = 0; lblcount.Text = timercount.ToString(); await Runnnnn(); await Task.Delay(200); SendInterval.Start(); } }