private void 深度优先ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (p.Start == null)
            {
                MessageBox.Show("请输入起点");
                return;
            }
            if (p.End == null)
            {
                MessageBox.Show("请输入终点");
                return;
            }
            DF df = new DF(p);

            path = df.resolve(depth);
            if (path.cells.Count > 0)
            {
                path.Draw();
            }
            else
            {
                MessageBox.Show("无法到达");
            }
        }
 private void 深度优先ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (p.Start == null)
     {
         MessageBox.Show("请输入起点");
         return;
     }
     if (p.End == null)
     {
         MessageBox.Show("请输入终点");
         return;
     }
     DF df = new DF(p);
     path = df.resolve(depth);
     if (path.cells.Count > 0)
         path.Draw();
     else MessageBox.Show("无法到达");
 }