diff --git a/PreviewWindow.axaml b/PreviewWindow.axaml
index 480d5e8..0926fdb 100644
--- a/PreviewWindow.axaml
+++ b/PreviewWindow.axaml
@@ -3,100 +3,286 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" Icon="assets/icon.ico"
- xmlns:local="using:Logof_Client"
+ xmlns:local="using:Logof_Client" Closing="Window_OnClosing"
x:Class="Logof_Client.PreviewWindow"
Title="Datensätze bearbeiten" x:DataType="local:PreviewWindow">
-
-
-
+
-
+
+
-
+
+
+
+
+
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/PreviewWindow.axaml.cs b/PreviewWindow.axaml.cs
index 8cdcdee..aed2fda 100644
--- a/PreviewWindow.axaml.cs
+++ b/PreviewWindow.axaml.cs
@@ -16,6 +16,23 @@ using System.Runtime.CompilerServices;
public partial class PreviewWindow : Window, INotifyPropertyChanged
{
+ public ObservableCollection Addresses { get; }
+
+ private KasPerson? _selectedAddress;
+
+ public KasPerson? SelectedAddress
+ {
+ get => _selectedAddress;
+ set
+ {
+ _selectedAddress = value;
+ PropertyChanged?.Invoke(
+ this,
+ new PropertyChangedEventArgs(nameof(SelectedAddress)));
+ }
+ }
+
+ public event PropertyChangedEventHandler? PropertyChanged;
public PreviewWindow(IEnumerable addresses)
{
@@ -25,9 +42,11 @@ public partial class PreviewWindow : Window, INotifyPropertyChanged
DataContext = this;
}
- public ObservableCollection Addresses { get; }
-
-
+ private void Window_OnClosing(object? sender, WindowClosingEventArgs e)
+ {
+ Settings.Save();
+ Global.Save();
+ }
}