Beruflich Dokumente
Kultur Dokumente
{
public Form1()
{
InitializeComponent();
}
if (dataGridView1.CurrentCell.ColumnIndex == 0)
{
if (!(char.IsNumber(e.KeyChar)) && (e.KeyChar != (char)Keys.Back) &&
e.KeyChar != Convert.ToChar('.') && e.KeyChar != Convert.ToChar('-'))
{
MessageBox.Show("Solo se permiten números", "Advertencia",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
e.Handled = true;
return;
}
}
if (dataGridView1.CurrentCell.ColumnIndex == 1)
{
if (!(char.IsNumber(e.KeyChar)) && (e.KeyChar != (char)Keys.Back) &&
e.KeyChar != Convert.ToChar('.') && e.KeyChar != Convert.ToChar('-'))
{
MessageBox.Show("Solo se permiten números", "Advertencia",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
e.Handled = true;
return;
}
}
}
private void dataGridView1_EditingControlShowing(object sender,
DataGridViewEditingControlShowingEventArgs e)
{
if (dataGridView1.CurrentCell.ColumnIndex == 1)
{
TextBox txt = e.Control as TextBox;
if (txt != null)
{
txt.KeyPress -= new
KeyPressEventHandler(dataGridView1_KeyPress);
txt.KeyPress += new
KeyPressEventHandler(dataGridView1_KeyPress);
}
}
if (dataGridView1.CurrentCell.ColumnIndex == 0)
{
TextBox txt = e.Control as TextBox;
if (txt != null)
{
txt.KeyPress -= new
KeyPressEventHandler(dataGridView1_KeyPress);
txt.KeyPress += new
KeyPressEventHandler(dataGridView1_KeyPress);
}
}
}
//programa
float[,] T;
int n = datos.Length;
int i = 0, m, j;
m = n - 1;
}
polinomio = polinomio + " + " + T[coef, coef];
}
Console.WriteLine(polinomio);
textBox2.Text = polinomio;
//prueba
//programa
float[,] T;
int n = datos.Length;
int i = 0, m, j;
m = n - 1;
}
polinomio = polinomio + " + " + T[coef, coef];
}
Console.WriteLine(polinomio);
textBox2.Text = polinomio;
//prueba
float prueba = Convert.ToSingle(textBox1.Text);
float poli;
float poliprincipal = funciones[0];
}
Console.WriteLine("Resultado es :" + poliprincipal);
textBox3.Text = Convert.ToString(poliprincipal);