ME3Explorer.Texplorer2.OutputBoxPrintLn C# (CSharp) Method

OutputBoxPrintLn() private method

private OutputBoxPrintLn ( string message ) : void
message string
return void
        private void OutputBoxPrintLn(string message)
        {
            if (noWindow)
            {
                DebugOutput.PrintLn(message);
                return;
            }

            if (!OutputBox.Parent.Created)
            {
                Task.Run(() =>
                {
                    try
                    {
                        while (!OutputBox.Parent.Created)
                            System.Threading.Thread.Sleep(100);
                        OutputBoxPrintLn(message);
                    }
                    catch
                    {
                        return;
                    }
                });
                return;
            }

            DebugOutput.PrintLn(message);
            if (OutputBox.InvokeRequired)
                OutputBox.Invoke(new Action(() =>
                {
                    OutputBox.AppendText(message + Environment.NewLine);
                    OutputBox.ScrollToCaret();
                }));
            else
            {
                OutputBox.AppendText(message + Environment.NewLine);
                OutputBox.ScrollToCaret();
            }
        }
Texplorer2