📄 form1.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace AIShow
{
public partial class Form1 : Form
{
Thread t;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//不对跨线程调用做检查
CheckForIllegalCrossThreadCalls = false;
//产生操作算子
MCState.produceOpMetas();
//起始状态
MCState source=new MCState();
source.m=3;
source.c=3;
source.b=1;
//目标状态
MCState target=new MCState();
target.m=0;
target.c=0;
target.b=0;
//深度优先算法
DepthFirstSearch dfs = new DepthFirstSearch();
dfs.sourceState = source;
dfs.targetState = target;
dfs.textDisplay = this.textBox1;
// dfs.search();
ThreadStart ts = new ThreadStart(dfs.search);
t = new Thread(ts);
t.Start();
}
private void button2_Click(object sender, EventArgs e)
{
if (t != null)
t.Abort();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -