Skip to content

Commit

Permalink
Adicionado campo Find.
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusjarina committed Jul 18, 2015
1 parent 12ddeca commit 31b6e0d
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
52 changes: 51 additions & 1 deletion EditorDeTexto/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions EditorDeTexto/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,17 @@ private void Form1_Load (object sender, EventArgs e)
// Ou poderíamos usar ReadAddText se o arquivo fosse pequeno.
// textoConteudo.Text = File.ReadAllText ("texto.txt");
}

private void botaoBusca_Click (object sender, EventArgs e)
{
string busca = textoBusca.Text;
string textoDoEditor = textoConteudo.Text;
int resultado = textoDoEditor.IndexOf (busca);
if (resultado >= 0) {
MessageBox.Show ("achei o texto " + busca);
} else {
MessageBox.Show ("não achei");
}
}
}
}

0 comments on commit 31b6e0d

Please sign in to comment.