Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 28 additions & 25 deletions CrashMessage.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions CrashMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,28 @@ public CrashMessage(string[] ex)
textBox1.Text = ex[0];

// Populate message
textBox2.Text = ex[1];
richTextBox2.Text = ex[1].Replace("\n", Environment.NewLine);
richTextBox2.Invalidate();
richTextBox2.Update(); // Force the RichTextBox to refresh its layout

// Populate stacktrace
// Populate information
foreach (var line in ex)
{
// If lines are exception or message
if (line == ex[0] || line == ex[1])
// If lines are exception type
if (line == ex[0])
{
// Do nothing
continue;
}
// Else output to stacktrace

if (line == ex[1])
{
// Write both the message and type to the information
richTextBox1.Text += $"{line.Replace("\\n", Environment.NewLine)} ({ex[0]})\n";
continue;
}

// Else output to information
richTextBox1.Text += line + "\n";
}
}
Expand Down