Skip to content

Commit

Permalink
Add debug logs for message boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Jul 2, 2024
1 parent f751e13 commit facb992
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Bloxstrap/UI/Frontend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ static class Frontend

public static MessageBoxResult ShowMessageBox(string message, MessageBoxImage icon = MessageBoxImage.None, MessageBoxButton buttons = MessageBoxButton.OK, MessageBoxResult defaultResult = MessageBoxResult.None)
{
App.Logger.WriteLine("Frontend::ShowMessageBox", message);

if (App.LaunchSettings.IsQuiet)
return defaultResult;

Expand All @@ -31,7 +33,7 @@ public static MessageBoxResult ShowMessageBox(string message, MessageBoxImage ic
}));

default:
return System.Windows.MessageBox.Show(message, App.ProjectName, buttons, icon);
return MessageBox.Show(message, App.ProjectName, buttons, icon);
}
}

Expand All @@ -43,11 +45,11 @@ public static void ShowExceptionDialog(Exception exception)
});
}

public static void ShowConnectivityDialog(string targetName, string description, Exception exception)
public static void ShowConnectivityDialog(string title, string description, Exception exception)
{
Application.Current.Dispatcher.Invoke(() =>
{
new ConnectivityDialog(targetName, description, exception).ShowDialog();
new ConnectivityDialog(title, description, exception).ShowDialog();
});
}

Expand Down

0 comments on commit facb992

Please sign in to comment.