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(); }
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; }
private void WriteLog(string log) { RTB_Logs.AppendText(log + Environment.NewLine); }