Beispiel #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Numeros n = new Numeros(int.Parse(txtI.Text),
                                    int.Parse(txtF.Text));

            list.ItemsSource =
                n.Calcular(cbP.IsChecked.Value, cbI.IsChecked.Value);
        }
Beispiel #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Numeros y = new Numeros(int.Parse(inicio.Text), int.Parse(fim.Text));

            y.SetFim(int.Parse(fim.Text));
            y.Setinicio(int.Parse(inicio.Text));
            bool p = false;
            bool i = false;

            if (Impares.IsChecked == true)
            {
                i = true;
            }
            if (Pares.IsChecked == true)
            {
                p = true;
            }
            int[] k = y.Calcular(p, i);
            listbox.ItemsSource = k;
        }
Beispiel #3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Numeros a = new Numeros(int.Parse(Inicio.Text), int.Parse(Fim.Text));
            bool    nPares, nImpares;

            if (Par.IsChecked == true)
            {
                nPares = true;
            }
            else
            {
                nPares = false;
            }
            if (Impar.IsChecked == true)
            {
                nImpares = true;
            }
            else
            {
                nImpares = false;
            }
            Lista.ItemsSource = a.Calcular(nPares, nImpares);
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Numeros num = new Numeros(int.Parse(inicio.Text), int.Parse(fim.Text));

            listbox.ItemsSource = num.Calcular(cbP.IsChecked.Value, cbI.IsChecked.Value);
        }
Beispiel #5
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Numeros x = new Numeros(int.Parse(i.Text), int.Parse(f.Text));

            list.ItemsSource = x.Calcular(pa.IsChecked.Value, im.IsChecked.Value);
        }