Forex_Strategy_Builder.Starting_Tips.ShowTip C# (CSharp) Method

ShowTip() private method

Show random tip
private ShowTip ( bool bNextTip ) : void
bNextTip bool
return void
        void ShowTip(bool bNextTip)
        {
            if (tipsCount == 0)
                return;

            if (bNextTip)
            {
                if (indexTip < tipsCount - 1)
                    indexTip++;
                else
                    indexTip = 0;
            }
            else
            {
                if (indexTip > 0)
                    indexTip--;
                else
                    indexTip = tipsCount - 1;
            }

            if (showAllTips)
            {
                StringBuilder sbTips = new StringBuilder(tipsCount);

                foreach (XmlNode node in xmlTips.SelectNodes("tips/tip"))
                    sbTips.AppendLine(node.InnerXml);

                browser.DocumentText = header + sbTips.ToString() + footer;

            }
            else
            {
                currentTip = xmlTips.SelectNodes("tips/tip").Item(indexTip).InnerXml;

                browser.DocumentText = header.Replace("###", (indexTip + 1).ToString()) + currentTip + footer;

                Configs.CurrentTipNumber = indexTip;
            }

            return;
        }