资源简介
拼图游戏支持自定义图片 有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个文件信息
相关资源
- Visual C# 2010程序设计教程(教程PPT+源
- C#拼图游戏源代码
- c# 拼图游戏 c# 拼图游戏 c# 拼图游戏
- C# WinForm程序-拼图游戏
- C# 拼图游戏 含有课程设计
- C# 简单拼图游戏
- C#拼图游戏源代码(完整版)
- Visual.C#2010从入门到精通 光盘源码
- 用C#2010编写K3插件
- c#做的拼图游戏
- c#拼图游戏可换图,选难度,计时,统
- asp.net 4.0动态网站开发基础教程(c#
- C#做的拼图小游戏源代码
- C#2010对visio进行二次开发初始程序
- 随机线条拼图
- visualcsharp2010 visual cSharp 2010 从入门到
- C#制作的拼图游戏
- C#拼图最详细最全代码 简单易懂 便于
- C# 拼图 源码(可任意拖动、旋转、删
- C#拼图游戏完整,此仅供学习使用
- c# 拼图游戏 源代码
- 人物拼图游戏
- C#拼图游戏 学习,研究,参考,不可
- 一个简单的3*3拼板图型游戏 小时候经
- 利用c#写的jpg拼图软件,可以随意剪切
- wpf 拼图游戏源码
- C# 拼图游戏
- vb 拼图游戏 源码
- 魔板小游戏
- C#基础:简易拼图小游戏源码
评论
共有 条评论