Example #1
0
        private void UpdateLog(string line)
        {
            // ghetto truncate
            if (RTB_Logs.Lines.Length > 99_999)
            {
                RTB_Logs.Lines = RTB_Logs.Lines.Skip(25_0000).ToArray();
            }

            RTB_Logs.AppendText(line);
            RTB_Logs.ScrollToCaret();
        }
Example #2
0
        private void UpdateLog(string line)
        {
            // ghetto truncate
            if (RTB_Logs.Lines.Length > 99_999)
            {
                RTB_Logs.Lines = RTB_Logs.Lines.Skip(25_0000).ToArray();
            }

            RTB_Logs.AppendText(line);
            RTB_Logs.ScrollToCaret();

            var bot = RunningEnvironment?.Bots.Find(z => line.Contains(z.Connection.Name));

            if (bot == null)
            {
                return;
            }

            var index     = RunningEnvironment !.Bots.IndexOf(bot);
            var start     = line.IndexOf(bot.Connection.Name, StringComparison.Ordinal);
            var substring = line.Substring(start).Trim();

            LV_Bots.Items[index].SubItems[3].Text = substring;
        }
Example #3
0
 private void WriteLog(string log)
 {
     RTB_Logs.AppendText(log + Environment.NewLine);
 }