Form1.cs
(开头部分) 19KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Text;
using System.Windows.Forms;
// 下载于www.51aspx.com
//add
//含GraphicsPath类
namespace VarietyBox //百变方块
{
public partial class Form1 : Form
{
//在类class Form1中声明私有的数据成员变量
private const int CHIP_COUNT = 8;
private const int MAX_POINTS = 8;
private const int CHIP_WIDTH = 40;
private readonly int[,] OrgMap = new int[6,6]; //初始化目标地图OrgMap
private readonly CChip[] m_chipList = new CChip[CHIP_COUNT];
private bool Drag_PictBox;
private int[,] Map = new int[6,6];
private int m_nCurrIndex; //用户选中的拼块
private int max = 10; //图案的数量
private int n = 1; //图案序号
private int oldx, oldy; //记录鼠标原位置
public Form1()
{
InitializeComponent();
}
//{{1,1,1,1,1,1},
// {1,1,0,0,0,1},
// {1,0,1,0,1,1},
// {1,1,1,0,1,1},
// {1,1,1,0,0,1},
// {1,1,1,1,1,1}};
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics gp = e.Graphics;
SolidBrush myBrush = new SolidBrush(Color.Green);
for (int i = 0; i < 6; i++)
for (int j = 0; j < 6; j++)
{
if (OrgMap[i, j] == 0)
gp.FillRectangle(myBrush, i*CHIP_WIDTH, j*CHIP_WIDTH, CHIP_WIDTH, CHIP_WIDTH);
}
Pen p = new Pen(Color.Brown, 1);
for (int i = 1; i < 7; i++)
for (int j = 1; j < 7; j++)
{
gp.DrawLine(p, 1, j*CHIP_WIDTH, CHIP_WIDTH*6, j*CHIP_WIDTH);
gp.DrawLine(p, i*CHIP_WIDTH, 1, i*CHIP_WIDTH, CHIP_WIDTH*6);
}
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
后面还有 442 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。