code_style: simplify static commands used by styles and main menu; run dotnet format

This commit is contained in:
leo 2024-09-02 20:27:12 +08:00
parent e27d2d6a3f
commit 998230edff
No known key found for this signature in database
10 changed files with 35 additions and 52 deletions

View file

@ -318,6 +318,17 @@ namespace SourceGit
}
}
private static void CopyTextBlock(TextBlock textBlock)
{
if (textBlock == null)
return;
if (textBlock.Inlines is { Count: > 0 } inlines)
CopyText(inlines.Text);
else if (!string.IsNullOrEmpty(textBlock.Text))
CopyText(textBlock.Text);
}
private static void LogException(Exception ex)
{
if (ex == null)