当前位置: 首页>>代码示例>>C#>>正文


C# Brand.getClass方法代码示例

本文整理汇总了C#中Brand.getClass方法的典型用法代码示例。如果您正苦于以下问题:C# Brand.getClass方法的具体用法?C# Brand.getClass怎么用?C# Brand.getClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Brand的用法示例。


在下文中一共展示了Brand.getClass方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: chackBrandClass

 private bool chackBrandClass(Brand b1, Brand b2)
 {
     if (b1.getClass() == b2.getClass())
         return true;
     else
     {
         return false;
     }
 }
开发者ID:billteng,项目名称:mahjong,代码行数:9,代码来源:BrandsTest.cs

示例2: addimage

        protected override void addimage(location state, Brand brand, RotateFlipType rotate)
        {
            Bitmap bitmap;
            // �p�G�O�i�����P�N�]�w��ܵP���ϫ��A�_�h�N��ܪ��ߪ��P Resources.upbarnd
            if (brand.IsCanSee || state == location.South || ShowAll)
                bitmap = new Bitmap(brand.image);
            else
                bitmap = new Bitmap(Resources.upbarnd);
            // �]�w�P
            BrandBox tempBrandbox = new BrandBox(brand);

            // �]�w�۰��Y��
            tempBrandbox.SizeMode = PictureBoxSizeMode.AutoSize;

            // �]�w��Z
            tempBrandbox.Margin = new Padding(0);
            tempBrandbox.Padding = new Padding(padding);

            // �n�઺����
            bitmap.RotateFlip(rotate);

            // ����
            if (ShowAll && ShowBrandInfo)
                tempBrandbox.Click += new EventHandler(debug_Click);

            // �ƹ��ƥ�
            if (
                state == location.South
                && brand.getClass() != Settings.Default.Flower
                && brand.Team < 1
                )
            {
                tempBrandbox.MouseMove += new MouseEventHandler(tempBrandbox_MouseMove);
                tempBrandbox.MouseLeave += new EventHandler(brandBox_MouseLeave);
                tempBrandbox.Click += new EventHandler(brandBox_MouseClick);

                // �@���ƥ�
                //if (ShowAll && ShowBrandInfo)
                //    tempBrandbox.MouseHover += new EventHandler(debug_Click);
                //else
                //    tempBrandbox.MouseHover -= new EventHandler(debug_Click);
            }
            else if (cheat && state != location.South)
            {
                tempBrandbox.MouseClick += new MouseEventHandler(cheat_MouseClick);
            }
            else
            {
                tempBrandbox.Click -= new EventHandler(brandBox_MouseClick);
                tempBrandbox.MouseClick -= new MouseEventHandler(cheat_MouseClick);

            }
            bitmap = ResizeBitmap(bitmap, Settings.Default.ResizePercentage);

            // �]�w�Ϥ�
            tempBrandbox.Image = bitmap;

            // �s�W�ܱ��
            add_flowLayoutBrands(state, tempBrandbox);
        }
开发者ID:billteng,项目名称:mahjong,代码行数:60,代码来源:NewTable.cs

示例3: removeBrand

 public bool removeBrand(Brand brand)
 {
     Brand b;
     for (int i = 0; i < brandarray.Count; i++)
     {
         b = (Brand)brandarray[i];
         if (b.getClass() == brand.getClass())
             if (b.getNumber() == brand.getNumber())
             {
                 brandarray.RemoveAt(i);
                 return true;
             }
     }
     return false;
 }
开发者ID:billteng,项目名称:mahjong,代码行数:15,代码来源:BrandPlayer.cs

示例4: showBrand

 public void showBrand(Brand brand)
 {
     StringBuilder s = new StringBuilder();
     s.Append(brand.getNumber() + "," + brand.getClass() + "\n");
     s.Append(Settings.Default.Debug_Number);
     s.Append(": " + brand.getNumber() + "\n");
     s.Append(Settings.Default.Debug_Class);
     s.Append(": " + brand.getClass() + "\n");
     s.Append(Settings.Default.Debug_Source);
     s.Append(": " + brand.Source + "\n");
     s.Append(Settings.Default.Debug_Team);
     s.Append(": " + brand.Team + "\n");
     s.Append(Settings.Default.Debug_IsCanSee);
     s.Append(": " + brand.IsCanSee + "\n");
     s.Append(Settings.Default.WhoPush);
     s.Append(": " + all.getLocation.location_to_string(brand.WhoPush) + "\n");
     //s.Append(Settings.Default.Debug_Picture);
     //s.Append(":\nX:" + Location.X + " Y: " + Location.Y + "\n");
     //s.Append(Settings.Default.Debug_Picture_Width);
     //s.Append(": " + Size.Width + "\n");
     //s.Append(Settings.Default.Debug_Picture_Height);
     //s.Append(": " + Size.Height + "\n");
     MessageBox.Show(s.ToString(), Settings.Default.Debug);
 }
开发者ID:Superbil,项目名称:mahjong,代码行数:24,代码来源:Table.cs

示例5: addimage

        protected virtual void addimage(location state, Brand brand, RotateFlipType rotate)
        {
            Bitmap bitmap;
            // 如果是可視的牌就設定顯示牌的圖型,否則就顯示直立的牌 Resources.upbarnd
            if (brand.IsCanSee || state == location.South || ShowAll)
                bitmap = new Bitmap(ResourcesTool.getImage(brand));
            else
                bitmap = new Bitmap(Resources.upbarnd);
            // 設定牌
            BrandBox tempBrandbox = new BrandBox(brand);

            // 設定自動縮放
            tempBrandbox.SizeMode = PictureBoxSizeMode.AutoSize;

            // 設定邊距            
            tempBrandbox.Margin = new Padding(0);
            tempBrandbox.Padding = new Padding(padding);

            // 要轉的角度
            bitmap.RotateFlip(rotate);

            // 提示
            if (ShowAll && ShowBrandInfo)
                tempBrandbox.Click += new EventHandler(debug_Click);

            // 滑鼠事件
            if (
                state == location.South
                && brand.getClass() != Settings.Default.Flower
                && brand.Team < 1
                )
            {
                tempBrandbox.MouseMove += new MouseEventHandler(tempBrandbox_MouseMove);
                tempBrandbox.MouseLeave += new EventHandler(brandBox_MouseLeave);
                tempBrandbox.Click += new EventHandler(brandBox_MouseClick);

                // 作弊事件
                //if (ShowAll && ShowBrandInfo)
                //    tempBrandbox.MouseHover += new EventHandler(debug_Click);
                //else
                //    tempBrandbox.MouseHover -= new EventHandler(debug_Click);
            }
            else if (brand.Team >= 1)
            {
                tempBrandbox.BackColor = Color.DarkGreen;
            }
            else if (cheat && state != location.South)
            {
                tempBrandbox.MouseClick += new MouseEventHandler(cheat_MouseClick);
            }
            else
            {
                tempBrandbox.Click -= new EventHandler(brandBox_MouseClick);
                tempBrandbox.MouseClick -= new MouseEventHandler(cheat_MouseClick);

            }
            bitmap = ResizeBitmap(bitmap, Settings.Default.ResizePercentage);

            // 設定圖片      
            tempBrandbox.Image = bitmap;

            // 新增至控制項
            add_flowLayoutBrands(state, tempBrandbox);
        }
开发者ID:Superbil,项目名称:mahjong,代码行数:64,代码来源:Table.cs

示例6: getImage

        public static Image getImage(Brand brand)
        {
            switch (brand.getClass())
            {
                case "萬":
                    switch (brand.getNumber())
                    {
                        case 1:
                            return Resources.ten1;

                        case 2:
                            return Resources.ten2;

                        case 3:
                            return Resources.ten3;

                        case 4:
                            return Resources.ten4;

                        case 5:
                            return Resources.ten5;

                        case 6:
                            return Resources.ten6;

                        case 7:
                            return Resources.ten7;

                        case 8:
                            return Resources.ten8;

                        case 9:
                            return Resources.ten9;
                        default:
                            return null;
                    }

                case "索":
                    switch (brand.getNumber())
                    {
                        case 1:
                            return Resources.rope1;

                        case 2:
                            return Resources.rope2;

                        case 3:
                            return Resources.rope3;

                        case 4:
                            return Resources.rope4;

                        case 5:
                            return Resources.rope5;

                        case 6:
                            return Resources.rope6;

                        case 7:
                            return Resources.rope7;

                        case 8:
                            return Resources.rope8;

                        case 9:
                            return Resources.rope9;
                        default:
                            return null;
                    }

                case "筒":
                    switch (brand.getNumber())
                    {
                        case 1:
                            return Resources.tobe1;

                        case 2:
                            return Resources.tobe2;

                        case 3:
                            return Resources.tobe3;

                        case 4:
                            return Resources.tobe4;

                        case 5:
                            return Resources.tobe5;

                        case 6:
                            return Resources.tobe6;

                        case 7:
                            return Resources.tobe7;

                        case 8:
                            return Resources.tobe8;

                        case 9:
                            return Resources.tobe9;
                        default:
//.........这里部分代码省略.........
开发者ID:Superbil,项目名称:mahjong,代码行数:101,代码来源:ResourcesTool.cs

示例7: getSound

        public static UnmanagedMemoryStream getSound(Brand brand)
        {
            switch (brand.getClass())
            {
                case "萬":
                    switch (brand.getNumber())
                    {
                        case 1:
                            return Resources.ten1s;

                        case 2:
                            return Resources.ten2s;

                        case 3:
                            return Resources.ten3s;

                        case 4:
                            return Resources.ten4s;

                        case 5:
                            return Resources.ten5s;

                        case 6:
                            return Resources.ten6s;

                        case 7:
                            return Resources.ten7s;

                        case 8:
                            return Resources.ten8s;

                        case 9:
                            return Resources.ten9s;
                        default:
                            return null;
                    }

                case "索":
                    switch (brand.getNumber())
                    {
                        case 1:
                            return Resources.rope1s;

                        case 2:
                            return Resources.rope2s;

                        case 3:
                            return Resources.rope3s;

                        case 4:
                            return Resources.rope4s;

                        case 5:
                            return Resources.rope5s;

                        case 6:
                            return Resources.rope6s;

                        case 7:
                            return Resources.rope7s;

                        case 8:
                            return Resources.rope8s;

                        case 9:
                            return Resources.rope9s;
                        default:
                            return null;
                    }

                case "筒":
                    switch (brand.getNumber())
                    {
                        case 1:
                            return Resources.tobe1s;

                        case 2:
                            return Resources.tobe2s;

                        case 3:
                            return Resources.tobe3s;

                        case 4:
                            return Resources.tobe4s;

                        case 5:
                            return Resources.tobe5s;

                        case 6:
                            return Resources.tobe6s;

                        case 7:
                            return Resources.tobe7s;

                        case 8:
                            return Resources.tobe8s;

                        case 9:
                            return Resources.tobe9s;
                        default:
//.........这里部分代码省略.........
开发者ID:Superbil,项目名称:mahjong,代码行数:101,代码来源:ResourcesTool.cs

示例8: PlaySound

        /// <summary>
        /// 播放打牌聲音
        /// </summary>
        internal void PlaySound(Brand brand)
        {
            SoundPlayer soundplayer = new SoundPlayer();
            switch (brand.getClass())
            {
                case "萬":
                    switch (brand.getNumber())
                    {
                        case 1:
                            soundplayer.Stream = Resources.ten1s;
                            break;
                        case 2:
                            soundplayer.Stream = Resources.ten2s;
                            break;
                        case 3:
                            soundplayer.Stream = Resources.ten3s;
                            break;
                        case 4:
                            soundplayer.Stream = Resources.ten4s;
                            break;
                        case 5:
                            soundplayer.Stream = Resources.ten5s;
                            break;
                        case 6:
                            soundplayer.Stream = Resources.ten6s;
                            break;
                        case 7:
                            soundplayer.Stream = Resources.ten7s;
                            break;
                        case 8:
                            soundplayer.Stream = Resources.ten8s;
                            break;
                        case 9:
                            soundplayer.Stream = Resources.ten9s;
                            break;
                    }
                    break;
                case "索":
                    switch (brand.getNumber())
                    {
                        case 1:
                            soundplayer.Stream = Resources.rope1s;
                            break;
                        case 2:
                            soundplayer.Stream = Resources.rope2s;
                            break;
                        case 3:
                            soundplayer.Stream = Resources.rope3s;
                            break;
                        case 4:
                            soundplayer.Stream = Resources.rope4s;
                            break;
                        case 5:
                            soundplayer.Stream = Resources.rope5s;
                            break;
                        case 6:
                            soundplayer.Stream = Resources.rope6s;
                            break;
                        case 7:
                            soundplayer.Stream = Resources.rope7s;
                            break;
                        case 8:
                            soundplayer.Stream = Resources.rope8s;
                            break;
                        case 9:
                            soundplayer.Stream = Resources.rope9s;
                            break;
                    }
                    break;
                case "筒":
                    switch (brand.getNumber())
                    {
                        case 1:
                            soundplayer.Stream = Resources.tobe1s;
                            break;
                        case 2:
                            soundplayer.Stream = Resources.tobe2s;
                            break;
                        case 3:
                            soundplayer.Stream = Resources.tobe3s;
                            break;
                        case 4:
                            soundplayer.Stream = Resources.tobe4s;
                            break;
                        case 5:
                            soundplayer.Stream = Resources.tobe5s;
                            break;
                        case 6:
                            soundplayer.Stream = Resources.tobe6s;
                            break;
                        case 7:
                            soundplayer.Stream = Resources.tobe7s;
                            break;
                        case 8:
                            soundplayer.Stream = Resources.tobe8s;
                            break;
                        case 9:
//.........这里部分代码省略.........
开发者ID:billteng,项目名称:mahjong,代码行数:101,代码来源:Table.cs


注:本文中的Brand.getClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。