コード例 #1
0
        /// <summary>
        /// Gets the button coordinates for the given index into the button list.
        /// </summary>
        /// <param name="cntBtnTitles">The BTN titles.</param>
        /// <param name="buttonIdx">Index of the button.</param>
        /// <returns></returns>
        private Coordinate GetButtonCoordinates(int cntBtnTitles, int buttonIdx)
        {
            BoundingBox boundingBox = _engine.GetBoundingAreaByClassIndex("leveledBoxOXPd", 0);

            // middle of the table containing the folder buttons
            int coordX    = boundingBox.Width / 2 + boundingBox.Left;
            int folderHgt = boundingBox.Height / cntBtnTitles;
            int coordY    = boundingBox.Top + (folderHgt / 2) + (buttonIdx * folderHgt) + _yOffset;

            return(new Coordinate(coordX, coordY));
        }