1
0
mirror of synced 2025-01-31 04:13:51 +01:00

Add console improvements to not break and keep logs if nt open.

This commit is contained in:
KillzXGaming 2019-06-15 09:33:12 -04:00
parent c9d3c3efa9
commit c289287d14
4 changed files with 6 additions and 1 deletions

Binary file not shown.

View File

@ -13,6 +13,8 @@ namespace Switch_Toolbox.Library
private static STConsole console;
public static STConsole Instance { get { return console == null || console.IsDisposed ? console = new STConsole() : console; } }
private static string ConsoleText = "";
public STConsole()
{
BorderStyle = BorderStyle.None;
@ -66,7 +68,10 @@ namespace Switch_Toolbox.Library
Color ForeColor = color ?? FormThemes.BaseTheme.TextForeColor;
console.AppendTextData($"{Line}", ForeColor);
if (console != null || !console.Disposing || !console.Disposed)
console.AppendTextData($"{Line}", ForeColor);
ConsoleText += $"{line}/n";
}
private void AppendTextData(string Text, Color color)