private void button_gen_Click(object sender, EventArgs e) { textBox_bs.Clear(); textBox_qs.Clear(); textBox_as.Clear(); sb_b.Clear(); sb_q.Clear(); sb_a.Clear(); pocet = 0; label_cas_bs.Text = ""; label_cas_qs.Text = ""; label_cas_as.Text = ""; Random generator = new Random(); try { if (textBox_gen.Text == "") { MessageBox.Show("Musíte zadat číslo!", "Upozornění", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); textBox_gen.Focus(); return; } else { pocet = Convert.ToInt32(textBox_gen.Text); if (pocet > 100000) { MessageBox.Show("Zadejte číslo do 100000!","Varování",MessageBoxButtons.OK,MessageBoxIcon.Warning); textBox_gen.Text = ""; textBox_gen.Focus(); return; } else { for(int i=0; i