Пример #1
0
        static Bitmap m_ImageCard;    //图片资源

        //构造函数
        public SmallCardControl()
        {
            //状态变量
            m_bHorizontal  = true;
            m_bPositively  = false;
            m_bDisplayItem = false;

            //扑克数据
            m_wCardCount = 0;

            for (int i = 0; i < m_CardItemArray.Length; i++)
            {
                m_CardItemArray[i] = new tagCardItem();
            }

            //间隔变量
            m_nXDistance     = DEF_X_DISTANCE;
            m_nYDistance     = DEF_Y_DISTANCE;
            m_nShootDistance = DEF_SHOOT_DISTANCE;

            //位置变量
            m_YCollocateMode = enYCollocateMode.enYTop;
            m_XCollocateMode = enXCollocateMode.enXLeft;
            m_BenchmarkPos   = new Point(0, 0);

            //加载资源
            m_ImageCard = Properties.Resources.SMALL_CARD;

            //获取大小
            //CImageHandle HandleImage(&m_ImageCard);
            m_CardSize = new Size(m_ImageCard.Width, m_ImageCard.Height);

            return;
        }
Пример #2
0
        static Bitmap m_ImageWin;                                   //图片资源


        public CardControl()
        {
            //状态变量
            m_bHorizontal  = true;
            m_bPositively  = false;
            m_bDisplayItem = false;

            //扑克数据
            m_cbCardCount = 0;

            for (int i = 0; i < m_CardItemArray.Length; i++)
            {
                m_CardItemArray[i] = new tagCardItem();
            }

            //间隔变量
            m_nXDistance     = DEF_X_DISTANCE;
            m_nYDistance     = DEF_Y_DISTANCE;
            m_nShootDistance = DEF_SHOOT_DISTANCE;

            //位置变量
            m_YCollocateMode = enYCollocateMode.enYTop;
            m_XCollocateMode = enXCollocateMode.enXLeft;
            m_BenchmarkPos   = new Point(0, 0);

            //加载资源
            m_ImageCard     = Properties.Resources.CARD;
            m_ImageCardMask = Properties.Resources.CARD_MASK;
            m_ImageWin      = Properties.Resources.MAX;

            //获取大小
            m_CardSize = new Size(m_ImageCard.Width / 13, m_ImageCard.Height / 5);

            return;
        }
Пример #3
0
        //基准位置
        public void SetBenchmarkPos(Point BenchmarkPos, enXCollocateMode XCollocateMode, enYCollocateMode YCollocateMode)
        {
            //设置变量
            m_BenchmarkPos   = BenchmarkPos;
            m_XCollocateMode = XCollocateMode;
            m_YCollocateMode = YCollocateMode;

            return;
        }
Пример #4
0
        //基准位置
        public void SetBenchmarkPos(int nXPos, int nYPos, enXCollocateMode XCollocateMode, enYCollocateMode YCollocateMode)
        {
            //设置变量
            m_BenchmarkPos.X = nXPos;
            m_BenchmarkPos.Y = nYPos;
            m_XCollocateMode = XCollocateMode;
            m_YCollocateMode = YCollocateMode;

            return;
        }