using Avalonia.Controls; using Avalonia.Markup.Xaml; using System.Collections.ObjectModel; using System.Linq; using Demka_2.Use; using System; using Avalonia.Interactivity; using DynamicData; namespace Demka_2.Views; public partial class MainWindow : Window { private ObservableCollection Services { get; set; } = new ObservableCollection(); private ObservableCollection FilteredServices { get; set; } = new ObservableCollection(); private TextBox _searchBox; private ComboBox _discountFilter; private ListBox _serviceList; private TextBlock _serviceCountText; private TextBox _adminCodeBox; private Button _adminLoginButton; private StackPanel _adminControls; private const string AdminCode = "0000"; private bool IsAdminMode = false; public MainWindow() { InitializeComponent(); LoadServices(); UpdateFilteredServices(); } private void InitializeComponent() { AvaloniaXamlLoader.Load(this); _searchBox = this.FindControl("SearchBox"); _discountFilter = this.FindControl("DiscountFilter"); _serviceList = this.FindControl("ServiceList"); _serviceCountText = this.FindControl("ServiceCountText"); _adminCodeBox = this.FindControl("AdminCodeBox"); _adminLoginButton = this.FindControl