Example #1
0
        // Log Update
        void Log(string strMessage, bool addCR = true)
        {
            string[]    splitStr = strMessage.Split('#');
            RichTextBox tRtb;

            tRtb = rbLog;
            if (tRtb.InvokeRequired)
            {
                _del_UpdateLog recurFunc = new _del_UpdateLog(Log);
                this.Invoke(recurFunc, new object[] { strMessage, addCR });
            }
            else
            {
                if (!bLoggingEverything)
                {
                    return;
                }
                if (splitStr[0].ToUpper() == "CLEAR")
                {
                    tRtb.Clear();
                }
                else
                {
                    if (addCR)
                    {
                        strMessage += "\r";
                    }
                    tRtb.AppendText(strMessage);//
                    tRtb.SelectionStart = tRtb.Text.Length;
                    tRtb.ScrollToCaret();
                }
            }
        }
Example #2
0
        // Result Update
        void LogStatus(string strMessage, bool addCR = true)
        {
            string[] splitStr = strMessage.Split('#');

            if (stsMainFrm.InvokeRequired)
            {
                _del_UpdateLog recurFunc = new _del_UpdateLog(LogStatus);
                this.Invoke(recurFunc, new object[] { strMessage, addCR });
            }
            else
            {
                //UpdateGraphs();
                this.tslbState.Text = strMessage;
            }
        }