• 大小: 5.89M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-05-01
  • 语言: C#
  • 标签: 华容道  

资源简介

华容道

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HuaRongDao
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private Panel pl;//记录选中的控件ID

        private void Form1_Load(object sender EventArgs e)
        {
            //初始化时设置各个位置的可用状态
            PlState[0 0] = PlState[0 1] = PlState[0 2] = PlState[0 3] =
                PlState[1 0] = PlState[1 1] = PlState[1 2] = PlState[1 3] =
                PlState[2 0] = PlState[2 1] = PlState[2 2] = PlState[2 3] =
                PlState[3 0] = PlState[3 1] = PlState[3 2] = PlState[3 3] =
                PlState[4 0] = PlState[4 3] = true;
        }

        //初始化各人物方格位置
        private void button1_Click(object sender EventArgs e)
        {
            //设置各方格的初始图片
            panel1.BackgroundImage = (Image)(Properties.Resources._003);
            panel2.BackgroundImage = (Image)(Properties.Resources._001);
            panel3.BackgroundImage = (Image)(Properties.Resources._004);
            panel4.BackgroundImage = (Image)(Properties.Resources._005);
            panel5.BackgroundImage = (Image)(Properties.Resources._002);
            panel6.BackgroundImage = (Image)(Properties.Resources._006);
            panel7.BackgroundImage = (Image)(Properties.Resources._007);
            panel8.BackgroundImage = (Image)(Properties.Resources._008);
            panel9.BackgroundImage = (Image)(Properties.Resources._009);
            panel10.BackgroundImage = (Image)(Properties.Resources._010);
            //设置各方格的初始位置
            panel1.Location = position[0 0];
            panel2.Location = position[0 1];
            panel3.Location = position[0 3];
            panel4.Location = position[2 0];
            panel5.Location = position[2 1];
            panel6.Location = position[2 3];
            panel7.Location = position[3 1];
            panel8.Location = position[3 2];
            panel9.Location = position[4 0];
            panel10.Location = position[4 3];
            PlState[4 0] = PlState[4 3] = true;   //设置最后一行的首尾位置不可用
            PlState[4 1] = PlState[4 2] = false;  //设置最后一行的中间两个位置可用
        }

        #region 赵云
        private void panel1_Click(object sender EventArgs e)
        {
            //设置各方格图片
            panel1.BackgroundImage = (Image)(Properties.Resources.a3);
            panel2.BackgroundImage = (Image)(Properties.Resources._001);
            panel3.BackgroundImage = (Image)(Properties.Resources._004);
            panel4.BackgroundImage = (Image)(Properties.Resources._005);
            panel5.BackgroundImage = (Image)(Properties.Resources._002);
            panel6.BackgroundImage = (Image)(Properties.Resources._006);
            panel7.BackgroundImage = (Image)(P

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-07-13 16:32  华容道\
     目录           0  2013-07-13 16:32  华容道\HuaRongDao\
     文件         920  2008-12-20 14:12  华容道\HuaRongDao.sln
     文件       29696  2009-03-07 14:24  华容道\HuaRongDao.suo
     文件          77  2008-12-20 14:30  华容道\HuaRongDao\app.config
     目录           0  2012-05-02 09:58  华容道\HuaRongDao\bin\
     目录           0  2013-07-13 16:32  华容道\HuaRongDao\bin\Debug\
     文件     2876928  2009-03-07 14:24  华容道\HuaRongDao\bin\Debug\HuaRongDao.exe
     文件          77  2008-12-20 14:30  华容道\HuaRongDao\bin\Debug\HuaRongDao.exe.config
     文件       40448  2009-03-07 14:24  华容道\HuaRongDao\bin\Debug\HuaRongDao.pdb
     文件       14328  2009-03-07 14:23  华容道\HuaRongDao\bin\Debug\HuaRongDao.vshost.exe
     文件          77  2008-12-20 14:30  华容道\HuaRongDao\bin\Debug\HuaRongDao.vshost.exe.config
     文件         490  2007-07-21 01:33  华容道\HuaRongDao\bin\Debug\HuaRongDao.vshost.exe.manifest
     文件       26709  2009-03-07 14:22  华容道\HuaRongDao\Form1.cs
     文件        8811  2009-03-07 14:22  华容道\HuaRongDao\Form1.Designer.cs
     文件        5987  2009-03-07 14:22  华容道\HuaRongDao\Form1.resx
     文件        5209  2009-01-13 11:44  华容道\HuaRongDao\HuaRongDao.csproj
     目录           0  2013-07-13 16:32  华容道\HuaRongDao\image\
     文件      575903  2009-03-07 14:17  华容道\HuaRongDao\image\001.jpg
     文件      546570  2009-03-07 10:52  华容道\HuaRongDao\image\002.jpg
     文件       42299  2009-03-07 11:29  华容道\HuaRongDao\image\003.jpg
     文件       43509  2009-03-07 13:20  华容道\HuaRongDao\image\004.jpg
     文件       52071  2009-03-07 14:08  华容道\HuaRongDao\image\005.jpg
     文件       39993  2009-03-07 13:01  华容道\HuaRongDao\image\006.jpg
     文件       27563  2009-03-06 11:44  华容道\HuaRongDao\image\007.jpg
     文件       27563  2009-03-06 11:45  华容道\HuaRongDao\image\008.jpg
     文件       27563  2009-03-06 11:45  华容道\HuaRongDao\image\009.jpg
     文件       27563  2009-03-06 11:45  华容道\HuaRongDao\image\010.jpg
     文件      575110  2009-03-07 14:20  华容道\HuaRongDao\image\a1.jpg
     文件       29965  2009-02-24 10:40  华容道\HuaRongDao\image\a10.jpg
     文件      546324  2009-03-07 10:55  华容道\HuaRongDao\image\a2.jpg
............此处省略24个文件信息

评论

共有 条评论