Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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 + " - ");
                }
            }
        }