Skip to content

Commit

Permalink
Various crash dialog fixes
Browse files Browse the repository at this point in the history
- Fix crash report's default file name containing illegal characters

- Fix inconsistent button sizes on crash dialog
  • Loading branch information
Sparronator9999 committed Sep 4, 2024
1 parent 60b8112 commit 7975558
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 31 deletions.
40 changes: 12 additions & 28 deletions YAMDCC.GUI/Dialogs/CrashDialog.Designer.cs

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

6 changes: 3 additions & 3 deletions YAMDCC.GUI/Dialogs/CrashDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public CrashDialog(Exception ex, bool threadException)
{
InitializeComponent();
txtStackTrace.Text = threadException
? "Called from Application.ThreadException"
: "Called from AppDomain.CurrentDomain.UnhandledException";
? "Called from Application.ThreadException\n"
: "Called from AppDomain.CurrentDomain.UnhandledException\n";

txtStackTrace.Text += $"{ex.Message}\n{ex.StackTrace}";
}
Expand All @@ -27,7 +27,7 @@ private void btnSaveReport_Click(object sender, EventArgs e)
SaveFileDialog sfd = new SaveFileDialog
{
AddExtension = true,
FileName = $"crash-{DateTime.Now:s}.txt",
FileName = $"crash-{DateTime.Now:yyyy'-'MM'-'dd'T'HH'-'mm'-'ss}.txt",
Filter = "Text files (*.txt)|*.txt",
Title = "Save crash report",
};
Expand Down

0 comments on commit 7975558

Please sign in to comment.