我尝试制作它,以便我的表单不会显示为空白。它之前正在工作,它不会让我一次保存我的文件所以我将其重命名为 form3temp ,现在表单显示在我运行它时,但不是在我看它时在设计视图中。表格5也做同样的事情。我的7个表格的其余部分都很好。
内部设计如何出现 https://i.gyazo.com/06994988ff2f307d5042c0bafec1c43e.png 我运行应用程序时的显示方式 https://gyazo.com/97c1838e55f5f595b09211f2ee742c9f
namespace LawnCarePrototype
{
public partial class Form31 : Form
{
public static decimal yardCost = 0.0M;
decimal yardSizeMultiplier = 0.0M;
public Form31()
{
InitializeComponent();
}
private void Form3_Load(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
yardSizeMultiplier = 0.0M;
yardCost = 0.0M;
if (radioButton1.Checked)
{
yardSizeMultiplier = 0.8M;
}
if (radioButton2.Checked)
{
yardSizeMultiplier = 1.0M;
}
if (radioButton3.Checked)
{
yardSizeMultiplier = 1.2M;
}
if (checkBox1.Checked)
{
yardCost =+ 15.00M * yardSizeMultiplier;
//2 EDGE
Global.edgeExp = 15.00M * yardSizeMultiplier;
}
if (checkBox2.Checked)
{
yardCost =+30.00M * yardSizeMultiplier;
Global.bushExp = 30.00M * yardSizeMultiplier;
//3 BUSH
}
if (checkBox3.Checked)
{
yardCost =+ 25.00M * yardSizeMultiplier;
Global.leafExp = 25.00M * yardSizeMultiplier;
//4 LEAF
}
if (checkBox4.Checked)
{
yardCost =+ 35.00M * yardSizeMultiplier;
//1 LAWN
Global.MowExp = 35.00M * yardSizeMultiplier;
}
if (yardCost == 0.00M)
{
MessageBox.Show("Please Input Your Selection");
}
else
{
Form4 form4obj = new Form4();
form4obj.Show();
this.Close();
}
Global.subTotal = yardCost;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Form2 form2obj = new Form2();
form2obj.Show();
this.Close();
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
}
private void checkBox4_CheckedChanged(object sender, EventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
}
}
我希望表单设计能够出现,因为我没有看到任何错误。 不确定在我的代码中可能导致这种情况。
旁注:抱歉代码格式不佳!