private void txtCampoData_KeyPress_1(object sender, KeyPressEventArgs e) { ControleFormato.FormataData(ref txtCampoData); if (!Char.IsDigit(e.KeyChar) && e.KeyChar != (char)8) { e.Handled = true; } }
private void txtDataFabricacao_KeyPress(object sender, KeyPressEventArgs e) { ControleFormato.FormataData(ref txtDataFabricacao); if (!Char.IsDigit(e.KeyChar) && e.KeyChar != (char)8) { e.Handled = true; } }