Upcoming view, search/filters, lead reminders, birthdays, folder colors, ICS, sound, undo
- 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>
This commit is contained in:
32
Services/SoundService.cs
Normal file
32
Services/SoundService.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
#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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user