Sopadeletras
Páginas: 3 (538 palabras)
Publicado: 10 de marzo de 2013
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
usingSystem.Windows.Forms;
namespace SopadeLetras
{
public partial class Form1 : Form
{
Sopa ob1 = new Sopa();
public Form1()
{
InitializeComponent(); dataGridView1.RowCount = dataGridView1.ColumnCount = 10;
ob1.LLENAR(dataGridView1);
ob1.LLENAR_VACIOS(dataGridView1);
textBox1.Focus();
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == Convert.ToChar(Keys.Enter))
{
string palabra = textBox1.Text; palabra=palabra.ToUpper();
if (ob1.Buscar(palabra) == false)
{
MessageBox.Show("Esa palabra no se encuentra"); textBox1.Clear();
textBox1.Focus();
}
else
switch (palabra)
{
case "MICROSOFT": {
label2.Text = palabra;
textBox1.Clear();
textBox1.Focus();
}
break;
case "MACINTOSH":
{
label3.Text = palabra;
textBox1.Clear();
textBox1.Focus();
}
break;
...
Leer documento completo
Regístrate para leer el documento completo.