From c223ca222dbae94909acf6f0fb039c27440d9952 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Fri, 14 Aug 2026 14:54:18 +0200 Subject: [PATCH 1/6] [chore:] SelectionMode and Name of Result ListBox --- ResultWindow.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ResultWindow.axaml b/ResultWindow.axaml index 49792b0..e97e4cb 100644 --- a/ResultWindow.axaml +++ b/ResultWindow.axaml @@ -45,7 +45,7 @@ - + From 9cd6500da948eff6624300433bff364c8d1bc03f Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Fri, 14 Aug 2026 14:54:43 +0200 Subject: [PATCH 2/6] [init:] editable PreviewWindow (saving untested...) --- PreviewWindow.axaml | 103 +++++++++++++++++++++++++++++++++++++++++ PreviewWindow.axaml.cs | 33 +++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 PreviewWindow.axaml create mode 100644 PreviewWindow.axaml.cs diff --git a/PreviewWindow.axaml b/PreviewWindow.axaml new file mode 100644 index 0000000..480d5e8 --- /dev/null +++ b/PreviewWindow.axaml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PreviewWindow.axaml.cs b/PreviewWindow.axaml.cs new file mode 100644 index 0000000..8cdcdee --- /dev/null +++ b/PreviewWindow.axaml.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Linq; +using System.Runtime.CompilerServices; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Layout; +using Avalonia.Media; + +namespace Logof_Client; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +public partial class PreviewWindow : Window, INotifyPropertyChanged +{ + + public PreviewWindow(IEnumerable addresses) + { + InitializeComponent(); + + Addresses = new ObservableCollection(addresses); + + DataContext = this; + } + public ObservableCollection Addresses { get; } + + + +} + From 74208a4f04ce17eb1e2954d970d0d4b938e49f34 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Fri, 14 Aug 2026 14:54:55 +0200 Subject: [PATCH 3/6] [chore:] PreviewWindow integration --- Logof Client.csproj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Logof Client.csproj b/Logof Client.csproj index 28addc8..37d59b8 100644 --- a/Logof Client.csproj +++ b/Logof Client.csproj @@ -71,4 +71,11 @@ + + + + PreviewWindow.axaml + Code + + From 522970f341efc2efaa281d838b9b4a284768df6c Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Fri, 14 Aug 2026 14:55:11 +0200 Subject: [PATCH 4/6] [feat:] PreviewWindow usage --- ResultWindow.axaml.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ResultWindow.axaml.cs b/ResultWindow.axaml.cs index 96f687d..19d5a02 100644 --- a/ResultWindow.axaml.cs +++ b/ResultWindow.axaml.cs @@ -230,7 +230,20 @@ public partial class ResultWindow : Window, INotifyPropertyChanged private void BtnShowSelected_OnClick(object? sender, RoutedEventArgs e) { - // once upon a time, there was a feature like this + if (LbResults.SelectedItems.Count > 0) + { + var selectedPersons = LbResults.SelectedItems + .Cast() + .Select(x => x.Person) + .ToList(); + + if (selectedPersons.Count == 0) + return; + + var preview = new PreviewWindow(selectedPersons); + preview.Show(); + + } } private void BtnExecuteFilter_OnClick(object? sender, RoutedEventArgs e) From 9aa467d9f0ffe6bd5a90bf0bd0cbf5b5c7e00034 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Mon, 24 Aug 2026 12:56:25 +0200 Subject: [PATCH 5/6] [feat:] PreviewWindow finalized (first version) --- PreviewWindow.axaml | 314 ++++++++++++++++++++++++++++++++--------- PreviewWindow.axaml.cs | 25 +++- 2 files changed, 272 insertions(+), 67 deletions(-) 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(); + } } From 7ad061217082a3081ca09964517f0187b6474d2a Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Mon, 24 Aug 2026 12:56:58 +0200 Subject: [PATCH 6/6] [feat:] integration of PreviewWindow for full sets --- MainWindow.axaml | 8 ++++++++ MainWindow.axaml.cs | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/MainWindow.axaml b/MainWindow.axaml index 926b0f9..7b031cf 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -79,6 +79,14 @@ + + + + + + + diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index 7f5b81f..4642944 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -1377,4 +1377,14 @@ public partial class MainWindow : Window BtnCombineAddressSetSortUp.IsEnabled = true; } } + + private void MnIAdSetView_OnClick(object? sender, RoutedEventArgs e) + { + if (LstCustomerAdressSets.SelectedItems.Count > 0) + { + var preview = new PreviewWindow((LstCustomerAdressSets.SelectedItems[0] as KasAddressList).KasPersons); + preview.Show(); + + } + } }