2024-12-18 08:42:44 +00:00
|
|
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
2024-12-18 07:19:58 +00:00
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:vm="using:Presence.Desktop.ViewModels"
|
|
|
|
|
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"
|
2024-12-18 08:42:44 +00:00
|
|
|
|
x:Class="Presence.Desktop.Views.GroupView"
|
|
|
|
|
x:DataType="vm:GroupViewModel">
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
|
|
|
|
|
2024-12-18 08:42:44 +00:00
|
|
|
|
|
|
|
|
|
<DockPanel Background="#F9F9F9">
|
|
|
|
|
<!-- Верхняя панель с комбобоксами -->
|
|
|
|
|
<StackPanel DockPanel.Dock="Top"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Margin="20"
|
2024-12-18 07:19:58 +00:00
|
|
|
|
Spacing="15">
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<!-- Первый ComboBox для выбора группы -->
|
|
|
|
|
<ComboBox ItemsSource="{Binding Groups}"
|
|
|
|
|
SelectedValue="{Binding SelectedGroupItem}"
|
|
|
|
|
HorizontalAlignment="Center"
|
2024-12-18 07:19:58 +00:00
|
|
|
|
Width="300">
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
|
</ComboBox>
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<!-- Второй ComboBox для выбора способа сортировки -->
|
|
|
|
|
<ComboBox ItemsSource="{Binding SortOptions}"
|
|
|
|
|
SelectedItem="{Binding SelectedSortOption}"
|
|
|
|
|
HorizontalAlignment="Center"
|
2024-12-18 07:19:58 +00:00
|
|
|
|
Width="300">
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<TextBlock Text="{Binding}" />
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
|
</ComboBox>
|
|
|
|
|
</StackPanel>
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<!-- Нижняя панель с кнопками -->
|
|
|
|
|
<StackPanel DockPanel.Dock="Bottom"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Margin="20"
|
2024-12-18 07:19:58 +00:00
|
|
|
|
Spacing="15">
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<Button Content="Удалить всех студентов"
|
|
|
|
|
Command="{Binding RemoveAllStudentsCommand}"
|
|
|
|
|
HorizontalAlignment="Center"
|
2024-12-18 07:19:58 +00:00
|
|
|
|
Width="250"/>
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<Button Content="Добавить студента"
|
|
|
|
|
Command="{Binding AddStudentCommand}"
|
|
|
|
|
HorizontalAlignment="Center"
|
2024-12-18 07:19:58 +00:00
|
|
|
|
Width="250"/>
|
2024-12-19 07:27:17 +00:00
|
|
|
|
<Button Content="Перейти на другую странцу"
|
|
|
|
|
Command="{Binding NextPageCommand}"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Width="250"/>
|
2024-12-18 08:42:44 +00:00
|
|
|
|
</StackPanel>
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<!-- Центральная панель для списка студентов -->
|
|
|
|
|
<ListBox ItemsSource="{Binding Users}"
|
2024-12-18 07:19:58 +00:00
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Width="400"
|
|
|
|
|
Margin="20"
|
|
|
|
|
SelectionMode="Multiple"
|
|
|
|
|
SelectedItems="{Binding SelectedUsers}">
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="5">
|
|
|
|
|
<TextBlock Text="{Binding Name}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ListBox.ItemTemplate>
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<ListBox.ContextMenu>
|
|
|
|
|
<ContextMenu>
|
|
|
|
|
<MenuItem Header="Удалить" Click="OnDeleteUserClick"/>
|
|
|
|
|
<MenuItem Header="Редактировать" Click="OnEditUserClick"/>
|
|
|
|
|
</ContextMenu>
|
|
|
|
|
</ListBox.ContextMenu>
|
|
|
|
|
</ListBox>
|
|
|
|
|
</DockPanel>
|
|
|
|
|
</UserControl>
|