2026-11-29 14:42:16 +01:00
|
|
|
|
#nullable enable
|
2026-11-25 13:44:02 +01:00
|
|
|
|
using System;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
using System.Collections.Generic;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
using System.Collections.ObjectModel;
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
using System.Collections.Specialized;
|
|
|
|
|
|
using System.ComponentModel;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
using System.Linq;
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
using System.Text;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Windows;
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
using System.Windows.Data;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
|
using System.Windows.Threading;
|
|
|
|
|
|
using ReminderOrganizer.Core;
|
|
|
|
|
|
using ReminderOrganizer.Models;
|
|
|
|
|
|
using ReminderOrganizer.Services;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ReminderOrganizer.ViewModels
|
|
|
|
|
|
{
|
|
|
|
|
|
public class MainViewModel : ViewModelBase
|
|
|
|
|
|
{
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
public const string DiscordUrl = "https://discord.gg/Ej4JPmCZva";
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
private readonly IDataService _dataService;
|
|
|
|
|
|
private readonly INotificationService _notificationService;
|
|
|
|
|
|
private readonly ILocalizationService _localizationService;
|
|
|
|
|
|
private readonly IAutostartService _autostartService;
|
|
|
|
|
|
private readonly DispatcherTimer _reminderTimer;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
private readonly DispatcherTimer _undoTimer;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
|
|
|
|
|
private AppData _appData = new();
|
|
|
|
|
|
private Folder? _selectedFolder;
|
|
|
|
|
|
private ReminderTask? _selectedTask;
|
|
|
|
|
|
private bool _isLoading;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
private bool _isUpcomingMode;
|
|
|
|
|
|
private ListCollectionView? _tasksView;
|
|
|
|
|
|
private readonly ObservableCollection<ReminderTask> _allTasks = new();
|
|
|
|
|
|
private DateTime _lastRefreshDay = DateTime.Today;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// ---------- texts ----------
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Localized text for XAML: {Binding [Key]}. Refreshed with OnPropertyChanged("").</summary>
|
|
|
|
|
|
public string this[string key] => L(key);
|
|
|
|
|
|
public string L(string key) => _localizationService.GetString(key);
|
|
|
|
|
|
|
|
|
|
|
|
public string CopyrightText => $"© {DateTime.Now.Year} Michael Media";
|
|
|
|
|
|
public string VersionText => "v" + (typeof(MainViewModel).Assembly.GetName().Version?.ToString(3) ?? "");
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- state ----------
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsLoading { get => _isLoading; set => SetProperty(ref _isLoading, value); }
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<Folder> Folders => _appData.Folders;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public IReadOnlyList<string> FolderColors => Folder.Palette;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
|
|
|
|
|
public Folder? SelectedFolder
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _selectedFolder;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
set => SelectFolder(value);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Folder chosen in the sidebar (always leaves the "Upcoming" view).</summary>
|
|
|
|
|
|
public void SelectFolder(Folder? folder)
|
|
|
|
|
|
{
|
|
|
|
|
|
bool changed = !ReferenceEquals(_selectedFolder, folder) || _isUpcomingMode;
|
|
|
|
|
|
_selectedFolder = folder;
|
|
|
|
|
|
_isUpcomingMode = false;
|
2026-11-29 15:06:19 +01:00
|
|
|
|
_categoryFilter = null;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
if (!changed) return;
|
|
|
|
|
|
OnPropertyChanged(nameof(SelectedFolder));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsUpcomingMode));
|
2026-11-29 15:06:19 +01:00
|
|
|
|
OnPropertyChanged(nameof(CategoryFilter));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsAllUpcoming));
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
RebuildView();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsUpcomingMode
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _isUpcomingMode;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
set
|
|
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
if (_isUpcomingMode == value) return;
|
|
|
|
|
|
_isUpcomingMode = value;
|
|
|
|
|
|
OnPropertyChanged();
|
2026-11-29 15:06:19 +01:00
|
|
|
|
OnPropertyChanged(nameof(IsAllUpcoming));
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
RebuildView();
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public ReminderTask? SelectedTask { get => _selectedTask; set => SetProperty(ref _selectedTask, value); }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Tasks shown in the list (folder or all, filtered, sorted, grouped in "Upcoming").</summary>
|
|
|
|
|
|
public ICollectionView? TasksView => _tasksView;
|
|
|
|
|
|
|
|
|
|
|
|
public int VisibleCount { get; private set; }
|
|
|
|
|
|
public bool HasVisibleTasks => VisibleCount > 0;
|
|
|
|
|
|
public bool HasSelectedFolder => SelectedFolder != null;
|
|
|
|
|
|
|
2026-11-29 15:06:19 +01:00
|
|
|
|
public string HeaderTitle => ActiveCategory?.Name ?? (IsUpcomingMode ? L("Upcoming") : SelectedFolder?.Name ?? L("Welcome"));
|
|
|
|
|
|
public string HeaderColor => ActiveCategory?.Color ?? (IsUpcomingMode ? Folder.DefaultColor : SelectedFolder?.Color ?? Folder.DefaultColor);
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
|
|
|
|
|
|
public string TaskCountText
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
int total = IsUpcomingMode ? _allTasks.Count : SelectedFolder?.Tasks.Count ?? 0;
|
|
|
|
|
|
return IsFiltering && VisibleCount != total
|
|
|
|
|
|
? string.Format(L("CountOfTotal"), VisibleCount, total)
|
|
|
|
|
|
: $"{total} {L("Tasks")}";
|
|
|
|
|
|
}
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
/// <summary>Badge on "Upcoming": open tasks that are overdue or due within 7 days.</summary>
|
|
|
|
|
|
public int UpcomingCount
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
var now = DateTime.Now;
|
|
|
|
|
|
return _allTasks.Count(t => TaskQuery.Bucket(t, now) is TaskBucket.Overdue or TaskBucket.Today or TaskBucket.Tomorrow or TaskBucket.ThisWeek);
|
|
|
|
|
|
}
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public string EmptyTitle => IsFiltering ? L("NoMatches") : L("NoTasks");
|
|
|
|
|
|
public string EmptyHint => IsFiltering ? L("NoMatchesHint") : L("CreateTaskHint");
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- search / filter ----------
|
|
|
|
|
|
|
|
|
|
|
|
private string _searchText = "";
|
|
|
|
|
|
public string SearchText
|
2026-11-25 13:44:02 +01:00
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
get => _searchText;
|
|
|
|
|
|
set { if (SetProperty(ref _searchText, value ?? "")) RefreshView(); }
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
private TaskFilterMode _filterMode = TaskFilterMode.All;
|
|
|
|
|
|
public TaskFilterMode FilterMode
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _filterMode;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!SetProperty(ref _filterMode, value)) return;
|
|
|
|
|
|
OnPropertyChanged(nameof(IsFilterAll));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsFilterToday));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsFilterOverdue));
|
|
|
|
|
|
RefreshView();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public bool IsFilterAll { get => FilterMode == TaskFilterMode.All; set { if (value) FilterMode = TaskFilterMode.All; } }
|
|
|
|
|
|
public bool IsFilterToday { get => FilterMode == TaskFilterMode.Today; set { if (value) FilterMode = TaskFilterMode.Today; } }
|
|
|
|
|
|
public bool IsFilterOverdue { get => FilterMode == TaskFilterMode.Overdue; set { if (value) FilterMode = TaskFilterMode.Overdue; } }
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public bool HideDone
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _appData.HideDone;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_appData.HideDone == value) return;
|
|
|
|
|
|
_appData.HideDone = value;
|
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
|
RefreshView();
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
|
2026-11-29 15:06:19 +01:00
|
|
|
|
private bool IsFiltering => !string.IsNullOrWhiteSpace(SearchText) || FilterMode != TaskFilterMode.All || HideDone || CategoryFilter != null;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
|
|
|
|
|
|
// ---------- settings ----------
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
public bool IsGerman
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _localizationService.CurrentLanguage == "de";
|
|
|
|
|
|
set { if (value) _localizationService.SetLanguage("de"); }
|
|
|
|
|
|
}
|
|
|
|
|
|
public bool IsEnglish
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _localizationService.CurrentLanguage == "en";
|
|
|
|
|
|
set { if (value) _localizationService.SetLanguage("en"); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsAutostartEnabled
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _autostartService.IsAutostartEnabled;
|
|
|
|
|
|
set { if (value != _autostartService.IsAutostartEnabled) ToggleAutostart(); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- theme: system / light / dark ----------
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>"system", "light" or "dark".</summary>
|
|
|
|
|
|
public string ThemeMode
|
|
|
|
|
|
{
|
|
|
|
|
|
get => string.IsNullOrEmpty(_appData.ThemeMode) ? "system" : _appData.ThemeMode;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (ThemeMode == value) return;
|
|
|
|
|
|
_appData.ThemeMode = value;
|
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
|
OnPropertyChanged(nameof(IsThemeSystem));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsThemeLight));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsThemeDark));
|
|
|
|
|
|
ApplyThemeMode();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
public bool IsThemeSystem { get => ThemeMode == "system"; set { if (value) ThemeMode = "system"; } }
|
|
|
|
|
|
public bool IsThemeLight { get => ThemeMode == "light"; set { if (value) ThemeMode = "light"; } }
|
|
|
|
|
|
public bool IsThemeDark { get => ThemeMode == "dark"; set { if (value) ThemeMode = "dark"; } }
|
|
|
|
|
|
|
|
|
|
|
|
private void ApplyThemeMode()
|
|
|
|
|
|
{
|
|
|
|
|
|
IsDarkMode = ThemeMode switch
|
|
|
|
|
|
{
|
|
|
|
|
|
"light" => false,
|
|
|
|
|
|
"dark" => true,
|
|
|
|
|
|
_ => SystemPrefs.IsDarkMode()
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Windows switched light/dark: follow it when the app is set to "system".</summary>
|
|
|
|
|
|
public void OnSystemThemeChanged()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (ThemeMode == "system") ApplyThemeMode();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
private string _dataFolder = DataService.DefaultDataDirectory;
|
|
|
|
|
|
public string DataFolder { get => _dataFolder; private set => SetProperty(ref _dataFolder, value); }
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
|
|
|
|
|
|
// ---------- window placement ----------
|
|
|
|
|
|
|
|
|
|
|
|
public Rect? SavedWindowBounds =>
|
|
|
|
|
|
_appData.WindowWidth is double w && _appData.WindowHeight is double h && _appData.WindowLeft is double l && _appData.WindowTop is double t
|
|
|
|
|
|
? new Rect(l, t, w, h) : null;
|
|
|
|
|
|
public bool SavedWindowMaximized => _appData.WindowMaximized;
|
|
|
|
|
|
|
|
|
|
|
|
public void RememberWindow(Rect bounds, bool maximized)
|
|
|
|
|
|
{
|
|
|
|
|
|
_appData.WindowLeft = bounds.Left;
|
|
|
|
|
|
_appData.WindowTop = bounds.Top;
|
|
|
|
|
|
_appData.WindowWidth = bounds.Width;
|
|
|
|
|
|
_appData.WindowHeight = bounds.Height;
|
|
|
|
|
|
_appData.WindowMaximized = maximized;
|
|
|
|
|
|
}
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public bool PlaySound
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _appData.PlaySound;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_appData.PlaySound == value) return;
|
|
|
|
|
|
_appData.PlaySound = value;
|
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
private bool _isDarkMode = true;
|
|
|
|
|
|
public bool IsDarkMode
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _isDarkMode;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (SetProperty(ref _isDarkMode, value))
|
|
|
|
|
|
{
|
|
|
|
|
|
ThemeChanged?.Invoke(this, value);
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
_appData.IsDarkMode = value;
|
|
|
|
|
|
_ = SaveAsync();
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-29 15:06:19 +01:00
|
|
|
|
// ---------- categories ----------
|
|
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<Category> Categories => _appData.Categories;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Sidebar entries: every category that has entries, with count; active one highlighted.</summary>
|
|
|
|
|
|
public IReadOnlyList<CategoryNavItem> CategoryNav =>
|
|
|
|
|
|
_appData.Categories
|
|
|
|
|
|
.Select(c => new CategoryNavItem(c.Id, c.Name, c.Glyph, c.Color,
|
|
|
|
|
|
_allTasks.Count(t => t.IsAnniversary && !t.IsNotified && (t.CategoryId ?? Category.BirthdayId) == c.Id),
|
|
|
|
|
|
IsUpcomingMode && CategoryFilter == c.Id))
|
|
|
|
|
|
.Where(n => n.Count > 0)
|
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
|
|
public bool HasCategoryNav => CategoryNav.Count > 0;
|
|
|
|
|
|
|
|
|
|
|
|
private string? _categoryFilter;
|
|
|
|
|
|
/// <summary>Category shown in the "Upcoming" view (null = all).</summary>
|
|
|
|
|
|
public string? CategoryFilter
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _categoryFilter;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!SetProperty(ref _categoryFilter, value)) return;
|
|
|
|
|
|
OnPropertyChanged(nameof(HeaderTitle));
|
|
|
|
|
|
OnPropertyChanged(nameof(HeaderColor));
|
|
|
|
|
|
OnPropertyChanged(nameof(HeaderGlyph));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsAllUpcoming));
|
|
|
|
|
|
RefreshView();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Category? ActiveCategory => IsUpcomingMode && CategoryFilter != null
|
|
|
|
|
|
? _appData.Categories.FirstOrDefault(c => c.Id == CategoryFilter) : null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>"Upcoming" without a category filter (for the sidebar highlight).</summary>
|
|
|
|
|
|
public bool IsAllUpcoming => IsUpcomingMode && CategoryFilter == null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Icon in the header: category glyph, calendar for "Upcoming", null = folder outline.</summary>
|
|
|
|
|
|
public string? HeaderGlyph => ActiveCategory?.Glyph ?? (IsUpcomingMode ? "" : null);
|
|
|
|
|
|
|
|
|
|
|
|
private void ShowCategory(string? id)
|
|
|
|
|
|
{
|
|
|
|
|
|
_categoryFilter = id;
|
|
|
|
|
|
OnPropertyChanged(nameof(CategoryFilter));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsAllUpcoming));
|
|
|
|
|
|
if (!IsUpcomingMode) IsUpcomingMode = true; // rebuilds the view
|
|
|
|
|
|
else RebuildView();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void EditCategories()
|
|
|
|
|
|
{
|
|
|
|
|
|
var dialog = new CategoryWindow(_appData.Categories, IsDarkMode,
|
|
|
|
|
|
id => _allTasks.Count(t => t.IsAnniversary && (t.CategoryId ?? Category.BirthdayId) == id))
|
2026-11-29 18:20:04 +01:00
|
|
|
|
{ Owner = ActiveOwner };
|
2026-11-29 15:06:19 +01:00
|
|
|
|
if (dialog.ShowDialog() != true) return;
|
|
|
|
|
|
|
|
|
|
|
|
var result = dialog.Result;
|
|
|
|
|
|
var removed = _appData.Categories.Where(c => result.All(r => r.Id != c.Id)).Select(c => c.Id).ToHashSet();
|
|
|
|
|
|
_appData.Categories.Clear();
|
|
|
|
|
|
foreach (var c in result) _appData.Categories.Add(c);
|
|
|
|
|
|
foreach (var t in _allTasks)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (t.CategoryId != null && removed.Contains(t.CategoryId)) t.CategoryId = null; // back to birthday
|
|
|
|
|
|
t.RefreshCategory();
|
|
|
|
|
|
}
|
|
|
|
|
|
if (CategoryFilter != null && removed.Contains(CategoryFilter)) CategoryFilter = null;
|
|
|
|
|
|
UpdateCounts();
|
|
|
|
|
|
OnPropertyChanged(nameof(HeaderTitle));
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- month grouping ----------
|
|
|
|
|
|
|
|
|
|
|
|
public bool GroupByMonth
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _appData.GroupByMonth;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_appData.GroupByMonth == value) return;
|
|
|
|
|
|
_appData.GroupByMonth = value;
|
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
|
RebuildView();
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-29 14:42:16 +01:00
|
|
|
|
// ---------- view mode ----------
|
|
|
|
|
|
|
|
|
|
|
|
public string ViewMode
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _appData.ViewMode;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_appData.ViewMode == value) return;
|
|
|
|
|
|
_appData.ViewMode = value;
|
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
|
OnPropertyChanged(nameof(IsViewList));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsViewCompact));
|
|
|
|
|
|
OnPropertyChanged(nameof(IsViewCards));
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
public bool IsViewList { get => ViewMode == "list"; set { if (value) ViewMode = "list"; } }
|
|
|
|
|
|
public bool IsViewCompact { get => ViewMode == "compact"; set { if (value) ViewMode = "compact"; } }
|
|
|
|
|
|
public bool IsViewCards { get => ViewMode == "cards"; set { if (value) ViewMode = "cards"; } }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>"today", "tomorrow", "in 5 days", "yesterday", "3 days ago".</summary>
|
|
|
|
|
|
public string RelativeText(DateTime date, DateTime now)
|
|
|
|
|
|
{
|
|
|
|
|
|
int days = (date.Date - now.Date).Days;
|
|
|
|
|
|
return days switch
|
|
|
|
|
|
{
|
|
|
|
|
|
0 => L("RelToday"),
|
|
|
|
|
|
1 => L("RelTomorrow"),
|
|
|
|
|
|
-1 => L("RelYesterday"),
|
|
|
|
|
|
> 1 => string.Format(L("RelInDays"), days),
|
|
|
|
|
|
_ => string.Format(L("RelDaysAgo"), -days)
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// ---------- undo ----------
|
|
|
|
|
|
|
|
|
|
|
|
private Action? _undoAction;
|
|
|
|
|
|
private string _undoText = "";
|
|
|
|
|
|
public string UndoText { get => _undoText; private set => SetProperty(ref _undoText, value); }
|
|
|
|
|
|
public bool IsUndoVisible => _undoAction != null;
|
|
|
|
|
|
|
|
|
|
|
|
private void OfferUndo(string text, Action undo)
|
|
|
|
|
|
{
|
|
|
|
|
|
_undoAction = undo;
|
|
|
|
|
|
UndoText = text;
|
|
|
|
|
|
OnPropertyChanged(nameof(IsUndoVisible));
|
|
|
|
|
|
_undoTimer.Stop();
|
|
|
|
|
|
_undoTimer.Start();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void HideUndo()
|
|
|
|
|
|
{
|
|
|
|
|
|
_undoTimer.Stop();
|
|
|
|
|
|
_undoAction = null;
|
|
|
|
|
|
OnPropertyChanged(nameof(IsUndoVisible));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void Undo()
|
|
|
|
|
|
{
|
|
|
|
|
|
var action = _undoAction;
|
|
|
|
|
|
HideUndo();
|
|
|
|
|
|
if (action == null) return;
|
|
|
|
|
|
action();
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- events / commands ----------
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
public event EventHandler<bool>? ThemeChanged;
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
public event EventHandler<ReminderTask?>? EditTaskRequested;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
|
|
|
|
|
public ICommand AddFolderCommand { get; }
|
|
|
|
|
|
public ICommand AddTaskCommand { get; }
|
|
|
|
|
|
public ICommand AddTaskToFolderCommand { get; }
|
|
|
|
|
|
public ICommand DeleteTaskCommand { get; }
|
|
|
|
|
|
public ICommand EditTaskCommand { get; }
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
public ICommand ToggleDoneCommand { get; }
|
2026-11-25 13:44:02 +01:00
|
|
|
|
public ICommand ToggleAutostartCommand { get; }
|
|
|
|
|
|
public ICommand ExitCommand { get; }
|
|
|
|
|
|
public ICommand DeleteFolderCommand { get; }
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
public ICommand RenameFolderCommand { get; }
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public ICommand MoveFolderUpCommand { get; }
|
|
|
|
|
|
public ICommand MoveFolderDownCommand { get; }
|
|
|
|
|
|
public ICommand SetFolderColorCommand { get; }
|
2026-11-25 13:44:02 +01:00
|
|
|
|
public ICommand SaveFolderCommand { get; }
|
|
|
|
|
|
public ICommand SetLanguageDeCommand { get; }
|
|
|
|
|
|
public ICommand SetLanguageEnCommand { get; }
|
|
|
|
|
|
public ICommand ToggleDarkModeCommand { get; }
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public ICommand TogglePlaySoundCommand { get; }
|
2026-11-25 13:44:02 +01:00
|
|
|
|
public ICommand MoveTaskToFolderCommand { get; }
|
|
|
|
|
|
public ICommand TestNotificationCommand { get; }
|
|
|
|
|
|
public ICommand ImportCsvCommand { get; }
|
|
|
|
|
|
public ICommand ExportCsvCommand { get; }
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public ICommand ExportIcsCommand { get; }
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
public ICommand ImportIcsCommand { get; }
|
|
|
|
|
|
public ICommand ChangeDataFolderCommand { get; }
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
public ICommand OpenDiscordCommand { get; }
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
public ICommand ShowUpcomingCommand { get; }
|
|
|
|
|
|
public ICommand UndoCommand { get; }
|
|
|
|
|
|
public ICommand ClearSearchCommand { get; }
|
2026-11-29 15:06:19 +01:00
|
|
|
|
public ICommand EditCategoriesCommand { get; }
|
|
|
|
|
|
public ICommand ShowCategoryCommand { get; }
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
public ICommand OpenSettingsCommand { get; }
|
|
|
|
|
|
public ICommand OpenDataFolderCommand { get; }
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
|
|
|
|
|
public MainViewModel(
|
|
|
|
|
|
IDataService dataService,
|
|
|
|
|
|
INotificationService notificationService,
|
|
|
|
|
|
ILocalizationService localizationService,
|
|
|
|
|
|
IAutostartService autostartService)
|
|
|
|
|
|
{
|
|
|
|
|
|
_dataService = dataService;
|
|
|
|
|
|
_notificationService = notificationService;
|
|
|
|
|
|
_localizationService = localizationService;
|
|
|
|
|
|
_autostartService = autostartService;
|
|
|
|
|
|
|
2026-11-29 15:06:19 +01:00
|
|
|
|
ReminderTask.AgeFormatter = (task, years) =>
|
|
|
|
|
|
task.Category?.FormatYears(years, ReminderTask.DisplayCulture!(), L) ?? string.Format(L("TurnsAge"), years);
|
|
|
|
|
|
ReminderTask.CategoryLookup = id =>
|
|
|
|
|
|
_appData.Categories.FirstOrDefault(c => c.Id == id) ?? _appData.Categories.FirstOrDefault();
|
2026-11-29 14:42:16 +01:00
|
|
|
|
ReminderTask.DisplayCulture = () => new System.Globalization.CultureInfo(_localizationService.CurrentLanguage == "de" ? "de-DE" : "en-US");
|
|
|
|
|
|
ReminderTask.RelativeFormatter = RelativeText;
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
ReminderTask.RecurrenceFormatter = type => L(type.ToString());
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
// Empty name = refresh every binding (all texts depend on the language).
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
_localizationService.StringsChanged += (s, e) =>
|
|
|
|
|
|
{
|
2026-11-29 15:06:19 +01:00
|
|
|
|
Category.RelocalizePresets(_appData.Categories, L,
|
|
|
|
|
|
new[] { LocalizationService.LoadStrings("en"), LocalizationService.LoadStrings("de") });
|
|
|
|
|
|
foreach (var t in _allTasks) t.RefreshCategory();
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
OnPropertyChanged(string.Empty);
|
|
|
|
|
|
_tasksView?.Refresh(); // group headers + age texts
|
|
|
|
|
|
};
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
|
|
|
|
|
AddFolderCommand = new RelayCommand(AddFolder);
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
AddTaskCommand = new RelayCommand(AddTask, () => Folders.Count > 0);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
AddTaskToFolderCommand = new RelayCommand<Folder>(AddTaskToFolder);
|
|
|
|
|
|
DeleteTaskCommand = new RelayCommand<ReminderTask>(DeleteTask);
|
|
|
|
|
|
EditTaskCommand = new RelayCommand<ReminderTask>(EditTask);
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
ToggleDoneCommand = new RelayCommand<ReminderTask>(ToggleDone);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
DeleteFolderCommand = new RelayCommand(DeleteFolder, () => SelectedFolder != null);
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
RenameFolderCommand = new RelayCommand(RenameFolder, () => SelectedFolder != null);
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
MoveFolderUpCommand = new RelayCommand(() => MoveFolderBy(-1), () => SelectedFolder != null && Folders.IndexOf(SelectedFolder) > 0);
|
|
|
|
|
|
MoveFolderDownCommand = new RelayCommand(() => MoveFolderBy(1), () => SelectedFolder != null && Folders.IndexOf(SelectedFolder) < Folders.Count - 1);
|
|
|
|
|
|
SetFolderColorCommand = new RelayCommand<string>(SetFolderColor);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
SaveFolderCommand = new RelayCommand(async () => await SaveAsync());
|
|
|
|
|
|
ToggleAutostartCommand = new RelayCommand(ToggleAutostart);
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
SetLanguageDeCommand = new RelayCommand(() => _localizationService.SetLanguage("de"));
|
|
|
|
|
|
SetLanguageEnCommand = new RelayCommand(() => _localizationService.SetLanguage("en"));
|
2026-11-25 13:44:02 +01:00
|
|
|
|
ToggleDarkModeCommand = new RelayCommand(() => IsDarkMode = !IsDarkMode);
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
TogglePlaySoundCommand = new RelayCommand(() => PlaySound = !PlaySound);
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
ExitCommand = new RelayCommand(App.Quit);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
MoveTaskToFolderCommand = new RelayCommand<(ReminderTask, Folder)>(MoveTaskToFolder);
|
|
|
|
|
|
TestNotificationCommand = new RelayCommand(TestNotification);
|
|
|
|
|
|
ImportCsvCommand = new RelayCommand(ImportCsv);
|
|
|
|
|
|
ExportCsvCommand = new RelayCommand(ExportCsv);
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
ExportIcsCommand = new RelayCommand(ExportIcs);
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
ImportIcsCommand = new RelayCommand(ImportIcs);
|
|
|
|
|
|
ChangeDataFolderCommand = new RelayCommand(ChangeDataFolder);
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
OpenDiscordCommand = new RelayCommand(OpenDiscord);
|
2026-11-29 15:06:19 +01:00
|
|
|
|
ShowUpcomingCommand = new RelayCommand(() => ShowCategory(null));
|
|
|
|
|
|
ShowCategoryCommand = new RelayCommand<string>(ShowCategory);
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
OpenSettingsCommand = new RelayCommand(() =>
|
2026-11-29 18:20:04 +01:00
|
|
|
|
new SettingsWindow(this) { Owner = ActiveOwner }.ShowDialog());
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
OpenDataFolderCommand = new RelayCommand(() =>
|
|
|
|
|
|
{
|
|
|
|
|
|
try { System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo { FileName = DataFolder, UseShellExecute = true }); }
|
|
|
|
|
|
catch (Exception ex) { System.Diagnostics.Debug.WriteLine($"[OpenDataFolder] {ex.Message}"); }
|
|
|
|
|
|
});
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
UndoCommand = new RelayCommand(Undo);
|
2026-11-29 15:06:19 +01:00
|
|
|
|
ClearSearchCommand = new RelayCommand(() => { SearchText = ""; FilterMode = TaskFilterMode.All; CategoryFilter = null; });
|
|
|
|
|
|
EditCategoriesCommand = new RelayCommand(EditCategories);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
_reminderTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(30) };
|
2026-11-25 13:44:02 +01:00
|
|
|
|
_reminderTimer.Tick += (s, e) => CheckReminders();
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
_undoTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(7) };
|
|
|
|
|
|
_undoTimer.Tick += (s, e) => HideUndo();
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task InitializeAsync()
|
|
|
|
|
|
{
|
|
|
|
|
|
IsLoading = true;
|
|
|
|
|
|
_appData = await _dataService.LoadAsync();
|
2026-11-25 14:52:25 +01:00
|
|
|
|
bool firstRun = string.IsNullOrEmpty(_appData.Language) || _appData.IsDarkMode == null || _appData.Folders.Count == 0;
|
|
|
|
|
|
_appData.IsDarkMode ??= SystemPrefs.IsDarkMode();
|
|
|
|
|
|
_localizationService.Initialize(_appData); // fills Language from Windows if empty
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
if (_appData.Folders.Count == 0)
|
|
|
|
|
|
_appData.Folders.Add(new Folder(L("MyTasks")));
|
2026-11-25 14:52:25 +01:00
|
|
|
|
if (firstRun)
|
2026-11-25 13:44:02 +01:00
|
|
|
|
await SaveAsync();
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
|
2026-11-29 15:06:19 +01:00
|
|
|
|
bool changed = _appData.EnsureDefaultCategories(L);
|
|
|
|
|
|
changed |= _appData.MigrateBirthdays() > 0;
|
|
|
|
|
|
if (changed) await SaveAsync();
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
// Older files only knew IsDarkMode: keep their explicit choice; new installs follow Windows.
|
|
|
|
|
|
if (string.IsNullOrEmpty(_appData.ThemeMode))
|
|
|
|
|
|
_appData.ThemeMode = firstRun ? "system" : (_appData.IsDarkMode.Value ? "dark" : "light");
|
|
|
|
|
|
_isDarkMode = ThemeMode switch { "light" => false, "dark" => true, _ => SystemPrefs.IsDarkMode() };
|
|
|
|
|
|
_appData.IsDarkMode = _isDarkMode;
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
_appData.Folders.CollectionChanged += OnFoldersChanged;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
HookFolders();
|
|
|
|
|
|
ReindexTasks();
|
|
|
|
|
|
|
|
|
|
|
|
OnPropertyChanged(string.Empty);
|
|
|
|
|
|
SelectFolder(_appData.Folders.FirstOrDefault());
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
|
|
|
|
|
|
CheckReminders(); // catch up on reminders missed while the app was closed
|
2026-11-25 13:44:02 +01:00
|
|
|
|
_reminderTimer.Start();
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
_dataService.StartWatching(OnDataFileChangedExternally); // another PC (OneDrive …) changed the file
|
2026-11-25 13:44:02 +01:00
|
|
|
|
IsLoading = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// ---------- task index / view ----------
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
private readonly HashSet<Folder> _hooked = new();
|
|
|
|
|
|
|
|
|
|
|
|
private void HookFolders()
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var f in _appData.Folders)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!_hooked.Add(f)) continue;
|
|
|
|
|
|
f.Tasks.CollectionChanged += OnFolderTasksChanged;
|
|
|
|
|
|
f.PropertyChanged += OnFolderPropertyChanged;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnFolderTasksChanged(object? sender, NotifyCollectionChangedEventArgs e) => ReindexTasks();
|
|
|
|
|
|
|
|
|
|
|
|
private void OnFolderPropertyChanged(object? sender, PropertyChangedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (e.PropertyName is nameof(Folder.Name) or nameof(Folder.Color))
|
|
|
|
|
|
{
|
|
|
|
|
|
ReindexTasks();
|
|
|
|
|
|
OnPropertyChanged(nameof(HeaderTitle));
|
|
|
|
|
|
OnPropertyChanged(nameof(HeaderColor));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Keeps the flat list for "Upcoming" and each task's folder name/color in sync.</summary>
|
|
|
|
|
|
private void ReindexTasks()
|
|
|
|
|
|
{
|
|
|
|
|
|
_allTasks.Clear();
|
|
|
|
|
|
foreach (var f in _appData.Folders)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!_appData.Folders.Contains(f)) continue;
|
|
|
|
|
|
foreach (var t in f.Tasks)
|
|
|
|
|
|
{
|
|
|
|
|
|
t.FolderName = f.Name;
|
|
|
|
|
|
t.FolderColor = f.Color;
|
|
|
|
|
|
_allTasks.Add(t);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
UpdateCounts();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void RebuildView()
|
|
|
|
|
|
{
|
|
|
|
|
|
IEnumerable<ReminderTask>? source = IsUpcomingMode ? _allTasks : SelectedFolder?.Tasks;
|
|
|
|
|
|
if (source == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
_tasksView = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
var view = new ListCollectionView((System.Collections.IList)source)
|
|
|
|
|
|
{
|
2026-11-29 15:06:19 +01:00
|
|
|
|
CustomSort = new TaskQuery.Comparer(chronological: GroupByMonth),
|
|
|
|
|
|
Filter = o => o is ReminderTask t && TaskQuery.Matches(t, SearchText, FilterMode, HideDone, DateTime.Now, CategoryFilter)
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
};
|
2026-11-29 15:06:19 +01:00
|
|
|
|
if (GroupByMonth)
|
|
|
|
|
|
view.GroupDescriptions.Add(new PropertyGroupDescription(null, new Converters.MonthKeyConverter()));
|
|
|
|
|
|
else if (IsUpcomingMode)
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
view.GroupDescriptions.Add(new PropertyGroupDescription(null, new Converters.TaskBucketConverter()));
|
|
|
|
|
|
_tasksView = view;
|
|
|
|
|
|
}
|
|
|
|
|
|
OnPropertyChanged(nameof(TasksView));
|
|
|
|
|
|
OnPropertyChanged(nameof(HeaderTitle));
|
|
|
|
|
|
OnPropertyChanged(nameof(HeaderColor));
|
2026-11-29 15:06:19 +01:00
|
|
|
|
OnPropertyChanged(nameof(HeaderGlyph));
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
OnPropertyChanged(nameof(HasSelectedFolder));
|
|
|
|
|
|
UpdateCounts();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Re-applies filter, sort and groups (after edits, search, time passing).</summary>
|
|
|
|
|
|
public void RefreshView()
|
|
|
|
|
|
{
|
|
|
|
|
|
_tasksView?.Refresh();
|
|
|
|
|
|
_lastRefreshDay = DateTime.Today;
|
|
|
|
|
|
UpdateCounts();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void UpdateCounts()
|
|
|
|
|
|
{
|
|
|
|
|
|
VisibleCount = _tasksView?.Cast<object>().Count() ?? 0;
|
|
|
|
|
|
OnPropertyChanged(nameof(VisibleCount));
|
|
|
|
|
|
OnPropertyChanged(nameof(HasVisibleTasks));
|
|
|
|
|
|
OnPropertyChanged(nameof(TaskCountText));
|
|
|
|
|
|
OnPropertyChanged(nameof(UpcomingCount));
|
|
|
|
|
|
OnPropertyChanged(nameof(EmptyTitle));
|
|
|
|
|
|
OnPropertyChanged(nameof(EmptyHint));
|
2026-11-29 15:06:19 +01:00
|
|
|
|
OnPropertyChanged(nameof(CategoryNav));
|
|
|
|
|
|
OnPropertyChanged(nameof(HasCategoryNav));
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- dialogs ----------
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
|
2026-11-29 18:20:04 +01:00
|
|
|
|
/// <summary>Dialogs belong to the window the user is looking at (e.g. Settings), not always the main window.</summary>
|
|
|
|
|
|
private static Window? ActiveOwner =>
|
|
|
|
|
|
Application.Current.Windows.OfType<Window>().FirstOrDefault(w => w.IsActive) ?? Application.Current.MainWindow;
|
|
|
|
|
|
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
private string? AskName(string title, string current)
|
|
|
|
|
|
{
|
2026-11-29 18:20:04 +01:00
|
|
|
|
var dialog = new InputDialog(title, L("NewName"), current, IsDarkMode) { Owner = ActiveOwner };
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
if (dialog.ShowDialog() != true) return null;
|
|
|
|
|
|
var name = dialog.ResponseText?.Trim();
|
|
|
|
|
|
return string.IsNullOrEmpty(name) ? null : name;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// ---------- folders ----------
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
private void AddFolder()
|
|
|
|
|
|
{
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
var name = AskName(L("NewFolder"), L("NewFolder"));
|
|
|
|
|
|
if (name == null) return;
|
|
|
|
|
|
var folder = new Folder(name);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
_appData.Folders.Add(folder);
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
SelectFolder(folder);
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void RenameFolder()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (SelectedFolder == null) return;
|
|
|
|
|
|
var name = AskName(L("RenameFolder"), SelectedFolder.Name);
|
|
|
|
|
|
if (name == null) return;
|
|
|
|
|
|
SelectedFolder.Name = name;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void DeleteFolder()
|
|
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
var folder = SelectedFolder;
|
|
|
|
|
|
if (folder == null) return;
|
|
|
|
|
|
int index = _appData.Folders.IndexOf(folder);
|
|
|
|
|
|
_appData.Folders.Remove(folder);
|
|
|
|
|
|
_hooked.Remove(folder);
|
|
|
|
|
|
folder.Tasks.CollectionChanged -= OnFolderTasksChanged;
|
|
|
|
|
|
folder.PropertyChanged -= OnFolderPropertyChanged;
|
|
|
|
|
|
SelectFolder(_appData.Folders.ElementAtOrDefault(Math.Max(0, index - 1)));
|
|
|
|
|
|
_ = SaveAsync();
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
OfferUndo(string.Format(L("DeletedItem"), folder.Name), () =>
|
|
|
|
|
|
{
|
|
|
|
|
|
_appData.Folders.Insert(Math.Min(index, _appData.Folders.Count), folder);
|
|
|
|
|
|
SelectFolder(folder);
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Moves a folder to a new position (drag & drop or up/down).</summary>
|
|
|
|
|
|
public void MoveFolder(Folder folder, int newIndex)
|
|
|
|
|
|
{
|
|
|
|
|
|
int old = _appData.Folders.IndexOf(folder);
|
|
|
|
|
|
newIndex = Math.Clamp(newIndex, 0, _appData.Folders.Count - 1);
|
|
|
|
|
|
if (old < 0 || old == newIndex) return;
|
|
|
|
|
|
_appData.Folders.Move(old, newIndex);
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void MoveFolderBy(int delta)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (SelectedFolder != null)
|
|
|
|
|
|
MoveFolder(SelectedFolder, _appData.Folders.IndexOf(SelectedFolder) + delta);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void SetFolderColor(string? color)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (SelectedFolder == null || string.IsNullOrEmpty(color)) return;
|
|
|
|
|
|
SelectedFolder.Color = color;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// ---------- tasks ----------
|
|
|
|
|
|
|
|
|
|
|
|
private void AddTask() => AddTaskInternal(SelectedFolder ?? Folders.FirstOrDefault());
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
private void AddTaskToFolder(Folder? folder) => AddTaskInternal(folder);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
|
|
|
|
|
private void AddTaskInternal(Folder? folder)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (folder == null)
|
|
|
|
|
|
{
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
MessageBox.Show(L("NoFolderSelectFirst"), L("AppTitle"), MessageBoxButton.OK, MessageBoxImage.Information);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-29 14:42:16 +01:00
|
|
|
|
// Birthday folders (by name or because they mostly hold birthdays) open the birthday form.
|
2026-11-29 15:06:19 +01:00
|
|
|
|
// Anniversary folders (by name or because they mostly hold anniversaries) open the anniversary form
|
|
|
|
|
|
// with the folder's usual category preselected.
|
|
|
|
|
|
string? category = AppData.CategoryHintForFolder(folder.Name);
|
|
|
|
|
|
var anniversaries = folder.Tasks.Where(t => t.IsAnniversary).ToList();
|
|
|
|
|
|
if (category == null && anniversaries.Count * 2 > folder.Tasks.Count && anniversaries.Count > 0)
|
|
|
|
|
|
category = anniversaries.GroupBy(t => t.CategoryId ?? Category.BirthdayId).OrderByDescending(g => g.Count()).First().Key;
|
|
|
|
|
|
if (category == null && CategoryFilter is { } cf && cf != TaskQuery.AppointmentsFilter)
|
|
|
|
|
|
category = cf;
|
2026-11-29 18:20:04 +01:00
|
|
|
|
var taskWindow = new TaskWindow(null, IsDarkMode, Categories, category) { Owner = ActiveOwner };
|
2026-11-25 13:44:02 +01:00
|
|
|
|
if (taskWindow.ShowDialog() == true)
|
|
|
|
|
|
{
|
|
|
|
|
|
folder.Tasks.Add(taskWindow.TaskResult);
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void DeleteTask(ReminderTask? task)
|
|
|
|
|
|
{
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
if (task == null) return;
|
|
|
|
|
|
var folder = _appData.Folders.FirstOrDefault(f => f.Tasks.Contains(task));
|
|
|
|
|
|
if (folder == null) return;
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
int index = folder.Tasks.IndexOf(task);
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
folder.Tasks.Remove(task);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
_ = SaveAsync();
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
|
|
|
|
|
|
OfferUndo(string.Format(L("DeletedItem"), task.Name), () =>
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!_appData.Folders.Contains(folder)) return;
|
|
|
|
|
|
folder.Tasks.Insert(Math.Min(index, folder.Tasks.Count), task);
|
|
|
|
|
|
});
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void MoveTaskToFolder((ReminderTask Task, Folder TargetFolder) args)
|
|
|
|
|
|
{
|
|
|
|
|
|
var (task, targetFolder) = args;
|
|
|
|
|
|
if (task == null || targetFolder == null) return;
|
|
|
|
|
|
|
|
|
|
|
|
var sourceFolder = _appData.Folders.FirstOrDefault(f => f.Tasks.Contains(task));
|
|
|
|
|
|
if (sourceFolder == null || sourceFolder == targetFolder) return;
|
|
|
|
|
|
|
|
|
|
|
|
sourceFolder.Tasks.Remove(task);
|
|
|
|
|
|
targetFolder.Tasks.Add(task);
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Professional redesign: native window, settings, calmer UI
- WindowChrome: resizable, snap layouts, native shadow, DWM rounded
corners; size/position remembered; fade-in after load (no theme flash)
- Menu bar replaced by a settings window (theme system/light/dark,
language, sound, autostart, categories, data, shortcuts, about)
- Shared styles in Themes/Controls.xaml; neutral palette with one accent
applied to Application.Resources (context menus/tooltips themed)
- Rows: To-Do style check left, title + details, relative date right,
actions on hover, visible selection (Enter edits, Del deletes)
- No glow/scale effects; subtle animations (dialogs, snackbar, chevrons)
- Checking a recurring task moves it to the next date (with undo)
- Themed combo box, date picker, check box; neutral dialog headers
- New flat app icon (tools/make_icon.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:10:45 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The check box already flipped IsNotified. One-off tasks are simply done/undone.
|
|
|
|
|
|
/// Recurring tasks (and anniversaries) are never "done for ever": checking moves them to the next date.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private void ToggleDone(ReminderTask? task)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (task == null) return;
|
|
|
|
|
|
if (task.IsRecurring && task.IsNotified)
|
|
|
|
|
|
{
|
|
|
|
|
|
var oldDate = task.ReminderDate;
|
|
|
|
|
|
var oldPre = task.IsPreNotified;
|
|
|
|
|
|
var from = oldDate > DateTime.Now ? oldDate : DateTime.Now;
|
|
|
|
|
|
task.IsNotified = false;
|
|
|
|
|
|
task.ReminderDate = task.GetNextOccurrence(from);
|
|
|
|
|
|
task.IsPreNotified = false;
|
|
|
|
|
|
OfferUndo(string.Format(L("MovedToNext"), task.Name, task.DisplayDate), () =>
|
|
|
|
|
|
{
|
|
|
|
|
|
task.ReminderDate = oldDate;
|
|
|
|
|
|
task.IsPreNotified = oldPre;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
private void EditTask(ReminderTask? task)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (task == null) return;
|
|
|
|
|
|
SelectedTask = task;
|
|
|
|
|
|
EditTaskRequested?.Invoke(this, task);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// ---------- reminders ----------
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
private void ToggleAutostart()
|
|
|
|
|
|
{
|
|
|
|
|
|
_autostartService.ToggleAutostart();
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
OnPropertyChanged(nameof(IsAutostartEnabled));
|
|
|
|
|
|
_notificationService.ShowNotification(L("AppTitle"),
|
|
|
|
|
|
_autostartService.IsAutostartEnabled ? L("AutostartEnabled") : L("AutostartDisabled"));
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
private string WhenText(DateTime date, DateTime now)
|
|
|
|
|
|
{
|
|
|
|
|
|
int days = (date.Date - now.Date).Days;
|
|
|
|
|
|
return days switch
|
|
|
|
|
|
{
|
|
|
|
|
|
<= 0 => string.Format(L("TodayAt"), date.ToString("HH:mm")),
|
|
|
|
|
|
1 => string.Format(L("TomorrowAt"), date.ToString("HH:mm")),
|
|
|
|
|
|
_ => string.Format(L("InDays"), days)
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
/// <summary>Most single reminders (with snooze buttons) per check; more are combined into one message.</summary>
|
|
|
|
|
|
private const int MaxSingleToasts = 3;
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
private void CheckReminders()
|
|
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
var now = DateTime.Now;
|
|
|
|
|
|
var due = ReminderTask.ProcessDue(_appData.Folders, now);
|
|
|
|
|
|
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
if (due.Count is > 0 and <= MaxSingleToasts)
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
{
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
foreach (var d in due)
|
|
|
|
|
|
{
|
|
|
|
|
|
var title = d.IsLead ? $"{d.Task.Name} · {WhenText(d.Date, now)}" : d.Task.Name;
|
|
|
|
|
|
var parts = new List<string>();
|
|
|
|
|
|
if (d.Age is int age) parts.Add(d.Task.AgeText ?? string.Format(L("TurnsAge"), age));
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(d.Task.Description)) parts.Add(d.Task.Description);
|
|
|
|
|
|
if (parts.Count == 0) parts.Add(d.Task.IsAnniversary ? d.Task.DisplayDate : d.Date.ToString("dd.MM.yyyy HH:mm"));
|
|
|
|
|
|
_notificationService.ShowReminder(title, string.Join(" · ", parts), d.Task.Id, d.IsLead);
|
|
|
|
|
|
}
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
}
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
else if (due.Count > MaxSingleToasts)
|
2026-11-25 13:44:02 +01:00
|
|
|
|
{
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
var lines = due.Take(6).Select(d => d.Task.Name + (d.IsLead ? $" ({WhenText(d.Date, now)})" : ""));
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
var body = string.Join("\n", lines) + (due.Count > 6 ? "\n…" : "");
|
|
|
|
|
|
_notificationService.ShowNotification(string.Format(L("RemindersCount"), due.Count), body);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
bool summaryShown = ShowDailySummaryIfDue(now);
|
|
|
|
|
|
|
|
|
|
|
|
if (due.Count > 0 || summaryShown)
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
{
|
|
|
|
|
|
if (PlaySound) SoundService.PlayReminder();
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (_lastRefreshDay != DateTime.Today)
|
|
|
|
|
|
{
|
|
|
|
|
|
RefreshView(); // "today"/"tomorrow" groups move at midnight
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Snooze notifications, morning summary, ICS import, data folder sync
- Windows toast notifications with snooze (10 min / 1 h / tomorrow) and
done buttons; balloon fallback; works when Windows starts the app
- Recurring entries snooze via SnoozedUntil without moving their date;
lead reminders keep the real date
- Morning summary once a day from a chosen hour (pure DailySummary)
- iCalendar import incl. Google birthday calendar, folded lines, UTC,
alarms, own export round trip, duplicates skipped by UID, undo
- Data folder selectable (location.json pointer), file watcher reloads
changes from another PC (own writes ignored)
- Themed date picker calendar, WPF tray menu, arrow/Home/End/Space keys
- 90 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:37:20 +01:00
|
|
|
|
// ---------- morning summary ----------
|
|
|
|
|
|
|
|
|
|
|
|
public bool DailySummaryEnabled
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _appData.DailySummary;
|
|
|
|
|
|
set { if (_appData.DailySummary == value) return; _appData.DailySummary = value; OnPropertyChanged(); _ = SaveAsync(); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IReadOnlyList<int> SummaryHours { get; } = new[] { 6, 7, 8, 9, 10, 11 };
|
|
|
|
|
|
|
|
|
|
|
|
public int SummaryHour
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _appData.SummaryHour;
|
|
|
|
|
|
set { if (_appData.SummaryHour == value) return; _appData.SummaryHour = value; OnPropertyChanged(); _ = SaveAsync(); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool ShowDailySummaryIfDue(DateTime now)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!_appData.DailySummary || !DailySummary.IsDue(now, _appData.SummaryHour, _appData.LastSummaryDate)) return false;
|
|
|
|
|
|
_appData.LastSummaryDate = now.Date;
|
|
|
|
|
|
var s = DailySummary.Build(_allTasks, now);
|
|
|
|
|
|
if (s == null) return true; // nothing today – remember the day, but stay quiet
|
|
|
|
|
|
|
|
|
|
|
|
var parts = new List<string>();
|
|
|
|
|
|
if (s.Today.Count > 0)
|
|
|
|
|
|
parts.Add(L("SummaryToday") + " " + string.Join(", ", s.Today.Select(t =>
|
|
|
|
|
|
t.IsAnniversary ? t.Name + (t.AgeText is { } a ? $" ({a})" : "") : $"{t.Name} {t.ReminderDate:HH:mm}")));
|
|
|
|
|
|
if (s.AnniversariesSoon.Count > 0)
|
|
|
|
|
|
parts.Add(string.Join(", ", s.AnniversariesSoon.Select(t =>
|
|
|
|
|
|
$"{RelativeText(t.ReminderDate, now)}: {t.Name}" + (t.AgeText is { } a ? $" ({a})" : ""))));
|
|
|
|
|
|
if (s.Overdue.Count > 0)
|
|
|
|
|
|
parts.Add(string.Format(L("SummaryOverdue"), s.Overdue.Count));
|
|
|
|
|
|
_notificationService.ShowNotification(L("SummaryTitle"), string.Join("\n", parts));
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- toast buttons ----------
|
|
|
|
|
|
|
|
|
|
|
|
public ReminderTask? FindTask(string? id) =>
|
|
|
|
|
|
string.IsNullOrEmpty(id) ? null : _allTasks.FirstOrDefault(t => t.Id == id);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Snooze / done / open from a Windows notification.</summary>
|
|
|
|
|
|
public void HandleToastAction(string action, string? id, string? minutes, bool isLead)
|
|
|
|
|
|
{
|
|
|
|
|
|
var task = FindTask(id);
|
|
|
|
|
|
switch (action)
|
|
|
|
|
|
{
|
|
|
|
|
|
case "snooze" when task != null:
|
|
|
|
|
|
var now = DateTime.Now;
|
|
|
|
|
|
var until = minutes == "tomorrow"
|
|
|
|
|
|
? now.Date.AddDays(1).AddHours(ReminderTask.BirthdayHour)
|
|
|
|
|
|
: now.AddMinutes(int.TryParse(minutes, out var m) ? m : 10);
|
|
|
|
|
|
task.Snooze(until, keepDate: isLead);
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case "done" when task != null:
|
|
|
|
|
|
task.SnoozedUntil = null;
|
|
|
|
|
|
if (isLead)
|
|
|
|
|
|
{
|
|
|
|
|
|
// done before the date: no main reminder (recurring → next occurrence)
|
|
|
|
|
|
task.IsNotified = true;
|
|
|
|
|
|
ToggleDone(task);
|
|
|
|
|
|
}
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case "open":
|
|
|
|
|
|
if (task != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (IsUpcomingMode || SelectedFolder?.Tasks.Contains(task) != true)
|
|
|
|
|
|
ShowCategory(null);
|
|
|
|
|
|
SelectedTask = task;
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- data folder (sync) ----------
|
|
|
|
|
|
|
|
|
|
|
|
private void ChangeDataFolder()
|
|
|
|
|
|
{
|
|
|
|
|
|
var dialog = new Microsoft.Win32.OpenFolderDialog { Title = L("ChooseDataFolder"), InitialDirectory = DataFolder };
|
|
|
|
|
|
if (dialog.ShowDialog(ActiveOwner!) != true) return;
|
|
|
|
|
|
var target = dialog.FolderName;
|
|
|
|
|
|
if (string.Equals(System.IO.Path.GetFullPath(target).TrimEnd('\\'), System.IO.Path.GetFullPath(DataFolder).TrimEnd('\\'),
|
|
|
|
|
|
StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
var targetFile = System.IO.Path.Combine(target, "tasks.json");
|
|
|
|
|
|
bool useExisting = false;
|
|
|
|
|
|
if (System.IO.File.Exists(targetFile))
|
|
|
|
|
|
{
|
|
|
|
|
|
var answer = MessageBox.Show(ActiveOwner!, L("DataFolderHasData"), L("AppTitle"),
|
|
|
|
|
|
MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
|
|
|
|
|
|
if (answer == MessageBoxResult.Cancel) return;
|
|
|
|
|
|
useExisting = answer == MessageBoxResult.Yes;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
_dataService.Save(_appData);
|
|
|
|
|
|
if (!useExisting) System.IO.File.Copy(_dataService.DataFilePath, targetFile, overwrite: true);
|
|
|
|
|
|
DataService.WritePointer(DataService.AppDirectory, target);
|
|
|
|
|
|
_dataService.SwitchTo(target);
|
|
|
|
|
|
_dataService.StartWatching(OnDataFileChangedExternally);
|
|
|
|
|
|
DataFolder = _dataService.DataDirectory;
|
|
|
|
|
|
if (useExisting) _ = ReloadFromDiskAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
MessageBox.Show(string.Format(L("ExportError"), ex.Message), L("AppTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Called from the file watcher (thread pool) when another PC changed tasks.json.</summary>
|
|
|
|
|
|
private void OnDataFileChangedExternally() =>
|
|
|
|
|
|
Application.Current?.Dispatcher.BeginInvoke(new Action(() => _ = ReloadFromDiskAsync()));
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Replaces the data with the file on disk (sync), keeping this PC's view and window.</summary>
|
|
|
|
|
|
private async Task ReloadFromDiskAsync()
|
|
|
|
|
|
{
|
|
|
|
|
|
var fresh = await _dataService.LoadAsync();
|
|
|
|
|
|
if (fresh.Folders.Count == 0) return; // half-synced or broken file: keep what we have
|
|
|
|
|
|
|
|
|
|
|
|
fresh.WindowLeft = _appData.WindowLeft;
|
|
|
|
|
|
fresh.WindowTop = _appData.WindowTop;
|
|
|
|
|
|
fresh.WindowWidth = _appData.WindowWidth;
|
|
|
|
|
|
fresh.WindowHeight = _appData.WindowHeight;
|
|
|
|
|
|
fresh.WindowMaximized = _appData.WindowMaximized;
|
|
|
|
|
|
|
|
|
|
|
|
var selectedId = SelectedFolder?.Id;
|
|
|
|
|
|
bool upcoming = IsUpcomingMode;
|
|
|
|
|
|
var category = CategoryFilter;
|
|
|
|
|
|
|
|
|
|
|
|
_appData.Folders.CollectionChanged -= OnFoldersChanged;
|
|
|
|
|
|
foreach (var f in _hooked)
|
|
|
|
|
|
{
|
|
|
|
|
|
f.Tasks.CollectionChanged -= OnFolderTasksChanged;
|
|
|
|
|
|
f.PropertyChanged -= OnFolderPropertyChanged;
|
|
|
|
|
|
}
|
|
|
|
|
|
_hooked.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
_appData = fresh;
|
|
|
|
|
|
_appData.EnsureDefaultCategories(L);
|
|
|
|
|
|
_appData.IsDarkMode ??= _isDarkMode;
|
|
|
|
|
|
_localizationService.Initialize(_appData);
|
|
|
|
|
|
_appData.Folders.CollectionChanged += OnFoldersChanged;
|
|
|
|
|
|
HookFolders();
|
|
|
|
|
|
ReindexTasks();
|
|
|
|
|
|
ApplyThemeMode();
|
|
|
|
|
|
|
|
|
|
|
|
_selectedFolder = null;
|
|
|
|
|
|
OnPropertyChanged(string.Empty);
|
|
|
|
|
|
if (upcoming) ShowCategory(category);
|
|
|
|
|
|
else SelectFolder(_appData.Folders.FirstOrDefault(f => f.Id == selectedId) ?? _appData.Folders.FirstOrDefault());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnFoldersChanged(object? sender, NotifyCollectionChangedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
HookFolders();
|
|
|
|
|
|
ReindexTasks();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------- calendar import ----------
|
|
|
|
|
|
|
|
|
|
|
|
private void ImportIcs()
|
|
|
|
|
|
{
|
|
|
|
|
|
var dialog = new Microsoft.Win32.OpenFileDialog { Filter = "iCalendar (*.ics)|*.ics", Title = L("ImportIcs") };
|
|
|
|
|
|
if (dialog.ShowDialog(ActiveOwner!) != true) return;
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
var ids = new HashSet<string>(_allTasks.Select(t => t.Id));
|
|
|
|
|
|
var result = IcsImport.Parse(System.IO.File.ReadAllText(dialog.FileName), ids, DateTime.Now);
|
|
|
|
|
|
if (result.Tasks.Count == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
MessageBox.Show(ActiveOwner!, string.Format(L("IcsNothingNew"), result.Skipped), L("AppTitle"));
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// anniversaries go to a matching folder ("Birthdays", "Weddings" …), appointments to the current folder
|
|
|
|
|
|
var added = new List<(Folder Folder, ReminderTask Task)>();
|
|
|
|
|
|
var createdFolders = new List<Folder>();
|
|
|
|
|
|
foreach (var task in result.Tasks)
|
|
|
|
|
|
{
|
|
|
|
|
|
var folder = task.IsAnniversary ? FolderForCategory(task.CategoryId, createdFolders) : (SelectedFolder ?? Folders.First());
|
|
|
|
|
|
folder.Tasks.Add(task);
|
|
|
|
|
|
added.Add((folder, task));
|
|
|
|
|
|
}
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
|
|
|
|
|
|
OfferUndo(string.Format(L("IcsImported"), added.Count, result.Skipped), () =>
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var (folder, task) in added) folder.Tasks.Remove(task);
|
|
|
|
|
|
foreach (var f in createdFolders) if (f.Tasks.Count == 0) _appData.Folders.Remove(f);
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
MessageBox.Show(string.Format(L("ImportError"), ex.Message), L("AppTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Folder FolderForCategory(string? categoryId, List<Folder> created)
|
|
|
|
|
|
{
|
|
|
|
|
|
var id = categoryId ?? Category.BirthdayId;
|
|
|
|
|
|
var existing = Folders.FirstOrDefault(f => AppData.CategoryHintForFolder(f.Name) == id)
|
|
|
|
|
|
?? Folders.FirstOrDefault(f => f.Tasks.Count > 0 && f.Tasks.All(t => t.IsAnniversary && (t.CategoryId ?? Category.BirthdayId) == id));
|
|
|
|
|
|
if (existing != null) return existing;
|
|
|
|
|
|
|
|
|
|
|
|
var cat = _appData.Categories.FirstOrDefault(c => c.Id == id);
|
|
|
|
|
|
var folder = new Folder(id == Category.BirthdayId ? L("FolderBirthdays") : cat?.Name ?? L("FolderBirthdays"))
|
|
|
|
|
|
{ Color = cat?.Color ?? Folder.DefaultColor };
|
|
|
|
|
|
_appData.Folders.Add(folder);
|
|
|
|
|
|
created.Add(folder);
|
|
|
|
|
|
return folder;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
private void TestNotification()
|
|
|
|
|
|
{
|
|
|
|
|
|
_notificationService.ShowNotification(L("TestNotificationTitle"), L("TestNotificationMessage"));
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
if (PlaySound) SoundService.PlayReminder();
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
private void OpenDiscord()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
FileName = DiscordUrl,
|
|
|
|
|
|
UseShellExecute = true
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
System.Diagnostics.Debug.WriteLine($"[OpenDiscord] {ex.Message}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// ---------- import / export ----------
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
private void ImportCsv()
|
|
|
|
|
|
{
|
|
|
|
|
|
var dialog = new Microsoft.Win32.OpenFileDialog
|
|
|
|
|
|
{
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
Filter = "CSV (*.csv)|*.csv|All Files (*.*)|*.*",
|
|
|
|
|
|
Title = L("ImportCsv")
|
2026-11-25 13:44:02 +01:00
|
|
|
|
};
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
if (dialog.ShowDialog() != true) return;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
try
|
2026-11-25 13:44:02 +01:00
|
|
|
|
{
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
var (imported, skipped) = TaskCsv.Import(System.IO.File.ReadAllText(dialog.FileName), _appData);
|
|
|
|
|
|
_ = SaveAsync();
|
|
|
|
|
|
|
|
|
|
|
|
var msg = string.Format(L("ImportSuccess"), imported);
|
|
|
|
|
|
if (skipped > 0) msg += " " + string.Format(L("ImportSkipped"), skipped);
|
|
|
|
|
|
MessageBox.Show(msg, L("AppTitle"));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
MessageBox.Show(string.Format(L("ImportError"), ex.Message), L("AppTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
private void ExportCsv() =>
|
|
|
|
|
|
SaveTextFile("CSV (*.csv)|*.csv", "tasks.csv", L("ExportCsv"), () => TaskCsv.Export(_appData));
|
|
|
|
|
|
|
|
|
|
|
|
private void ExportIcs() =>
|
|
|
|
|
|
SaveTextFile("iCalendar (*.ics)|*.ics", "reminders.ics", L("ExportIcs"), () => IcsExport.Build(_appData, DateTime.UtcNow));
|
|
|
|
|
|
|
|
|
|
|
|
private void SaveTextFile(string filter, string fileName, string title, Func<string> content)
|
2026-11-25 13:44:02 +01:00
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
var dialog = new Microsoft.Win32.SaveFileDialog { Filter = filter, Title = title, FileName = fileName };
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
if (dialog.ShowDialog() != true) return;
|
2026-11-25 13:44:02 +01:00
|
|
|
|
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
try
|
2026-11-25 13:44:02 +01:00
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// UTF-8 with BOM so Excel shows umlauts correctly (calendars accept it too).
|
|
|
|
|
|
System.IO.File.WriteAllText(dialog.FileName, content(), new UTF8Encoding(true));
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
MessageBox.Show(L("ExportSuccess"), L("AppTitle"));
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
catch (Exception ex)
|
2026-11-25 13:44:02 +01:00
|
|
|
|
{
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
MessageBox.Show(string.Format(L("ExportError"), ex.Message), L("AppTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
// ---------- persistence ----------
|
|
|
|
|
|
|
2026-11-25 13:44:02 +01:00
|
|
|
|
public async Task SaveAsync()
|
|
|
|
|
|
{
|
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>
2026-11-25 15:03:36 +01:00
|
|
|
|
RefreshView();
|
2026-11-25 13:44:02 +01:00
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
await _dataService.SaveAsync(_appData);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
Fix data loss risk, reminder bugs; theme, credits, tests
- Store tasks in %APPDATA% (single-file extract dir lost data on update),
atomic serialized saves, corrupt-file backup, migration of old tasks.json
- Reminders without description never showed (empty balloon text threw)
- Catch up missed reminders on start; monthly recurrence no longer drifts
- Task dialog: date pick kept 00:00, cancel leaked recurrence changes
- CSV import understands quoted fields written by export
- Confirm before deleting; name folders on create; tasks sorted by date
- Single instance, autostart starts hidden in tray, tray icon disposed
- Theme helper for all dialogs, MDL2/Path icons instead of emojis,
fixed folder selection/badge, localized counts and messages
- Credits (c) Michael Media + Discord link, exe Company/Copyright
- Locales embedded; xUnit tests (24); README, CLAUDE.md, sprite-generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:08:53 +01:00
|
|
|
|
MessageBox.Show($"{L("SaveError")}: {ex.Message}", L("AppTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Cleanup()
|
|
|
|
|
|
{
|
|
|
|
|
|
_reminderTimer.Stop();
|
|
|
|
|
|
}
|
2026-11-25 14:52:25 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>Synchronous last save on exit – an async save still running would be cut off.</summary>
|
|
|
|
|
|
public void FlushSave()
|
|
|
|
|
|
{
|
|
|
|
|
|
try { _dataService.Save(_appData); }
|
|
|
|
|
|
catch (Exception ex) { System.Diagnostics.Debug.WriteLine($"[FlushSave] {ex.Message}"); }
|
|
|
|
|
|
}
|
2026-11-25 13:44:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|