demko_v/MainWindow.axaml
2025-04-16 00:00:02 +03:00

92 lines
5.7 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"
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"
x:Class="demko_v.MainWindow"
x:CompileBindings="False"
Title="demko_agents">
<DockPanel>
<StackPanel
HorizontalAlignment="Center"
Orientation="Horizontal"
DockPanel.Dock="Top"
Spacing="10"
Height="50">
<TextBox Width="200" x:Name="SearchTextBox" TextChanging="SearchTextBox_OnTextChanging" Watermark="Поиск"/>
<TextBlock VerticalAlignment="Center" Text="Имя:"/>
<ComboBox VerticalAlignment="Center" Width="100" x:Name="TitleAgentSortComboBox" SelectionChanged="TitleAgentSortComboBox_OnSelectionChanged">
<ComboBoxItem Content="Дефолт"/>
<ComboBoxItem Content="А - я"/>
<ComboBoxItem Content="Я - а"/>
</ComboBox>
<TextBlock VerticalAlignment="Center" Text="Скидка:"/>
<ComboBox VerticalAlignment="Center" Width="100" x:Name="SaleSortComboBox" SelectionChanged="SaleSortComboBox_OnSelectionChanged">
<ComboBoxItem Content="Дефолт"/>
<ComboBoxItem Content="Убывание"/>
<ComboBoxItem Content="Возрастание"/>
</ComboBox>
<TextBlock VerticalAlignment="Center" Text="Приоритет:"/>
<ComboBox VerticalAlignment="Center" Width="100" x:Name="PrioritySortCombobox" SelectionChanged="PrioritySortCombobox_OnSelectionChanged">
<ComboBoxItem Content="Дефолт"/>
<ComboBoxItem Content="Убывание"/>
<ComboBoxItem Content="Возрастание"/>
</ComboBox>
<TextBlock VerticalAlignment="Center" Text="Тип агента:"/>
<ComboBox VerticalAlignment="Center" Width="100" x:Name="TypeAgentSortCombobox" SelectionChanged="TypeAgentSortCombobox_OnSelectionChanged">
<ComboBoxItem Content="Все"/>
<ComboBoxItem Content="ООО"/>
<ComboBoxItem Content="МФО"/>
<ComboBoxItem Content="ЗАО"/>
<ComboBoxItem Content="МКК"/>
<ComboBoxItem Content="ПАО"/>
<ComboBoxItem Content="ОАО"/>
</ComboBox>
<Button HorizontalContentAlignment="Right" VerticalContentAlignment="Center" x:Name="AddAgent" Click="AddAgent_OnClick" Content="Добавить агента"/>
</StackPanel>
<StackPanel
Spacing="10"
HorizontalAlignment="Center"
Orientation="Horizontal"
DockPanel.Dock="Bottom" Height="40">
<Button HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="70" x:Name="BackButton" Click="Back_OnClick" Content="Назад"/>
<TextBlock VerticalAlignment="Center" x:Name="CountAgentsTextBlock"/>
<Button HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="70" x:Name="NextButton" Click="Next_OnClick" Content="Вперед"/>
</StackPanel>
<Border>
<ListBox x:Name="AgentListBox">
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Gray" BorderThickness="1" Padding="10" CornerRadius="5">
<Grid ColumnDefinitions="120, *" Margin="5" HorizontalAlignment="Center">
<Image Grid.Column="0" Width="100" Height="100"
Source="{Binding Image}"
Stretch="UniformToFill"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="5"/>
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Spacing="5">
<TextBlock Text="{Binding Title}" FontSize="18" FontWeight="Bold"/>
<TextBlock Text="{Binding SalesYear}" FontWeight="Bold"/>
<TextBlock Text="{Binding SalesQuantity}"/>
<TextBlock Text="{Binding CountSales}"/>
<TextBlock Text="{Binding Sale}"/>
<TextBlock Text="{Binding Phone}"/>
<TextBlock Text="{Binding AgentType}"/>
<TextBlock Text="{Binding Priority}"/>
</StackPanel>
</Grid>
<Border.ContextMenu>
<ContextMenu>
<MenuItem Header="edit" Click="EditMenuItem_OnClick"/>
<MenuItem Header="priority" Click="PriorityMenuItem_OnClick"/>
</ContextMenu>
</Border.ContextMenu>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
</DockPanel>
</Window>