namespace HeartRateMonitorAndroid.Services.Platform
{
///
/// Windows平台通知服务实现
///
public class WindowsNotificationService : INotificationService
{
///
/// 初始化通知服务
///
public void Initialize()
{
// Windows平台不需要特殊初始化
}
///
/// 显示心率通知
///
public void ShowHeartRateNotification(int currentHeartRate, double avgHeartRate, int minHeartRate, int maxHeartRate, TimeSpan duration)
{
string title = "心率监测";
string content = $"当前心率: {currentHeartRate} bpm 平均: {avgHeartRate:0} bpm";
#if WINDOWS
Platforms.Windows.WindowsNotificationHelper.ShowNotification(title, content);
#endif
}
///
/// 取消通知
///
public void CancelNotification()
{
#if WINDOWS
Platforms.Windows.WindowsNotificationHelper.CancelNotification();
#endif
}
///
/// 显示重连通知
///
public void ShowReconnectionNotification(string title, string message, int attemptCount)
{
#if WINDOWS
Platforms.Windows.WindowsNotificationHelper.ShowNotification(title, message);
#endif
}
}
}