二阶段12.16(最后一天)
由于12.15日是四六级考试,我们没有时间来写,所以隔了一天更新。
今天我们编写了等级判断程序,可以自动判断输入的等级进行计算与
检校。我们还对软件的各项进行了测试与使用,暂时未出现问题。
其中部分判断代码:
string str1 = comboBox1.Text;
string str2 = "图根导线";
string str3 = "一级导线";
string str4 = "二级导线";
string str5 = "三级导线";
string str6 = "四等导线";
if (str1.Equals(str2, StringComparison.OrdinalIgnoreCase) == true)
{ string a = "60*√n";
textBox2.Text = a;
textBox4.Text = "1/2000";
}
else if (str1.Equals(str3, StringComparison.OrdinalIgnoreCase) == true)
{string a = "10*√n";
textBox2.Text = a;
textBox4.Text = "1/15000";
}
else if (str1.Equals(str4, StringComparison.OrdinalIgnoreCase) == true)
{string a = "16*√n";
textBox2.Text = a;
textBox4.Text = "1/10000";
}
else if (str1.Equals(str5, StringComparison.OrdinalIgnoreCase) == true)
{
string a = "24*√n";
textBox2.Text = a;
textBox4.Text = "1/5000";
}
else if (str1.Equals(str6, StringComparison.OrdinalIgnoreCase) == true)
{
string a = "5*√n";
textBox2.Text = a;
textBox4.Text = "1/35000";
}
else
{
string a = "3.6*√n";
textBox2.Text = a;
textBox4.Text = "1/55000";
}
}