• 大小: 1.6MB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2024-01-04
  • 语言: C#
  • 标签: c#2010  拼图  

资源简介

拼图游戏支持自定义图片 有3*3 4*4 5*5 几个难度可以选择 有参考图片功能 独具拼图外挂功能 一键自动完成 吼吼 下了绝对不会后悔

资源截图

代码片段和文件信息

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

namespace week6
{
    public struct TAG
    {
        public int i{get;set;}
        public int j{get;set;}
        public TAG(int a int b):this()
        {
            i = a;
            j = b;
        }
    };
    public partial class Form1 : Form
    {
        private Bitmap nowfile=new Bitmap(Properties.Resources.Penguins);
        private ArrayList road ;
        private PictureBox []Picture;
        private bool SoundSwitch = true;
        private SoundPlayer ok = new SoundPlayer(Properties.Resources.ok);
        private SoundPlayer click = new SoundPlayer(Properties.Resources.click);
        private int level = 3;
        private int[] dir = new int[4 2]{{01}{0-1}{-10}{10}};
        private bool pause = false;
        private int totalbushu=0;
        private bool restart = false;
        private int time=0;
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender EventArgs e)
        {
            init();
        }
        
        private void toolStripMenuItem3_Click(object sender EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                nowfile = new Bitmap(openFileDialog1.FileName);
            }
            init();
           // pictureBox1.Image = Cut(bit 0 0 bit.Width / 3 bit.Height / 3);
        }
        private void init()
        {
            totalbushu = 0;
            restart = true;
            label1.Text = “步数统计:“ + totalbushu.ToString();
            time = 0;
            
            if (Picture != null)
                foreach (PictureBox it in Picture)
                {
                    it.Dispose();
                }
            Picture = new PictureBox[level level];
            int arg = 1;
            for (int i = 0; i < level; i++)
            {
                for (int j = 0; j < level; j++)
                {
                    Picture[i j] = new PictureBox();
                    this.Controls.Add(Picture[i j]);
            //        TAG it = new TAG(ij);
                    Picture[i j].Tag = arg++;
                    Picture[i j].Location = new Point(j * 126 28 + i * 126);
                    Picture[i j].Borderstyle = Borderstyle.FixedSingle;
                    Picture[i j].SizeMode = PictureBoxSizeMode.StretchImage;
                    Picture[i j].Size = new Size(125 125);
                    Picture[ij].Click += new EventHandler(pic1_Click);
                    Picture[i j].Image = Cut(nowfile j * nowfile.Width / level i * nowfile.Height / level nowfile.Width / level nowfile.Height / level);
             

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        144  2013-11-23 10:10  week6\week6\app.config

     文件      39560  2013-10-26 15:07  week6\week6\bin\Debug\Resources\click.wav

     文件      30044  2013-10-26 15:08  week6\week6\bin\Debug\Resources\ok.wav

     文件     120688  2013-10-26 09:51  week6\week6\bin\Debug\Resources\Penguins.jpg

     文件     513024  2013-12-30 19:42  week6\week6\bin\Debug\week6.exe

     文件        144  2013-11-23 10:10  week6\week6\bin\Debug\week6.exe.config

     文件      62976  2013-12-30 19:42  week6\week6\bin\Debug\week6.pdb

     文件     278023  2013-12-13 20:32  week6\week6\bin\Debug\week6.rar

     文件      22472  2014-11-09 20:03  week6\week6\bin\Debug\week6.vshost.exe

     文件        144  2013-11-23 10:10  week6\week6\bin\Debug\week6.vshost.exe.config

     文件        490  2010-03-17 22:39  week6\week6\bin\Debug\week6.vshost.exe.manifest

     文件     146476  2013-11-23 10:11  week6\week6\Blue memory Icon 64.ico

     文件      13205  2013-12-30 19:42  week6\week6\Form1.cs

     文件      16636  2013-12-30 19:42  week6\week6\Form1.Designer.cs

     文件     226434  2013-12-30 19:42  week6\week6\Form1.resx

     文件        504  2013-10-26 17:28  week6\week6\Form2.cs

     文件       2282  2013-10-26 13:15  week6\week6\Form2.Designer.cs

     文件       5817  2013-10-26 13:15  week6\week6\Form2.resx

     文件       6096  2013-12-30 19:53  week6\week6\Form3.cs

     文件       6351  2013-11-23 10:17  week6\week6\Form3.Designer.cs

     文件       5817  2013-11-23 10:17  week6\week6\Form3.resx

     文件        578  2013-11-23 10:17  week6\week6\Form4.cs

     文件       3535  2013-11-23 10:17  week6\week6\Form4.Designer.cs

     文件       5817  2013-11-23 10:17  week6\week6\Form4.resx

     文件       1829  2013-11-22 21:48  week6\week6\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7310  2013-11-23 10:11  week6\week6\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       5120  2013-12-30 15:29  week6\week6\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件       1431  2014-11-09 20:03  week6\week6\obj\Debug\week6.csproj.FileListAbsolute.txt

     文件       1266  2013-12-30 19:42  week6\week6\obj\Debug\week6.csproj.GenerateResource.Cache

     文件      15303  2013-11-22 21:51  week6\week6\obj\Debug\week6.csprojResolveAssemblyReference.cache

............此处省略35个文件信息

评论

共有 条评论