Added missing log textbox invokes, minor cleanup

This commit is contained in:
N00MKRAD
2025-03-10 20:13:35 +01:00
parent 1c2162b52a
commit bef933b6f9
2 changed files with 5 additions and 5 deletions

View File

@@ -81,11 +81,11 @@ namespace Flowframes
{
if (!entry.hidden && entry.replaceLastLine)
{
textbox.Invoke(new Action(() => {
textbox.Invoke(() => {
textbox.Suspend();
string[] lines = textbox.Text.SplitIntoLines();
textbox.Text = string.Join(Environment.NewLine, lines.Take(lines.Count() - 1).ToArray());
}));
});
}
}
catch (Exception ex)
@@ -200,7 +200,7 @@ namespace Flowframes
public static void ClearLogBox()
{
textbox.Text = "";
textbox.Invoke(() => textbox.Text = "");
}
public static string GetLastLine(bool includeHidden = false)
@@ -210,7 +210,7 @@ namespace Flowframes
public static void RemoveLastLine()
{
textbox.Text = textbox.Text.Remove(textbox.Text.LastIndexOf(Environment.NewLine));
textbox.Invoke(() => textbox.Text = textbox.Text.Remove(textbox.Text.LastIndexOf(Environment.NewLine)));
}
}
}