private void gera(object sender, RoutedEventArgs e) { try { if (nome.Text.Length != 0) { GerarSorte sorte = new GerarSorte(sig.SelectedIndex); textnome.Text = nome.Text; textSua.Text = " Sua Sorte é :"; //sig.SelectedItem.ToString(); textSorte.Text = sorte.sorteGerada; } else { textSorte.Text = "Digite seu nome !!!"; } } catch (Exception ex) { textSorte.Text = "Selecione o signo"; Debug.WriteLine("Signo não selecionado" + ex); } }
private void gera(object sender, RoutedEventArgs e) { GerarSorte sorte = new GerarSorte(sig.SelectedIndex); try { text.Text = //sig.SelectedItem.ToString(); sorte.sorteGerada; } catch (Exception ex) { text.Text = "Selecione o signo"; Debug.WriteLine("Signo não selecionado" + ex); } }