MainForm.cs
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Media;
using System.Windows.Forms;
using MPlayer;
//http://www.51aspx.com/
namespace PalCard
{
public partial class MainForm : Form
{
//声音文件
string SoundFile = Application.StartupPath + "\\Sound\\Play.wav";
//图片路径
string ImageSource = Application.StartupPath + "\\Image\\";
//图片控件数组
PictureBox[] PictureBoxs = new PictureBox[12];
//图片索引
int[] Index = new int[12];
//定义时间
int mm, ss = 0;
//产生随机数
Random r = new Random();
//判断点击的次数,最大为2
private int Count=0;
//存储图片索引的数组
private int[] ClickID = new int[2];
//存储图片控件的数组
private PictureBox[] ClickBox = new PictureBox[2];
//已完成的图片组数,最大为6
private int n=0;
//播放背景音乐
MPlayer.MPlayer Player;
public MainForm()
{
InitializeComponent();
}
private void BtnStart_Click(object sender, EventArgs e)
{
//播放音乐,由于使用SoundPlayer会被其他的音乐打断,所以使用了自己的一个类,音乐会一直播放,直到游戏结束
Player = new MPlayer.MPlayer();
Player.FileName=SoundFile;
Player.Play();
Timer1.Enabled=true;
//随机显示
Index = GetIndex();
for (int i = 0; i < 12; i++)
{
PictureBoxs[i].Image = Image.FromFile(ImageSource + "Image" + Index[i] + ".jpg");
}
}
public int[] GetIndex()
后面还有 228 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
