Forex_Strategy_Builder.Strategy_Layout.PnlPropertiesCalculateHeight C# (CSharp) Метод

PnlPropertiesCalculateHeight() приватный Метод

Calculates the height of the Averaging Panel
private PnlPropertiesCalculateHeight ( int width ) : int
width int The panel width
Результат int
        int PnlPropertiesCalculateHeight(int width)
        {
            width -= 2; // the width of the border

            Font fontCaption = new Font(Font.FontFamily, 9f);
            int  iVPosition  = (int)Math.Max(fontCaption.Height, 18) + 3;

            Font  fontAveraging = new Font(Font.FontFamily, 9f);

            if (slotMinMidMax == SlotSizeMinMidMax.min)
                iVPosition += fontAveraging.Height;
            else
                //iVPosition += 5 * fontAveraging.Height + 5; // Break Even
                iVPosition += 4 * fontAveraging.Height + 5;

            return iVPosition + 8;
        }