走迷宫C#版(二)
文章来源:
文章作者: 发布时间:2006-03-28
//窗体,调用...
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Threading;
{
///
/// Form1 的摘要说明。
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
///
/// 必需的设计器变量。
///
///
private CMaze mymaze;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button btnAbout;
private System.Windows.Forms.Button btnRun;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Button button3;
private System.ComponentModel.IContainer components=null;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
bool[,] _mg=new bool[,]{{true,false,false,true,false,false,false},
{true,true,true,true,true,true,true},
{false,false,true,false,true,false,true},
{false,false,true,false,true,false,false},
{false,true,true,false,true,false,false},
{true,true,false,false,true,true,false},
{false,false,false,false,false,true,true}
};
mymaze=new CMaze(_mg,new Point(0,0),new Point(6,6));
}
///
/// 清理所有正在使用的资源。
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
///
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
///
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.btnAbout = new System.Windows.Forms.Button();
this.btnRun = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(360, 288);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "Info";
this.button1.Click = new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(360, 192);
this.button2.Name = "button2";
this.button2.TabIndex = 1;
this.button2.Text = "Step";
this.button2.Click = new System.EventHandler(this.button2_Click);
//
// btnAbout
//
this.btnAbout.Location = new System.Drawing.Point(360, 320);
this.btnAbout.Name = "btnAbout";
this.btnAbout.TabIndex = 2;
this.btnAbout.Text = "About";
this.btnAbout.Click = new System.EventHandler(this.btnAbout_Click);
//
// btnRun
//
this.btnRun.Location = new System.Drawing.Point(360, 160);
this.btnRun.Name = "btnRun";
this.btnRun.TabIndex = 3;
this.btnRun.Text = "Run";
this.btnRun.Click = new System.EventHandler(this.btnRun_Click);
//
// btnReset
//
this.btnReset.Location = new System.Drawing.Point(360, 256);
this.btnReset.Name = "btnReset";
this.btnReset.TabIndex = 4;
this.btnReset.Text = "Reset";
this.btnReset.Click = new System.EventHandler(this.btnReset_Click);
//
// panel1
//
this.panel1.Controls.Add(this.label8);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(360, 8);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(72, 144);
this.panel1.TabIndex = 5;
//
// label8
//
this.label8.Location = new System.Drawing.Point(32, 120);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(32, 16);
this.label8.TabIndex = 7;
this.label8.Text = "墙壁";
//
// label7
//
this.label7.BackColor = System.Drawing.Color.Red;
this.label7.Location = new System.Drawing.Point(8, 112);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(20, 20);
this.label7.TabIndex = 6;
//
// label6
//
this.label6.Location = new System.Drawing.Point(32, 88);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 16);
this.label6.TabIndex = 5;
this.label6.Text = "已走";
//
// label5
//
this.label5.BackColor = System.Drawing.Color.Blue;
this.label5.Location = new System.Drawing.Point(8, 80);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(20, 20);
this.label5.TabIndex = 4;
//
// label4
//
this.label4.Location = new System.Drawing.Point(32, 56);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(32, 16);
this.label4.TabIndex = 3;
this.label4.Text = "可选方向";
//
// label3
//
this.label3.BackColor = System.Drawing.Color.Yellow;
this.label3.Location = new System.Drawing.Point(8, 48);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(20, 20);
this.label3.TabIndex = 2;
//
// label2
//
this.label2.Location = new System.Drawing.Point(32, 24);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 16);
this.label2.TabIndex = 1;
this.labe
上一篇:走进C#(我的C#学习之旅) 之四(2)
下一篇:走进C#(我的C#学习之旅) 之四(3)
精彩推荐
[技巧]·诺基亚S60机友必看——蓝牙的应用
[技巧]·用玩转手机实现摩托A1000于电脑同步
[技巧]·关于V902如何使用3GP为来电铃声方法
[新机]·完美结合 索爱滑盖音乐手机W580图赏
[新机]·延续经典 诺基亚神秘翻盖6131i曝光
[新机]·大屏王者 多普达智能新机D805曝光
[新机]·时尚风格 松下P904i精美广告壁纸欣赏
[新机]·苹果iPhone终上市 海量开箱照片抢先欣
[行情]·S型曲线 联想时尚折叠机S9仅售1480
[行情]·镜面美人 联想女性超薄翻盖S9仅1399
[行情]·畅所欲言 飞利浦待机王9@9s仅1398元
[行情]·创意无限 LG滑盖音乐机KE608跌破两千
[行情]·天籁之音 索爱音乐强机W810c只1890元
[技巧]·用玩转手机实现摩托A1000于电脑同步
[技巧]·关于V902如何使用3GP为来电铃声方法
[新机]·完美结合 索爱滑盖音乐手机W580图赏
[新机]·延续经典 诺基亚神秘翻盖6131i曝光
[新机]·大屏王者 多普达智能新机D805曝光
[新机]·时尚风格 松下P904i精美广告壁纸欣赏
[新机]·苹果iPhone终上市 海量开箱照片抢先欣
[行情]·S型曲线 联想时尚折叠机S9仅售1480
[行情]·镜面美人 联想女性超薄翻盖S9仅1399
[行情]·畅所欲言 飞利浦待机王9@9s仅1398元
[行情]·创意无限 LG滑盖音乐机KE608跌破两千
[行情]·天籁之音 索爱音乐强机W810c只1890元
相关新闻
相关链接
