Demka/Demka-2/Views/MainWindow.axaml
2024-12-27 16:07:13 +03:00

51 lines
2.5 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Demka_2.Views.MainWindow"
Width="1200" Height="800"
Title="Список услуг">
<DockPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="5">
<TextBox Width="200" Watermark="Поиск..." Name="SearchBox" />
<ComboBox Width="150" Name="DiscountFilter">
<ComboBox.Items>
<TextBlock Text="Все" />
<TextBlock Text="0-5%" />
<TextBlock Text="5-15%" />
<TextBlock Text="15-30%" />
<TextBlock Text="30-70%" />
<TextBlock Text="70-100%" />
</ComboBox.Items>
</ComboBox>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="5">
<TextBox Width="200" Watermark="Код администратора..." Name="AdminCodeBox" />
<Button Content="Войти как администратор" Name="AdminLoginButton" Margin="5" />
</StackPanel>
<Button Content="Сортировка ↑" Name="SortAscButton" Margin="5" />
<Button Content="Сортировка ↓" Name="SortDescButton" />
</StackPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="5" Name="AdminControls" IsVisible="False">
<Button Content="Добавить услугу" Name="AddServiceButton" Margin="5" />
<Button Content="Редактировать услугу" Name="EditServiceButton" Margin="5" />
<Button Content="Удалить услугу" Name="DeleteServiceButton" Margin="5" />
<!-- <Button Content="Открыть форму для добавления товаров" Name="OpenServiceFormWindow" Click="OpenServiceFormWindow_Click" Margin="5" /> -->
</StackPanel>
<ListBox Name="ServiceList" Margin="5" Width="600">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical" Background="{Binding BackgroundColor}" Margin="5">
<TextBlock Text="{Binding Name}" FontWeight="Bold" />
<TextBlock Text="{Binding Description}" FontStyle="Italic" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Price}" TextDecorations="Strikethrough" />
<TextBlock Text="{Binding FinalPrice}" Foreground="Green" Margin="10,0,0,0" />
</StackPanel>
<Image Source="{Binding ImagePath}" Height="50" Width="50" Margin="5" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock Name="ServiceCountText" DockPanel.Dock="Bottom" Margin="50" HorizontalAlignment="Center" />
</DockPanel>
</Window>