Compare commits

..
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -282,7 +282,7 @@
Style="{StaticResource SmallButton}" Click="CopyDiag_Click"/> Style="{StaticResource SmallButton}" Click="CopyDiag_Click"/>
</Grid> </Grid>
</Border> </Border>
<TextBlock DockPanel.Dock="Top" Text="Email and org IDs are redacted when copied." <TextBlock DockPanel.Dock="Top" Text="Org IDs are redacted when copied."
FontSize="10" Foreground="{DynamicResource SecondaryBrush}" FontSize="10" Foreground="{DynamicResource SecondaryBrush}"
Margin="14,6,14,6"/> Margin="14,6,14,6"/>
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
+7 -2
View File
@@ -495,7 +495,12 @@ public partial class PopupWindow : Window
private void CopyDiag_Click(object s, RoutedEventArgs e) private void CopyDiag_Click(object s, RoutedEventArgs e)
{ {
Clipboard.SetText(BuildDiagText()); var diagText = BuildDiagText();
for (int i = 0; i < 5; i++)
{
try { Clipboard.SetText(diagText); break; }
catch (Exception) { System.Threading.Thread.Sleep(100); }
}
CopyDiagButton.Content = "Copied! (IDs redacted)"; CopyDiagButton.Content = "Copied! (IDs redacted)";
var t = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1.5) }; var t = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1.5) };
t.Tick += (_, _) => { CopyDiagButton.Content = "Copy All"; t.Stop(); }; t.Tick += (_, _) => { CopyDiagButton.Content = "Copy All"; t.Stop(); };
@@ -624,7 +629,7 @@ public partial class PopupWindow : Window
sb.AppendLine(); sb.AppendLine();
sb.AppendLine($"Last path: {VM.DiagLastPath}"); sb.AppendLine($"Last path: {VM.DiagLastPath}");
sb.AppendLine($"Last status: {VM.DiagLastStatus}"); sb.AppendLine($"Last status: {VM.DiagLastStatus}");
sb.AppendLine($"Last error: {VM.DiagLastError}"); sb.AppendLine($"Last error: {(string.IsNullOrEmpty(VM.DiagLastError) ? "(none)" : VM.DiagLastError)}");
if (VM.DiagLastFetch.HasValue) if (VM.DiagLastFetch.HasValue)
sb.AppendLine($"Last fetch: {VM.DiagLastFetch.Value:HH:mm:ss}"); sb.AppendLine($"Last fetch: {VM.DiagLastFetch.Value:HH:mm:ss}");
sb.AppendLine(); sb.AppendLine();