Archive for September, 2009

Guns ‘n’ Roses – La culebra

Saturday, September 19th, 2009

No soy muy fan del genero ni de este tipo de “montajes”, pero cuando quedan tan bien y me sacan una risa vale la pena compartirlo.

Foro CI en español, en http://www.codeigniterdirectory.com

Friday, September 18th, 2009

Pues nada mas para anunciar que nuestro humilde foro de CI en español fue aceptado en http://www.codeigniterdirectory.com/

Mas info aqui:
Foro CI en htto://www.codeigniterdirectory.com

Saludos.

Thursday, September 17th, 2009

hola buenas tarde, me encuentro descubriendo el mundo de WPF, la vdd he debatido con migo mismo acerca de esta nueva forma de manejar la interfaz de nuestras aplicaciones y no llego a conclusion alguna… creo que solo continuo en esto porque es nuevo para mi y me emociona.

ahora si aqui les dejo una forma “casera” de como hacer un filteredTextBox
private void txtFecha_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Space) e.Handled = true;
if (e.Key == Key.Tab || e.Key == Key.Enter)
{
if (txtFecha.Text.Length != 10)
{
txtFecha.Focus();
return;
}
if (Convert.ToInt16(txtFecha.Text.Substring(3, 2)) > 12 || Convert.ToInt16(txtFecha.Text.Substring(3, 2)) <>

{
MessageBox.Show(“mes incorrecto”, “aviso”);
txtFecha.Focus();
return;
}
if (Convert.ToInt16(txtFecha.Text.Substring(0, 2)) >
DateTime.DaysInMonth(Convert.ToInt16(txtFecha.Text.Substring(6, 4)), Convert.ToInt16(txtFecha.Text.Substring(3, 2))))
{
MessageBox.Show(“dia incorrecto”, “aviso”);
txtFecha.Focus();
}
return;
}
if (txtFecha.Text.Length != 2 && txtFecha.Text.Length != 5)
{
if (!(e.Key == Key.D0 || e.Key == Key.D1 || e.Key == Key.D2 || e.Key == Key.D3 || e.Key == Key.D4 || e.Key == Key.D5 || e.Key == Key.D6
|| e.Key == Key.D7 || e.Key == Key.D8 || e.Key == Key.D9 || e.Key == Key.NumPad0 || e.Key == Key.NumPad1 ||
e.Key == Key.NumPad2 || e.Key == Key.NumPad3 || e.Key == Key.NumPad4 || e.Key == Key.NumPad5 || e.Key == Key.NumPad6
|| e.Key == Key.NumPad7 || e.Key == Key.NumPad8 || e.Key == Key.NumPad9))
e.Handled = true;
}
else
if (!(e.Key == Key.Subtract || e.Key == Key.Divide || e.Key == Key.OemPeriod || e.Key == Key.Decimal))
e.Handled = true;
}
talvez no sea la mas optima jejeje pero me saco del apuro, espero les ayude tantio!!! por favor den mas opciones