Forex_Strategy_Builder.Info_Panel.Update C# (CSharp) Method

Update() public method

Update
public Update ( string asParams, string asValues, bool abFlags, string caption ) : void
asParams string
asValues string
abFlags bool
caption string
return void
        public void Update(string[] asParams, string[] asValues, bool[] abFlags, string caption)
        {
            this.asParam = asParams;
            this.asValue = asValues;
            this.abFlag  = abFlags;
            this.caption = caption;

            rows = asParam.Length;
            requiredHeight = captionHeight + rows * rowHeight + border;

            // Maximum width
            maxParamWidth = 0;
            maxValueWidth = 0;
            Graphics g = CreateGraphics();
            for (int i = 0; i < rows; i++)
            {
                float fWidthParam = g.MeasureString(asParam[i], fontData).Width;
                if (fWidthParam > maxParamWidth)
                    maxParamWidth = fWidthParam;

                float fValueWidth = g.MeasureString(asValue[i], fontData).Width;
                if (fValueWidth > maxValueWidth)
                    maxValueWidth = fValueWidth;
            }
            g.Dispose();

            CalculateScrollBarStatus();
            CalculateTabs();
            Invalidate();

            return;
        }