Add desktop diagnostics and resilient message handling
This commit is contained in:
@@ -9,6 +9,7 @@ public sealed class TrayApplicationContext : ApplicationContext
|
||||
|
||||
public TrayApplicationContext()
|
||||
{
|
||||
AppLogger.Info("Tray application starting.");
|
||||
var keyboard = new KeyboardInjectionService();
|
||||
var handler = new SyncMessageHandler(keyboard);
|
||||
|
||||
@@ -31,6 +32,7 @@ public sealed class TrayApplicationContext : ApplicationContext
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AppLogger.Error("Failed to start tray application.", ex);
|
||||
notifyIcon.BalloonTipTitle = "WirelessTextSyncer";
|
||||
notifyIcon.BalloonTipText = $"Failed to start: {ex.Message}";
|
||||
notifyIcon.ShowBalloonTip(5000);
|
||||
|
||||
Reference in New Issue
Block a user