presence/Presence.Desktop/Views/GroupView.axaml

75 lines
2.6 KiB
Plaintext
Raw Normal View History

2024-12-05 08:26:58 +00:00
<UserControl xmlns="https://github.com/avaloniaui"
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">
<Design.DataContext>
<vm:GroupViewModel/>
</Design.DataContext>
2025-04-30 01:13:44 +00:00
2024-12-05 08:26:58 +00:00
<DockPanel Background="Black">
2025-04-30 01:13:44 +00:00
2024-12-05 08:26:58 +00:00
<StackPanel DockPanel.Dock="Bottom">
<TextBlock Text="List ↑" HorizontalAlignment="Center"/>
</StackPanel>
2025-04-30 01:13:44 +00:00
<StackPanel Spacing="10" HorizontalAlignment="Center" DockPanel.Dock="Top" Orientation="Horizontal">
<Button Content="Назад" Command="{Binding GoBackCommand}"/>
2024-12-05 08:26:58 +00:00
<TextBlock Text="Combobox ->"/>
2025-04-30 01:13:44 +00:00
2024-12-05 08:26:58 +00:00
<ComboBox ItemsSource="{Binding Groups}" SelectedValue="{Binding SelectedGroupItem}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
2025-04-30 01:13:44 +00:00
2024-12-22 16:52:52 +00:00
<ComboBox ItemsSource="{Binding SecondComboBoxItems}" SelectedValue="{Binding SelectedSecondItem}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
2025-04-30 01:13:44 +00:00
2024-12-05 08:26:58 +00:00
<Button Content="Delete Users"
Command="{Binding DeleteUsersByGroupCommand}"/>
<Button Content="Import Students" Command="{Binding ImportStudentsCommand}"/>
</StackPanel>
2025-04-30 01:13:44 +00:00
2024-12-05 08:26:58 +00:00
<Border>
2024-12-22 16:52:52 +00:00
<ListBox Background="Black" ItemsSource="{Binding Users}" SelectedItem="{Binding SelectedUser}">
2024-12-05 08:26:58 +00:00
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
2025-04-30 01:13:44 +00:00
2024-12-22 16:52:52 +00:00
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Delete User"
Command="{Binding DeleteUserCommand}"
CommandParameter="{Binding SelectedUser}" />
<MenuItem Header="Update FIO">
2025-04-30 01:13:44 +00:00
2024-12-22 16:52:52 +00:00
<StackPanel>
<TextBox Text="{Binding NewFIO, Mode=TwoWay}" Width="150" />
<Button Content="Update"
Command="{Binding UpdateUserFIOCommand}"
CommandParameter="{Binding SelectedUser}" />
</StackPanel>
</MenuItem>
</ContextMenu>
</ListBox.ContextMenu>
2024-12-05 08:26:58 +00:00
</ListBox>
</Border>
</DockPanel>
</UserControl>