Exemplo n.º 1
0
        // - для HeadlinesScores_Controls[]
        void MoveControlCover(ControlCover cc, int matchNo)
        {
            int elementMultiHeight = elementHeight; //мульти-высота
            if (this.isSplit)
            {
                elementMultiHeight += (offset_sub + elementHeight) * (SUBDEALS.Count - 1);
            }

            int offset4marker = (offset < 0 ? 1 : 0);

            int X = 0, Y = 0;

            X = offset4marker + offset + 1;
            Y = offset4marker + offset + 1;
            X += this.AutoScrollPosition.X;
            Y += this.AutoScrollPosition.Y;
            Y += headerHeight + offset;

            if (isRobber)
            {
                for (int i = 0; i < matchNo; i++)
                {
                    Y += (offset + headlinescoreHeight) + ROBBERS[i].ScoreArray.Count * (elementMultiHeight + offset);
                }
            }
            else
            {
                for (int i = 0; i < matchNo; i++)
                {
                    Y += (offset + headlinescoreHeight) + GameSettings_DealsInMatch * (elementMultiHeight + offset);
                }
            }

            X++;
            Y++;
            cc.Move(new Point(X, Y));
        }
Exemplo n.º 2
0
        // - для обычных элементов таблицы
        void MoveControlCover(ControlCover cc, int line, int pos)
        {
            int columnIndex = (this.isSplit ? SUBDEALS_CONTROLS_Get_Split_Coordinates(pos).column : pos);

            int elementMultiHeight = elementHeight; //мульти-высота
            if (this.isSplit)
            {
                elementMultiHeight += (offset_sub + elementHeight) * (SUBDEALS.Count - 1);
            }

            int X = 0, Y = 0;
            int offset4marker = (offset < 0 ? 1 : 0);
            Y = offset4marker + offset + 1;
            Y += this.AutoScrollPosition.Y;
            Y += headerHeight + offset;
            if (this.isRobber)
            {
                int robNo = ROBBERS.GetRobberNo(line);
                int robDeal = ROBBERS.GetRobDealNo(line);
                for (int i = 0; i < robNo; i++)
                {
                    Y += (offset + headlinescoreHeight) + ROBBERS[i].ScoreArray.Count * (elementMultiHeight + offset);
                }
                Y += (offset + headlinescoreHeight) + robDeal * (elementMultiHeight + offset);
            }
            else
            {
                Y += (offset + elementMultiHeight) * line;
                Y += (offset + headlinescoreHeight) * (MATCHES_GetMatchNo(line) + 1);
            }
            if (this.isSplit)
            {
                Y += SUBDEALS_CONTROLS_Get_Split_Coordinates(pos).level * (offset_sub + elementHeight);
            }

            X = offset4marker + offset + 1;
            X += this.AutoScrollPosition.X;
            for (int i = 0; i < columnIndex; i++)
            {
                X += (offset + arrHeadersWidths[i]);
            }

            X++;
            Y++;
            cc.Move(new Point(X, Y));
        }