以下是引用wangnannan在2011-12-23 14:08:50的发言:
甚至在窗体关闭的时候和第二次打开窗体时手动将变量赋空值都试过,都没有用,
这个你贴个代码看看
try
{
for (int i = 0; i < 4; i++)
{
PC_plan_r[i] = "";
PC_PlanName_r[i] = "";
DiffCount[i] = 0;
}
Now_Feed = 0;
FeedCount = 0;
FeedNum = 0;
NowFeeding_IsEnd = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
xmlfrm.modifyxml("finishmis",Task.Now_Mission_Num);
serialPort1.Close();
serialPort2.Close();
timer3.Enabled = false;
label3.Font = new Font("Arial", 100, System.Drawing.FontStyle.Bold);
this.Close();