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 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) { InitializeComponent(); Addresses = new ObservableCollection(addresses); DataContext = this; } private void Window_OnClosing(object? sender, WindowClosingEventArgs e) { Settings.Save(); Global.Save(); } }