private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
byte[] array = System.Text.Encoding.Default.GetBytes(e.KeyChar.ToString());
if (!char.IsDigit(e.KeyChar)|| array.LongLength==2) e.Handled = true;
//''是退格键值
if (e.KeyChar == '' || e.KeyChar == '.') e.Handled = false;
}