• 大小: 4.42MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-08
  • 语言: C#
  • 标签: c#  小游戏  

资源简介

c#小游戏合集,包含数字游戏,斗地主等。c#小游戏合集,包含数字游戏,斗地主等。

资源截图

代码片段和文件信息

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

namespace DouDiZhu
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        Label label = null;
        PictureBox pic = null;
        private void Form1_Load(object sender EventArgs e)
        {
            this.BackColor = Color.LightSkyBlue;
            InitPuke(); 
            
        }

        void InitPuke() 
        {
            
            //for (int j = 0; j < 14;j++ )
            //{
            //    label = new Label();
            //    label.BackColor = Color.Transparent;
                
            //    label.AutoSize = false;
            //    label.Font = new System.Drawing.Font(“宋体“ 14.25F System.Drawing.Fontstyle.Regular
            //        System.Drawing.GraphicsUnit.Point ((byte)(134)));
            //    //label.Location = new Point(60 60);
            //    label.Name = “lbl“ + (j + 1).ToString() ;
            //    label.Size = new Size(40 100);
            //    //初始张数
            //    label.Text = “4“;
            //    label.TextAlign = ContentAlignment.BottomCenter;
            //    //确定位置
            //    label.Location = new Point(10 + (j * 45) 30 );
            //    //绑定到一个单击事件
            //    label.MouseDown += new MouseEventHandler(label_MouseDown);
            //    //在放映厅TabLontrol控件上添加Label
            //    this.Controls.Add(label);
            
            //}

            for (int i = 0; i < 14; i++)
            {
                label = new Label();
                pic = new PictureBox();
                pic.Location = new Point(10 + (i * 45) 10);
                pic.Name = “pic“ + (i + 1).ToString();
                pic.Tag = i + 1;
                pic.Size = new Size(40 60);
                pic.Image = Image.FromFile(@“puke\“ + (i + 1) + “.jpg“);
                this.Controls.Add(pic);
                //pic.Click += new EventHandler(pic_Click);

                
                label.BackColor = Color.Transparent;
                label.Parent = pic;
                label.AutoSize = false;
                label.ForeColor = Color.White;
                label.Font = new System.Drawing.Font(“宋体“ 14.25F System.Drawing.Fontstyle.Regular
                    System.Drawing.GraphicsUnit.Point ((byte)(134)));
                //label.Location = new Point(60 60);
                label.Name = “lbl“ + (i + 1).ToString();
                label.Size = new Size(40 90);
                //初始张数
                label.Text = “4“;
                if (i == 13) label.Text = “2“;
                label.TextAlign = ContentAlignment.MiddleCenter;
                //确定位置
                label.Location = new Point(10 + (i * 45) 50);
                //绑定到一个单击事件
                label.MouseDown

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-05-14 11:13  DouDiZhu\
     目录           0  2018-05-14 11:13  DouDiZhu\Backup\
     目录           0  2018-05-14 11:13  DouDiZhu\Backup\DouDiZhu\
     文件         913  2008-09-21 23:57  DouDiZhu\Backup\DouDiZhu.sln
     文件       11776  2008-09-22 02:22  DouDiZhu\Backup\DouDiZhu.v12.suo
     文件        3338  2008-09-22 02:06  DouDiZhu\Backup\DouDiZhu\DouDiZhu.csproj
     文件        4547  2008-09-22 02:22  DouDiZhu\Backup\DouDiZhu\Form1.cs
     文件        2694  2008-09-22 02:22  DouDiZhu\Backup\DouDiZhu\Form1.Designer.cs
     文件        5814  2008-09-22 02:22  DouDiZhu\Backup\DouDiZhu\Form1.resx
     文件         467  2008-09-21 23:57  DouDiZhu\Backup\DouDiZhu\Program.cs
     目录           0  2018-05-14 11:13  DouDiZhu\Backup\DouDiZhu\Properties\
     文件        1186  2008-09-21 23:57  DouDiZhu\Backup\DouDiZhu\Properties\AssemblyInfo.cs
     文件        3094  2008-09-22 02:04  DouDiZhu\Backup\DouDiZhu\Properties\Resources.Designer.cs
     文件        6203  2008-09-22 02:04  DouDiZhu\Backup\DouDiZhu\Properties\Resources.resx
     文件        1091  2008-09-21 23:57  DouDiZhu\Backup\DouDiZhu\Properties\Settings.Designer.cs
     文件         249  2008-09-21 23:57  DouDiZhu\Backup\DouDiZhu\Properties\Settings.settings
     目录           0  2018-05-14 11:13  DouDiZhu\Backup\DouDiZhu\Resources\
     文件       60469  2008-09-22 02:04  DouDiZhu\Backup\DouDiZhu\Resources\100_1010.JPG
     目录           0  2008-09-26 22:09  DouDiZhu\DouDiZhu\
     文件         993  2018-05-14 11:13  DouDiZhu\DouDiZhu.sln
     文件       11776  2008-09-22 02:22  DouDiZhu\DouDiZhu.suo
     文件       20992  2018-05-14 11:18  DouDiZhu\DouDiZhu.v12.suo
     目录           0  2008-09-26 22:09  DouDiZhu\DouDiZhu\bin\
     目录           0  2018-05-14 11:13  DouDiZhu\DouDiZhu\bin\Debug\
     文件       43520  2018-05-14 11:16  DouDiZhu\DouDiZhu\bin\Debug\DouDiZhu.exe
     文件       26112  2018-05-14 11:16  DouDiZhu\DouDiZhu\bin\Debug\DouDiZhu.pdb
     文件       22704  2018-05-14 11:13  DouDiZhu\DouDiZhu\bin\Debug\DouDiZhu.vshost.exe
     文件         490  2017-09-29 21:43  DouDiZhu\DouDiZhu\bin\Debug\DouDiZhu.vshost.exe.manifest
     目录           0  2008-09-26 22:09  DouDiZhu\DouDiZhu\bin\Debug\puke\
     文件       22883  2008-09-22 00:48  DouDiZhu\DouDiZhu\bin\Debug\puke\1.jpg
     文件       22949  2008-09-22 00:46  DouDiZhu\DouDiZhu\bin\Debug\puke\10.jpg
............此处省略313个文件信息

评论

共有 条评论