/// <summary> /// 显示剩余地雷数量 /// </summary> void showSurplusMineNum() { showInformation xs = new showInformation(); xs.Text = markNum.ToString(); xs.Location = new Point(85, 467); this.Controls.Add(xs); }
/// <summary> /// 更改剩余地雷数量 /// </summary> void changeSurplusMineNum() { foreach (Object control in this.Controls) { if (control is showInformation) { showInformation sy = (showInformation)control; if (markNum < 10) { sy.Text = "0" + markNum; } else { sy.Text = markNum.ToString(); } } } }