- 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>
56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
#nullable enable
|
|
using System.Windows;
|
|
using System.Windows.Input;
|
|
using ReminderOrganizer.Core;
|
|
using ReminderOrganizer.Services;
|
|
|
|
namespace ReminderOrganizer
|
|
{
|
|
public partial class InputDialog : Window
|
|
{
|
|
public string ResponseText { get; private set; } = "";
|
|
|
|
public InputDialog(string title, string prompt, string defaultValue = "", bool? darkMode = null)
|
|
{
|
|
InitializeComponent();
|
|
DialogAnimation.Attach(this);
|
|
Title = title;
|
|
TxtTitle.Text = title;
|
|
TxtPrompt.Text = prompt;
|
|
TxtInput.Text = defaultValue;
|
|
|
|
if (ServiceLocator.Services.GetService(typeof(ILocalizationService)) is ILocalizationService loc)
|
|
{
|
|
BtnCancel.Content = loc.GetString("Cancel");
|
|
BtnOk.Content = loc.GetString("OK");
|
|
}
|
|
if (darkMode.HasValue) Theme.Apply(Resources, darkMode.Value);
|
|
|
|
Loaded += (_, _) =>
|
|
{
|
|
TxtInput.Focus();
|
|
TxtInput.SelectAll();
|
|
};
|
|
}
|
|
|
|
private void BtnOk_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
ResponseText = TxtInput.Text;
|
|
DialogResult = true;
|
|
}
|
|
|
|
private void BtnCancel_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
DialogResult = false;
|
|
}
|
|
|
|
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
if (e.LeftButton == MouseButtonState.Pressed && e.OriginalSource is not System.Windows.Controls.TextBox)
|
|
{
|
|
DragMove();
|
|
}
|
|
}
|
|
}
|
|
}
|