栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > .Net

自学C#时写的一款《捡麻将》游戏

.Net 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

自学C#时写的一款《捡麻将》游戏

游戏说明:

一、游戏目标:
消除所有的麻将牌。
二、游戏规则:
(一)消除麻将:
点击选择一张麻将牌,再单击另外一张相邻的同字牌,就可以消除。
(二)移动:
1、选择一张麻将牌,单击准备移动到的位置,即可移动。
2、麻将牌只能在同行或同列上移动,不能行列同时改变。
3、有足够的空位才能移动(不能移动到有牌的地方)。
4、被移动牌在移动方向上的相邻牌同时跟随移动。
5、每次移动后,必须且只能消除选择移动的那张牌。
三、游戏技巧:牌断开的点越少越好

**

游戏效果演示:

**
**

再现流程:

先说明一下,本人自学C#写的这个游戏,代码不够精练、算法不是最佳是必然的,当时也没怎么写注释,敬请谅解。
**
1、使用新建一个项目,取名“MaJiang”(建议VS2010及以上版本)

2、在右侧解决方案管理器中,单击选择Form1.designer.cs文件,用下面提供的Form1.designer.cs代码覆盖左侧窗口中原有代码

3、建立两个类:OneMJ.cs(一张牌)、AllMJ.cs(所有牌),具体方法是:

(1)在解决方案资源管理器中的项目名上,右键,添加,新建项

(2)在弹出的添加新项窗口中,选择“类”,在“名称”文本框中输入类名

(3)确定后,将下面提供的两个类的代码复制对应的类中,保存。

4、现在可以尝试运行了!

游戏代码如下:(C#)

1、OneMJ.CS(一张麻将牌类)

using System;
using System.Collections.Generic;
using System.Text;

namespace Majiang
{
    class OneMJ
    {
        private System.Windows.Forms.ImageList imgList;
        private string _Name;

        public string Name
        {
            get { return _Name; }
            set {
                btnMJ.Name = value;
                btnMJ.Image = imgList.Images[value + ".jpg"];
                _Name = value; }
        }

        private int _Row;

        public int Row
        {
            get {
                _Row = Index / 17;
                return _Row; }
        }
        private int _Col;

        public int Col
        {
            get {
                _Col = Index % 17;
                return _Col; }
        }
        private int _index;

        public int Index
        {
            get { return _index; }
            set {
                btnMJ.TabIndex = value;
                btnMJ.TabIndex = value;
                btnMJ.Left = (value % 17) * 53 + 20;
                btnMJ.Top = (value / 17) * 68 + 20;
                btnMJ.Width = 53;
                btnMJ.Height = 68;
                btnMJ.BackColor = System.Drawing.Color.Gray;
                
                picDot.Width = 14;
                picDot.Height = 14; 
                picDot.BackColor = System.Drawing.Color.DarkGray;
                picDot.Top = btnMJ.Top+2;
                picDot.Left = btnMJ.Left+2;
                picDot.SizeMode =System.Windows.Forms.PictureBoxSizeMode.StretchImage;
                picDot.Visible = false;
                // oneMJ.picDot.Visible = false;

                _index = value; }
        }

        private bool _Selected;

        public bool Selected
        {
            get { return _Selected; }
            set {
                if (value == true)
                {
                    btnMJ.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
                    btnMJ.Top += 3;
                    btnMJ.Left += 3;
                }
                else
                {
                    btnMJ.Top -= 3;
                    btnMJ.Left -= 3;
                    btnMJ.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
                }
                _Selected = value; }
        }


        
        public System.Windows.Forms.Button btnMJ = new System.Windows.Forms.Button();
        public System.Windows.Forms.PictureBox picDot = new System.Windows.Forms.PictureBox();
        public OneMJ(System.Windows.Forms.ImageList imglist)
        {
            imgList = imglist;
            picDot.Image = imglist.Images["DOT1.gif"];
        }
         public void Clear()
        {
            Name = "";

            picDot.Visible = false;
        }
    }
}

2、AllMJ.cs(所有麻将牌类)

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Majiang
{
    //声明一个事件委托
    public delegate void MjBackupEvent(bool redoEnabled);
    static class MoveDirection
    {
        public const int Up = 0;
        public const int Down = 1;
        public const int Left = 2;
        public const int Right = 3;
    }
    public class OneStep
    {
        public string[] MJlist = new string[136];
        public int LastMovedMJ = -1;
        public int CountClear = 0;
    }
    class AllMJ
    {
        public event MjBackupEvent mjBackupEvent;
        public System.Windows.Forms.Form frm = new System.Windows.Forms.Form();
        public int CountClear = 0;
        public int LastMoved = -1;
        public DateTime baginTime;
        const string mjp = "一万一万二万二万三万三万四万四万五万五万六万六万七万七万八万八万九万九万一饼一饼二饼二饼三饼三饼四饼四饼五饼五饼六饼六饼七饼七饼八饼八饼九饼九饼一条一条二条二条三条三条四条四条五条五条六条六条七条七条八条八条九条九条红中红中发财发财白板白板东风东风南风南风西风西风北风北风";
        public List MjList = new List();
        public List MJBackUp = new List();
        public AllMJ(System.Windows.Forms.Form frm, System.Windows.Forms.ImageList imglist)
        {

            for (int row = 0; row <= 7; row++)
            {
                for (int col = 0; col <= 16; col++)
                {
                    OneMJ oneMJ = new OneMJ(imglist);
                    int index= row * 17 + col;
                    oneMJ.Index= index;
                    //oneMJ.Name= mj.Substring((row * 17 + col) * 2, 2);
                    MjList.Add(oneMJ);
                    frm.Controls.Add(oneMJ.picDot);
                    frm.Controls.Add(oneMJ.btnMJ);

                }
            }
            string easySetupText = ((System.Windows.Forms.ComboBox)frm.Controls["comboEasy"]).Text.ToString();
            Fresh(easySetupText);
        }

        public void SaveAsFile()
        {
            string s="";
            foreach (string one in MJBackUp[0].MJlist)
            {
                s += one + ',';
            }
            string path = this.GetType().Assembly.Location;
            FileStream fs = new FileStream(path, FileMode.CreateNew);
            StreamWriter sw = new StreamWriter(fs);
            //开始写入
            sw.Write(s);
            //清空缓冲区
            sw.Flush();
            //关闭流
            sw.Close();
            fs.Close();
        
        }

        public void Backup()
        {
            MJBackUp.Add(new OneStep() );
            int c = MJBackUp.Count - 1;
            int i=0;
            foreach (OneMJ omj in MjList)
            {
                MJBackUp[c].MJlist[i]= omj.Name;
                i++;
            }
            MJBackUp[c].LastMovedMJ = LastMoved;
            MJBackUp[c].CountClear = CountClear;
            mjBackupEvent(true);
        }
        public void GOBack()
        {
            int c = MJBackUp.Count - 1;
            if (c >= 0)
            {
                int i = 0;
                foreach (OneMJ omj in MjList)
                {
                    omj.Name = MJBackUp[c].MJlist[i];
                    i++;
                }
                LastMoved = MJBackUp[c].LastMovedMJ;
                CountClear = MJBackUp[c].CountClear;
                MJBackUp.RemoveAt(c);
            }
        }
        public bool ClearBoth(OneMJ FirstClick, OneMJ SecondClick)
        {
            Backup();
            LastMoved = -1;
            FirstClick.Clear();
            SecondClick.Clear();
            ClearFlag();
            CountClear += 2;
            if (CountClear==136)
            {
                
                TimeSpan df = DateTime.Now - baginTime;
                System.Windows.Forms.MessageBox.Show("恭喜过关!,用时" + df.Minutes.ToString() + "分" + (df.Seconds % 60).ToString() + "秒");
                //Fresh();
            }
            return true;
        }
        public void Fresh(string limitEasyText)
        {
            string mj = mjp+mjp;
            MJBackUp.Clear();
            Random rnd = new Random();
            int x, y;
            for (int i = 0; i <= 5000; i++)
            {
                x = rnd.Next(0, 66) * 2;
                y = rnd.Next(68, 135) * 2;
                if ((y-x)%4==0)
                    mj = mj.Substring(x, y - x) + mj.Substring(0, x) + mj.Substring(y);
                else
                    mj = mj.Substring(0, x) + mj.Substring(y)+mj.Substring(x, y - x)  ;
            }
            for (int row = 0; row <= 7; row++)
            {
                for (int col = 0; col <= 16; col++)
                {
                    int index = row * 17 + col;
                    MjList[index].Name = mj.Substring((row * 17 + col) * 2, 2);
                }
            }
            baginTime = System.DateTime.Now;
            LastMoved = -1;
            CountClear = 0;
            int limitEasy = 0;
            try
            {
                limitEasy = int.Parse(limitEasyText);
            }
            catch
            {
                limitEasy = 0;
            }
            while (ShowDouble(limitEasy) != limitEasy && limitEasy != 0) Fresh(limitEasyText);
        }
        /// 
        /// 显示成对的
        /// 
        public int ShowDouble(int limit)
        {
            int count = 0;
            for (int row = 0; row <= 7; row++)
            {
                for (int col = 0; col <= 16; col++)
                {
                    int index = row * 17 + col;
                    MjList[index].picDot.Visible = false;
                }
            }
            for (int row = 0; row <= 7; row++)
            {
                for (int col = 0; col <= 15; col++)
                {
                    int index = row * 17 + col;
                    if (MjList[index].Name == MjList[index + 1].Name)
                    {
                        MjList[index].picDot.Visible = true;
                        MjList[index+1].picDot.Visible = true;
                        count++;
                    }
                }
            }
            for (int col = 0; col <= 16; col++)
            {
                for (int row = 0; row <= 6; row++)    
                {
                    int index = row * 17 + col;
                    if (MjList[index].Name == MjList[index + 17].Name)
                    {
                        MjList[index].picDot.Visible = true;
                        MjList[index + 17].picDot.Visible = true;
                        count++;
                    }
                }
            }
            return count;
        }


        public string SearchFirstNoBlank(int index, int direction)
        {
            switch (direction)
            {
                case MoveDirection.Up://上
                    for (int i = 1; ; i++)
                        if (index - i * 17 >= 0)
                        { if (MjList[index - i * 17].Name != "") return MjList[index - i * 17].Name; }

                        else
                            break;
                    break;
                case MoveDirection.Down://下
                    for (int i = 1; ; i++)
                        if (index + i * 17 <= 135)
                        { if (MjList[index + i * 17].Name != "") return MjList[index + i * 17].Name; }
                        else
                            break;
                    break;
                case MoveDirection.Left://左
                    for (int i = 1; ; i++)
                        if ((index - i) / 17 == index / 17 && index - i > 0)
                        { if (MjList[index - i].Name != "") return MjList[index - i].Name; }
                        else
                            break;
                    break;
                case MoveDirection.Right://右
                    for (int i = 1; ; i++)
                        if ((index + i) / 17 == index / 17 && index + i <= 135)
                        { if (MjList[index + i].Name != "") return MjList[index + i].Name; }
                        else
                            break;
                    break;
            }
            return "";
        }      
        public int CountNearBlank(int index,int direction)
        {
            int blankCount = 0;
            switch (direction)
            {
                case MoveDirection.Up://上
                    for (int i = 1; ; i++)
                        if (index - i * 17 >= 0)
                            if (MjList[index - i * 17].Name == "") blankCount++;
                            else
                                break;
                        else
                            break;
                    break;
                case MoveDirection.Down://下
                    for (int i = 1; ; i++)
                        if (index + i * 17 <= 135)
                            if (MjList[index + i * 17].Name == "") blankCount++;
                            else
                                break;
                        else
                            break;
                    break;
                case MoveDirection.Left://左
                    for (int i = 1; ; i++)
                        if ((index - i) / 17 == index / 17 && index - i>=0)
                            if (MjList[index - i].Name == "") blankCount++;
                            else
                                break;
                        else
                            break;
                    break;
                case MoveDirection.Right://右
                    for (int i = 1; ; i++)
                        if ((index + i) / 17 == index / 17 && index+i<=135)
                            if (MjList[index + i].Name == "") blankCount++;
                            else
                                break;
                        else
                            break;
                    break;
            }
            return blankCount;
        }
        
  
        public int CountMove(OneMJ selectMJ, int direction )
        {
            int count = 0;
            switch (direction)
            {
                case MoveDirection.Up:
                    for (int i = 1; selectMJ.Row - i >= 0; i++)
                    {
                        if (MjList[selectMJ.Index - i * 17].Name != "") count++;
                        else
                            break;
                    }
                    break;
                case MoveDirection.Down:
                    for (int i = 1; selectMJ.Row + i <= 7; i++)
                    {
                        if (MjList[selectMJ.Index + i * 17].Name != "") count++;
                        else
                            break;
                    }
                    break;
                case MoveDirection.Left:
                    for (int i = 1; selectMJ.Col - i >= 0; i++)
                    {
                        if (MjList[selectMJ.Index - i].Name != "") count++;
                        else
                            break;
                    }
                    break;
                case MoveDirection.Right:
                    for (int i = 1; selectMJ.Col + i <= 16; i++)
                    {
                        if (MjList[selectMJ.Index + i].Name != "") count++;
                        else
                            break;
                    }
                    break;

            }
            return count;
        }

        public int CountBlank(OneMJ selectMJ, int direction)
        {
            int count = 0;
            switch (direction)
            {
                case MoveDirection.Up:
                    for (int i = 1; selectMJ.Row - i >= 0; i++)
                    {
                        if (MjList[selectMJ.Index - i * 17].Name == "") count++;
                        else
                            if (count > 0) break;
                    }
                    break;
                case MoveDirection.Down:
                    for (int i = 1; selectMJ.Row + i <= 7; i++)
                    {
                        if (MjList[selectMJ.Index + i * 17].Name == "") count++;
                        else
                            if (count > 0) break;
                    }
                    break;
                case MoveDirection.Left:
                    for (int i = 1; selectMJ.Col - i >= 0; i++)
                    {
                        if (MjList[selectMJ.Index - i].Name == "") count++;
                        else
                            if (count > 0) break;
                    }
                    break;
                case MoveDirection.Right:
                    for (int i = 1; selectMJ.Col + i <= 16; i++)
                    {
                        if (MjList[selectMJ.Index + i].Name == "") count++;
                        else
                            if (count > 0) break;
                    }
                    break;
            }
            return count;
        }
    
        public void ShowFlag(string mjName)
        {
            if (mjName == "") return;
            foreach(OneMJ oneMJ in MjList)
            {
                if (oneMJ.Name == mjName) oneMJ.picDot.Visible = true;
                else
                    oneMJ.picDot.Visible = false;
            }
        }
        public void ClearFlag()
        {
            foreach (OneMJ oneMJ in MjList)
            {
                     oneMJ.picDot.Visible = false;
            }
        }

        public bool CheckMove(OneMJ SecondClickMJ, OneMJ FirstClickMJ)
        {
            bool MoveEnabled = false;
            if (FirstClickMJ.Row == SecondClickMJ.Row || FirstClickMJ.Col == SecondClickMJ.Col)
            {
                if (FirstClickMJ.Row > SecondClickMJ.Row)
                    MoveEnabled = CheckMove2(FirstClickMJ, SecondClickMJ, MoveDirection.Up, FirstClickMJ.Row - SecondClickMJ.Row, CountMove(FirstClickMJ, MoveDirection.Up), CountBlank(FirstClickMJ, MoveDirection.Up));
                else if (FirstClickMJ.Row < SecondClickMJ.Row)
                    MoveEnabled = CheckMove2(FirstClickMJ, SecondClickMJ, MoveDirection.Down, SecondClickMJ.Row - FirstClickMJ.Row, CountMove(FirstClickMJ, MoveDirection.Down), CountBlank(FirstClickMJ, MoveDirection.Down));
                else if (FirstClickMJ.Col > SecondClickMJ.Col)
                    MoveEnabled = CheckMove2(FirstClickMJ, SecondClickMJ, MoveDirection.Left, FirstClickMJ.Col - SecondClickMJ.Col, CountMove(FirstClickMJ, MoveDirection.Left), CountBlank(FirstClickMJ, MoveDirection.Left));
                else if (FirstClickMJ.Col < SecondClickMJ.Col)
                    MoveEnabled = CheckMove2(FirstClickMJ, SecondClickMJ, MoveDirection.Right, SecondClickMJ.Col - FirstClickMJ.Col, CountMove(FirstClickMJ, MoveDirection.Right), CountBlank(FirstClickMJ, MoveDirection.Right));
                return MoveEnabled;
            }
            else
                return false;
        }

        private bool CheckMove2(OneMJ selectMj, OneMJ TargetMj, int Direction, int MoveDistance, int countMove, int countBlank)
        {
            int index = selectMj.Index;
            if (MoveDistance > countBlank) return false;
            //countMove++;
            //此处代码验证移动落点处的四周是否有相同牌,没有则不移动。
            switch (Direction)
            {
                case MoveDirection.Up:
                case MoveDirection.Down:
                    if (SearchFirstNoBlank(TargetMj.Index, MoveDirection.Left) == selectMj.Name || SearchFirstNoBlank(TargetMj.Index, MoveDirection.Right) == selectMj.Name)
                        return true;
                    else
                        return false;
                case MoveDirection.Left:
                case MoveDirection.Right:
                    if (SearchFirstNoBlank(TargetMj.Index, MoveDirection.Up) == selectMj.Name || SearchFirstNoBlank(TargetMj.Index, MoveDirection.Down) == selectMj.Name)
                        return true;
                    else
                        return false;
            }
            return true;
        }
        public bool CheckClear(OneMJ SecondClickMJ, OneMJ FirstClickMJ)
        {
            if (FirstClickMJ.Name != SecondClickMJ.Name) return false;
            
            int rowDist = SecondClickMJ.Row - FirstClickMJ.Row;
            int colDist = SecondClickMJ.Col - FirstClickMJ.Col;
            int Y_Dif = Math.Abs(FirstClickMJ.Row - SecondClickMJ.Row);
            int X_Dif = Math.Abs(FirstClickMJ.Col - SecondClickMJ.Col);
            int FirstClickIndex = FirstClickMJ.Index;
            if (LastMoved >= 0 && SecondClickMJ.Index != LastMoved && FirstClickMJ.Index != LastMoved)
            {
                System.Windows.Forms.MessageBox.Show("  只能清除移动的牌!(" + MjList[LastMoved].Name + ")", "规则有误", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
                return false;
            }
            if (Y_Dif +X_Dif == 1) return true ;

            if (rowDist == 0)//同一行上
            {
                if (colDist > 0)//向右检测
                {
                    int blank = CountNearBlank(FirstClickIndex, MoveDirection.Right);
                    if (blank >=X_Dif - 1) return true;

                }
                else
                {
                    int blank = CountNearBlank(FirstClickIndex, MoveDirection.Left);
                    if (blank >=X_Dif - 1) return true; 
                }
            }
            if (colDist == 0)//同一列上
            {
                if (rowDist < 0)//向上检测
                {
                    int blank = CountNearBlank(FirstClickIndex, MoveDirection.Up);
                    if (blank >= Y_Dif - 1) return true;
                }
                else//向下检测
                {
                    int blank = CountNearBlank(FirstClickIndex, MoveDirection.Down);
                    if (blank >= Y_Dif - 1) return true;
                }
            }

            //如果不同行也不同列

            if (FirstClickMJ.Row > SecondClickMJ.Row)
            {
                //firstclick在下边
                if (FirstClickMJ.Col > SecondClickMJ.Col)//firstclick在右下角
                {
                    if ((CountNearBlank(FirstClickMJ.Index, MoveDirection.Left) >= X_Dif && CountNearBlank(SecondClickMJ.Index, MoveDirection.Down) >= Y_Dif) || (CountNearBlank(FirstClickMJ.Index, MoveDirection.Up) >= Y_Dif && CountNearBlank(SecondClickMJ.Index, MoveDirection.Right) >= X_Dif))
                        return true;

                }
                else//firstclick在左下角
                {
                    if ((CountNearBlank(FirstClickMJ.Index, MoveDirection.Right) >= X_Dif && CountNearBlank(SecondClickMJ.Index, MoveDirection.Down) >= Y_Dif) || (CountNearBlank(FirstClickMJ.Index, MoveDirection.Up) >= Y_Dif && CountNearBlank(SecondClickMJ.Index, MoveDirection.Left) >= X_Dif))
                        return true;
                }
            }
            else
            {
                //firstclick在上边
                if (FirstClickMJ.Col > SecondClickMJ.Col)//firstclick在右上角
                {
                    if ((CountNearBlank(FirstClickMJ.Index, MoveDirection.Left) >= X_Dif && CountNearBlank(SecondClickMJ.Index, MoveDirection.Up) >= Y_Dif) || (CountNearBlank(FirstClickMJ.Index, MoveDirection.Down) >= Y_Dif && CountNearBlank(SecondClickMJ.Index, MoveDirection.Right) >= X_Dif))
                        return true;
                }
                else//firstclick在左上角
                {
                    if ((CountNearBlank(FirstClickMJ.Index, MoveDirection.Right) >= X_Dif && CountNearBlank(SecondClickMJ.Index, MoveDirection.Up) >= Y_Dif) || (CountNearBlank(FirstClickMJ.Index, MoveDirection.Down) >= Y_Dif && CountNearBlank(SecondClickMJ.Index, MoveDirection.Left) >= X_Dif))
                        return true;
                }

            }

            return false;
        }
        public void MoveMJ(OneMJ selectMj, OneMJ TargetMj )
        {
            int Direction = 0;
            int MoveDistance = 0;
            int countMove=0;
            int countBlank=0;
            if (selectMj.Row > TargetMj.Row)
            {
                Direction = MoveDirection.Up; 
                MoveDistance = selectMj.Row - TargetMj.Row;
                countMove = CountMove(selectMj, Direction);
                countBlank = CountBlank(selectMj, Direction);
            }
            else if (selectMj.Row < TargetMj.Row)
            {
                Direction = MoveDirection.Down; 
                MoveDistance = TargetMj.Row - selectMj.Row;
                countMove = CountMove(selectMj, Direction);
                countBlank = CountBlank(selectMj, Direction);
            }
            else if (selectMj.Col > TargetMj.Col)
            {
                Direction = MoveDirection.Left;
                MoveDistance = selectMj.Col - TargetMj.Col;
                countMove = CountMove(selectMj, Direction);
                countBlank = CountBlank(selectMj, Direction);
            }
            else if (selectMj.Col < TargetMj.Col)
            {
                Direction = MoveDirection.Right;
                MoveDistance = TargetMj.Col - selectMj.Col;
                countMove = CountMove(selectMj, Direction);
                countBlank = CountBlank(selectMj, Direction);
            }

            int index = selectMj.Index;
            Backup();
            LastMoved = TargetMj.Index;
            ClearFlag();
            switch (Direction)
            {
                case MoveDirection.Up:
                    for (int i = countMove; i >= 0; i--)
                    {
                        MjList[index - MoveDistance * 17 - i * 17].Name = MjList[index - i * 17].Name;
                    }
                    for (int i = 0; i < MoveDistance; i++)
                    {
                        MjList[index - i * 17].Clear();
                    }
                    break;
                case MoveDirection.Down:
                    for (int i = countMove; i >= 0; i--)
                    {
                        MjList[index + MoveDistance * 17 + i * 17].Name = MjList[index + i * 17].Name;
                    }
                    for (int i = 0; i < MoveDistance; i++)
                    {
                        MjList[index + i * 17].Clear();
                    }
                    break;
                case MoveDirection.Left:
                    for (int i = countMove; i >= 0; i--)
                    {
                        MjList[index - MoveDistance - i].Name = MjList[index - i].Name;
                    }
                    for (int i = 0; i < MoveDistance; i++)
                    {
                        MjList[index - i].Clear();
                    }

                    break;
                case MoveDirection.Right:
                    for (int i = countMove; i >= 0; i--)
                    {
                        MjList[index + MoveDistance + i].Name = MjList[index + i].Name;
                    }
                    for (int i = 0; i < MoveDistance; i++)
                    {
                        MjList[index + i].Clear();
                    }

                    break;
            }
        }
    }
   
}

3、Form1.cs(Form1窗体):

4、Form1窗体设计代码

namespace Majiang
{
    partial class Form1
    {
        /// 
        /// 必需的设计器变量。
        /// 
        private System.ComponentModel.IContainer components = null;

        /// 
        /// 清理所有正在使用的资源。
        /// 
        /// 如果应释放托管资源,为 true;否则为 false。
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows 窗体设计器生成的代码

        /// 
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// 
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
            this.btnNew = new System.Windows.Forms.Button();
            this.btnExit = new System.Windows.Forms.Button();
            this.lblReadme = new System.Windows.Forms.Label();
            this.linkLabel1 = new System.Windows.Forms.LinkLabel();
            this.btnRedo = new System.Windows.Forms.Button();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.comboEasy = new System.Windows.Forms.ComboBox();
            this.label1 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // imageList1
            // 
            this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
            this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
            this.imageList1.Images.SetKeyName(0, "一万.jpg");
            this.imageList1.Images.SetKeyName(1, "二万.jpg");
            this.imageList1.Images.SetKeyName(2, "八饼.jpg");
            this.imageList1.Images.SetKeyName(3, "八条.jpg");
            this.imageList1.Images.SetKeyName(4, "八万.jpg");
            this.imageList1.Images.SetKeyName(5, "白板.jpg");
            this.imageList1.Images.SetKeyName(6, "北风.jpg");
            this.imageList1.Images.SetKeyName(7, "东风.jpg");
            this.imageList1.Images.SetKeyName(8, "二饼.jpg");
            this.imageList1.Images.SetKeyName(9, "二条.jpg");
            this.imageList1.Images.SetKeyName(10, "发财.jpg");
            this.imageList1.Images.SetKeyName(11, "九饼.jpg");
            this.imageList1.Images.SetKeyName(12, "九条.jpg");
            this.imageList1.Images.SetKeyName(13, "九万.jpg");
            this.imageList1.Images.SetKeyName(14, "六饼.jpg");
            this.imageList1.Images.SetKeyName(15, "六条.jpg");
            this.imageList1.Images.SetKeyName(16, "六万.jpg");
            this.imageList1.Images.SetKeyName(17, "南风.jpg");
            this.imageList1.Images.SetKeyName(18, "七饼.jpg");
            this.imageList1.Images.SetKeyName(19, "七条.jpg");
            this.imageList1.Images.SetKeyName(20, "七万.jpg");
            this.imageList1.Images.SetKeyName(21, "三饼.jpg");
            this.imageList1.Images.SetKeyName(22, "三条.jpg");
            this.imageList1.Images.SetKeyName(23, "三万.jpg");
            this.imageList1.Images.SetKeyName(24, "四饼.jpg");
            this.imageList1.Images.SetKeyName(25, "四条.jpg");
            this.imageList1.Images.SetKeyName(26, "四万.jpg");
            this.imageList1.Images.SetKeyName(27, "五饼.jpg");
            this.imageList1.Images.SetKeyName(28, "五条.jpg");
            this.imageList1.Images.SetKeyName(29, "五万.jpg");
            this.imageList1.Images.SetKeyName(30, "西风.jpg");
            this.imageList1.Images.SetKeyName(31, "一饼.jpg");
            this.imageList1.Images.SetKeyName(32, "一条.jpg");
            this.imageList1.Images.SetKeyName(33, "红中.jpg");
            this.imageList1.Images.SetKeyName(34, "DOT1.gif");
            // 
            // btnNew
            // 
            this.btnNew.Location = new System.Drawing.Point(375, 582);
            this.btnNew.Name = "btnNew";
            this.btnNew.Size = new System.Drawing.Size(88, 28);
            this.btnNew.TabIndex = 0;
            this.btnNew.Text = "下一盘";
            this.btnNew.UseVisualStyleBackColor = true;
            this.btnNew.Click += new System.EventHandler(this.btnNew_Click);
            // 
            // btnExit
            // 
            this.btnExit.Location = new System.Drawing.Point(489, 582);
            this.btnExit.Name = "btnExit";
            this.btnExit.Size = new System.Drawing.Size(88, 28);
            this.btnExit.TabIndex = 0;
            this.btnExit.Text = "退出";
            this.btnExit.UseVisualStyleBackColor = true;
            this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
            // 
            // lblReadme
            // 
            this.lblReadme.AutoSize = true;
            this.lblReadme.Cursor = System.Windows.Forms.Cursors.Hand;
            this.lblReadme.ForeColor = System.Drawing.Color.Blue;
            this.lblReadme.Location = new System.Drawing.Point(816, 590);
            this.lblReadme.Name = "lblReadme";
            this.lblReadme.Size = new System.Drawing.Size(53, 12);
            this.lblReadme.TabIndex = 1;
            this.lblReadme.Text = "游戏说明";
            this.lblReadme.Click += new System.EventHandler(this.lblReadme_Click);
            // 
            // linkLabel1
            // 
            this.linkLabel1.AutoSize = true;
            this.linkLabel1.Location = new System.Drawing.Point(28, 598);
            this.linkLabel1.Name = "linkLabel1";
            this.linkLabel1.Size = new System.Drawing.Size(65, 12);
            this.linkLabel1.TabIndex = 2;
            this.linkLabel1.TabStop = true;
            this.linkLabel1.Text = "于鸿弋制作";
            this.toolTip1.SetToolTip(this.linkLabel1, "QQ:1501728");
            // 
            // btnRedo
            // 
            this.btnRedo.Enabled = false;
            this.btnRedo.Location = new System.Drawing.Point(741, 585);
            this.btnRedo.Name = "btnRedo";
            this.btnRedo.Size = new System.Drawing.Size(69, 23);
            this.btnRedo.TabIndex = 3;
            this.btnRedo.Text = "回撤一步";
            this.btnRedo.UseVisualStyleBackColor = true;
            this.btnRedo.Click += new System.EventHandler(this.btnRedo_Click);
            // 
            // comboEasy
            // 
            this.comboEasy.FormattingEnabled = true;
            this.comboEasy.Items.AddRange(new object[] {
            "1",
            "2",
            "3",
            "4",
            "5",
            "6",
            "7",
            "8",
            "9",
            "随机"});
            this.comboEasy.Location = new System.Drawing.Point(282, 586);
            this.comboEasy.Name = "comboEasy";
            this.comboEasy.Size = new System.Drawing.Size(56, 20);
            this.comboEasy.TabIndex = 4;
            this.comboEasy.Text = "随机";
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(211, 590);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(65, 12);
            this.label1.TabIndex = 5;
            this.label1.Text = "开局难度:";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(892, 622);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.comboEasy);
            this.Controls.Add(this.btnRedo);
            this.Controls.Add(this.linkLabel1);
            this.Controls.Add(this.lblReadme);
            this.Controls.Add(this.btnExit);
            this.Controls.Add(this.btnNew);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.Name = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "麻将对对碰-160603版";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.ImageList imageList1;
        private System.Windows.Forms.Button btnNew;
        private System.Windows.Forms.Button btnExit;
        private System.Windows.Forms.Label lblReadme;
        private System.Windows.Forms.LinkLabel linkLabel1;
        private System.Windows.Forms.Button btnRedo;
        private System.Windows.Forms.ToolTip toolTip1;
        private System.Windows.Forms.ComboBox comboEasy;
        private System.Windows.Forms.Label label1;

    }
}


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1023164.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号