Form1.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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 Tetris
{
    public partial class Form1 : Form
    {
        /// <summary>
        /// 定时器
        /// </summary>
        Timer m_timer;     
        /// <summary>
        /// 画布模型
        /// </summary>
        Canvas m_canvas;
        /// <summary>
        /// 画布
        /// </summary>
        Graphics m_picturegra;
        /// <summary>
        /// 用于显示下一个砖块的画布
        /// </summary>
        Graphics m_nextpicgra;
        float m_itemxlength;
        float m_itemylength;
        bool m_isrun;

        public Form1()
        {
            InitializeComponent();
            this.Text = "Tetris!";
            this.FormBorderStyle = FormBorderStyle.FixedSingle;

            pictureBox1.Focus();

            label1.Size = new Size(140, 120);
            label1.Location = new Point(440, 140);
            label1.Font = new Font("微软雅黑",8);
            label1.Text = "游戏说明:\n   通过方向键控制砖块。\n   向上键:变形\n   向左键:左移\n   向下键:下移\n   向右键:右移\n   小键盘0:掉到最低";

            label2.AutoSize = false;
            label2.Location = new Point(440, 280);
            label2.Size = new Size(140, 30);
            label2.Text = "当前分数:0分";

            Btn_NewGame.Location = new Point(440, 320);
            Btn_NewGame.Size = new Size(140, 20);

            Btn_Stop.Location = new Point(440, 350);
            Btn_Stop.Size = new Size(140, 20);

            Btn_Continue.Location = new Point(440, 380);
            Btn_Continue.Size = new Size(140, 20);

后面还有 167 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。