32 lines
959 B
C#
32 lines
959 B
C#
|
|
#nullable enable
|
||
|
|
using System.Windows;
|
||
|
|
using System.Windows.Controls;
|
||
|
|
using System.Windows.Input;
|
||
|
|
using ReminderOrganizer.ViewModels;
|
||
|
|
|
||
|
|
namespace ReminderOrganizer
|
||
|
|
{
|
||
|
|
/// <summary>All settings in one place (replaces the old File/View menu). Changes apply immediately.</summary>
|
||
|
|
public partial class SettingsWindow : Window
|
||
|
|
{
|
||
|
|
public SettingsWindow(MainViewModel viewModel)
|
||
|
|
{
|
||
|
|
InitializeComponent();
|
||
|
|
DataContext = viewModel;
|
||
|
|
DialogAnimation.Attach(this);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void Close_Click(object sender, RoutedEventArgs e) => Close();
|
||
|
|
|
||
|
|
private void Window_KeyDown(object sender, KeyEventArgs e)
|
||
|
|
{
|
||
|
|
if (e.Key == Key.Escape) Close();
|
||
|
|
}
|
||
|
|
|
||
|
|
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||
|
|
{
|
||
|
|
if (e.LeftButton == MouseButtonState.Pressed && e.OriginalSource is not TextBox) DragMove();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|