一些选项的动态生成和设置,作结束这个游戏的发布.
private void 设置选项()
{
string[] 复选文 = { "声音提示", "载入游戏", "智能列示", "智能行示" };
CheckBox[] 复选组 = Array.ConvertAll(复选文, 控件 => new CheckBox());
int 序号 = 0;
foreach (CheckBox 控件 in 复选组)
{
控件.Name = 控件.Text = 复选文[序号++];
控件.Checked = true;
控件.AutoSize = true;
控件.Parent = this;
//this.Controls.Add(控件);
}
Button 刷钮 = (Button)this.Controls["刷新"];
CheckBox 声音 = (CheckBox)this.Controls[复选文[0]],
载入 = (CheckBox)this.Controls[复选文[1]],
智列示 = (CheckBox)this.Controls[复选文[2]],
智行示 = (CheckBox)this.Controls[复选文[3]];
声音.Location = new Point(刷钮.Location.X + 刷钮.Width + 4, 刷钮.Location.Y);
载入.Location = new Point(声音.Location.X, 声音.Location.Y + 声音.Height);
智列示.Location = new Point(声音.Location.X + 声音.Width + 4, 声音.Location.Y);
智行示.Location = new Point(智列示.Location.X, 智列示.Location.Y + 智列示.Height);
}
private void 刷新设置()
{
Button 刷新 = new Button();
刷新.Location = new Point(玩无限消乐.Width, 特效.Height + 全屏截取.Height);
刷新.Name = "刷新";
刷新.BackgroundImage = new Bitmap("图形/八卦.png");
刷新.Size = new System.Drawing.Size(46, 44);
控件说明.SetToolTip(刷新, "布局刷新");
刷新.Parent = this;
刷新.Click += new EventHandler(刷新_Click);
}
private void 刷新_Click(object sender, EventArgs e)
{
Button 刷钮 = (Button)this.Controls["刷新"];
刷钮.Enabled = false; 布局生成();
优先搜寻();
优先搜寻(false);
刷钮.Enabled = true;
}