Initial commit to new repository
This commit is contained in:
18
src/AxCopilot/Services/NotificationService.cs
Normal file
18
src/AxCopilot/Services/NotificationService.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace AxCopilot.Services;
|
||||
|
||||
/// <summary>
|
||||
/// 트레이 아이콘 풍선 알림을 핸들러/서비스에서 표시하기 위한 전달 서비스.
|
||||
/// App.xaml.cs의 SetupTrayIcon 이후 Initialize()로 초기화됩니다.
|
||||
/// </summary>
|
||||
internal static class NotificationService
|
||||
{
|
||||
private static Action<string, string>? _showBalloon;
|
||||
|
||||
/// <summary>App.xaml.cs에서 NotifyIcon 연결 시 호출</summary>
|
||||
public static void Initialize(Action<string, string> showBalloon)
|
||||
=> _showBalloon = showBalloon;
|
||||
|
||||
/// <summary>트레이 풍선 알림을 표시합니다.</summary>
|
||||
public static void Notify(string title, string message)
|
||||
=> _showBalloon?.Invoke(title, message);
|
||||
}
|
||||
Reference in New Issue
Block a user