Initial commit: ReminderOrganizer WPF app

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 13:44:02 +01:00
commit 5ca2770829
37 changed files with 3350 additions and 0 deletions

53
TaskWindow.xaml.cs Normal file
View File

@@ -0,0 +1,53 @@
#nullable enable
using System;
using System.Windows;
using ReminderOrganizer.Models;
using ReminderOrganizer.Services;
using ReminderOrganizer.ViewModels;
namespace ReminderOrganizer
{
public partial class TaskWindow : Window
{
private readonly TaskViewModel _viewModel;
public ReminderTask TaskResult => _viewModel.TaskResult;
public TaskWindow() : this(null)
{
}
public TaskWindow(ReminderTask? existingTask)
{
InitializeComponent();
var localizationService = ServiceLocator.Services.GetService(typeof(ILocalizationService)) as ILocalizationService;
if (localizationService == null)
{
System.Diagnostics.Debug.WriteLine("[TaskWindow] LocalizationService is null!");
localizationService = new LocalizationService(ServiceLocator.Services.GetService(typeof(IDataService)) as IDataService
?? throw new InvalidOperationException("DataService not found"));
}
_viewModel = new TaskViewModel(localizationService, existingTask);
_viewModel.RequestClose += OnRequestClose;
DataContext = _viewModel;
}
private void OnRequestClose(object? sender, bool result)
{
DialogResult = result;
Close();
}
private void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (e.LeftButton == System.Windows.Input.MouseButtonState.Pressed)
{
DragMove();
}
}
}
}