Exemplo n.º 1
0
        public override int getTopLeftX()
        {
            if (percentLeft != -1)
            {
                return((int)(percentLeft * Relative.getWidth() + Relative.getTopLeftX()));
            }
            else if (percentRight != -1)
            {
                return((int)(Relative.getBottomRightX() - percentRight * Relative.getWidth() - getWidth()));
            }
            else if (right != -1)
            {
                return((int)(Relative.getBottomRightX() - right - getWidth()));
            }

            return((int)(left + Relative.getTopLeftX()));
        }
        public override int getTopLeftX()
        {
            if (Relative.GetType() == typeof(ViewScroll))
            {
                return(base.getTopLeftX());
            }

            if (percentLeft != -1)
            {
                return((int)(percentLeft * Relative.getWidth() + Relative.getTopLeftX()));
            }
            else if (percentRight != -1)
            {
                return((int)(Relative.getBottomRightX() - percentRight * Relative.getWidth() - getWidth()));
            }
            else if (right != -1)
            {
                return((int)(Relative.getBottomRightX() - right - getWidth()));
            }

            return((int)(left + Relative.getTopLeftX()));
        }