2024-12-18 08:42:44 +00:00
|
|
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
2024-12-19 08:06:01 +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"
|
|
|
|
|
x:Class="Presence.Desktop.Views.GroupView"
|
|
|
|
|
x:DataType="vm:GroupViewModel">
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-19 08:06:01 +00:00
|
|
|
|
<DockPanel Background="#F0F2F5">
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<!-- Верхняя панель с комбобоксами -->
|
2024-12-19 08:06:01 +00:00
|
|
|
|
<Border DockPanel.Dock="Top"
|
|
|
|
|
Background="#FFFFFF"
|
|
|
|
|
CornerRadius="10"
|
|
|
|
|
Padding="20"
|
|
|
|
|
Margin="20"
|
|
|
|
|
>
|
|
|
|
|
<StackPanel HorizontalAlignment="Center" Spacing="20">
|
|
|
|
|
<!-- Первый ComboBox для выбора группы -->
|
|
|
|
|
<ComboBox ItemsSource="{Binding Groups}"
|
|
|
|
|
SelectedValue="{Binding SelectedGroupItem}"
|
|
|
|
|
Width="300"
|
|
|
|
|
Background="#F0F2F5"
|
|
|
|
|
CornerRadius="5"
|
|
|
|
|
FontSize="14">
|
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<TextBlock Text="{Binding Name}" FontSize="14" />
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
|
</ComboBox>
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-19 08:06:01 +00:00
|
|
|
|
<!-- Второй ComboBox для выбора способа сортировки -->
|
|
|
|
|
<ComboBox ItemsSource="{Binding SortOptions}"
|
|
|
|
|
SelectedItem="{Binding SelectedSortOption}"
|
|
|
|
|
Width="300"
|
|
|
|
|
Background="#F0F2F5"
|
|
|
|
|
CornerRadius="5"
|
|
|
|
|
FontSize="14">
|
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<TextBlock Text="{Binding}" FontSize="14" />
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
|
</ComboBox>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<!-- Нижняя панель с кнопками -->
|
2024-12-19 08:06:01 +00:00
|
|
|
|
<Border DockPanel.Dock="Bottom"
|
|
|
|
|
Background="#FFFFFF"
|
|
|
|
|
CornerRadius="10"
|
|
|
|
|
Padding="20"
|
|
|
|
|
Margin="20"
|
|
|
|
|
>
|
|
|
|
|
<StackPanel HorizontalAlignment="Center" Spacing="20">
|
|
|
|
|
<Button Content="Удалить всех студентов"
|
|
|
|
|
Command="{Binding RemoveAllStudentsCommand}"
|
|
|
|
|
Width="250"
|
|
|
|
|
Background="#FF4D4D"
|
|
|
|
|
Foreground="#FFFFFF"
|
|
|
|
|
CornerRadius="5"
|
|
|
|
|
FontSize="14">
|
|
|
|
|
<Button.Styles>
|
|
|
|
|
<Style Selector="Button:pointerover">
|
|
|
|
|
<Setter Property="Background" Value="#E53935"/>
|
|
|
|
|
</Style>
|
|
|
|
|
</Button.Styles>
|
|
|
|
|
</Button>
|
|
|
|
|
<Button Content="Добавить студента"
|
|
|
|
|
Command="{Binding AddStudentCommand}"
|
|
|
|
|
Width="250"
|
|
|
|
|
Background="#4CAF50"
|
|
|
|
|
Foreground="#FFFFFF"
|
|
|
|
|
CornerRadius="5"
|
|
|
|
|
FontSize="14">
|
|
|
|
|
<Button.Styles>
|
|
|
|
|
<Style Selector="Button:pointerover">
|
|
|
|
|
<Setter Property="Background" Value="#43A047"/>
|
|
|
|
|
</Style>
|
|
|
|
|
</Button.Styles>
|
|
|
|
|
</Button>
|
|
|
|
|
<Button Content="Перейти на другую страницу"
|
|
|
|
|
Command="{Binding NextPageCommand}"
|
|
|
|
|
Width="250"
|
|
|
|
|
Background="#2196F3"
|
|
|
|
|
Foreground="#FFFFFF"
|
|
|
|
|
CornerRadius="5"
|
|
|
|
|
FontSize="14">
|
|
|
|
|
<Button.Styles>
|
|
|
|
|
<Style Selector="Button:pointerover">
|
|
|
|
|
<Setter Property="Background" Value="#1E88E5"/>
|
|
|
|
|
</Style>
|
|
|
|
|
</Button.Styles>
|
|
|
|
|
</Button>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-18 08:42:44 +00:00
|
|
|
|
<!-- Центральная панель для списка студентов -->
|
2024-12-19 08:06:01 +00:00
|
|
|
|
<Border Background="#FFFFFF"
|
|
|
|
|
CornerRadius="10"
|
|
|
|
|
Padding="20"
|
|
|
|
|
Margin="20"
|
|
|
|
|
>
|
|
|
|
|
<ListBox ItemsSource="{Binding Users}"
|
|
|
|
|
Width="500"
|
|
|
|
|
SelectionMode="Multiple"
|
|
|
|
|
SelectedItems="{Binding SelectedUsers}"
|
|
|
|
|
Background="Transparent">
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Border Background="#F0F2F5"
|
|
|
|
|
CornerRadius="5"
|
|
|
|
|
Padding="10"
|
|
|
|
|
Margin="5">
|
|
|
|
|
<TextBlock Text="{Binding Name}" FontSize="16" VerticalAlignment="Center" />
|
|
|
|
|
</Border>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ListBox.ItemTemplate>
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
2024-12-19 08:06:01 +00:00
|
|
|
|
<ListBox.ContextMenu>
|
|
|
|
|
<ContextMenu>
|
|
|
|
|
<MenuItem Header="Удалить" Click="OnDeleteUserClick"/>
|
|
|
|
|
<MenuItem Header="Редактировать" Click="OnEditUserClick"/>
|
|
|
|
|
</ContextMenu>
|
|
|
|
|
</ListBox.ContextMenu>
|
|
|
|
|
</ListBox>
|
|
|
|
|
</Border>
|
2024-12-18 08:42:44 +00:00
|
|
|
|
</DockPanel>
|
|
|
|
|
</UserControl>
|