如图,当裂缝宽度超过0.2时,颜色就变成红的了。这个是我手动在ForeColor里面调的,怎么可以让它自己判断并涂红啊?------解决思路----------------------
手动判断简单点
------解决思路----------------------
double d;
if (double.TryParse(this.textBox1.Text, out d) && d < 0.2)
{
this.textBox1.ForeColor = Color.Red;
}
如图,当裂缝宽度超过0.2时,颜色就变成红的了。这个是我手动在ForeColor里面调的,怎么可以让它自己判断并涂红啊?double d;
if (double.TryParse(this.textBox1.Text, out d) && d < 0.2)
{
this.textBox1.ForeColor = Color.Red;
}