- Upcoming: all folders grouped by overdue/today/tomorrow/7 days/later/done - Search (Ctrl+F) + All/Today/Overdue filters + hide done (persisted) - Lead reminder 1/2/3 days or 1 week before; birth year shows age - Several due reminders are combined into one balloon - Folder colors and reordering (drag, context menu) - iCalendar export with RRULE and VALARM - Generated reminder chime (ComfyUI / Stable Audio), can be turned off - Undo snackbar for deleted tasks/folders (Ctrl+Z), Ctrl+N, Del, Esc - 41 tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
950 B
C#
33 lines
950 B
C#
#nullable enable
|
|
using System;
|
|
using System.Media;
|
|
using System.Windows;
|
|
|
|
namespace ReminderOrganizer.Services
|
|
{
|
|
/// <summary>Plays the reminder chime (Assets/reminder.wav, embedded as WPF resource).</summary>
|
|
public static class SoundService
|
|
{
|
|
private static SoundPlayer? _player;
|
|
|
|
public static void PlayReminder()
|
|
{
|
|
try
|
|
{
|
|
if (_player == null)
|
|
{
|
|
var res = Application.GetResourceStream(new Uri("pack://application:,,,/Assets/reminder.wav"));
|
|
if (res == null) { SystemSounds.Asterisk.Play(); return; }
|
|
_player = new SoundPlayer(res.Stream);
|
|
_player.Load();
|
|
}
|
|
_player.Play();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
System.Diagnostics.Debug.WriteLine($"[Sound] {ex.Message}");
|
|
}
|
|
}
|
|
}
|
|
}
|