private void Button_Click(object sender, RoutedEventArgs e) { Resultado.Text = a.proximo().ToString(); string texto = ""; foreach (int i in a.Sorteados()) { texto = texto + i.ToString() + " - "; } Sorteados.Text = texto; }
private void SortearClick(object sender, RoutedEventArgs e) { int n = b.Proximo(); if (n == -1) { txtNum.Text = "FIM!"; btnIniciar.IsEnabled = true; btnSortear.IsEnabled = false; } else { txtNum.Text = n.ToString(); txtNums.Text = ""; foreach (int i in b.Sorteados()) { txtNums.Text += (i + " - "); } } }